Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 356876

Summary: Eclipse process sleeping after the main window is closed
Product: [Eclipse Project] Platform Reporter: alexandru.balut
Component: IDEAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: remy.suen
Version: 4.2   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description alexandru.balut CLA 2011-09-06 21:35:30 EDT
Build Identifier: 20110615-0604

The Eclipse java process does not die after the main application window is closed.

It happens with both SunJDK or OpenJDK
$ java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
$ uname -a
Linux machine 2.6.38-11-generic #48-Ubuntu SMP Fri Jul 29 19:02:55 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

Please tell me if you need more info.



Reproducible: Always

Steps to Reproduce:
1. Start a fresh unpacked Eclipse Indigo from the command line, 
2. create a new workspace, 
3. close the main window, notice the ./eclipse/eclipse command hangs. It stops only when running "killall -9 java". Or if ctrl+c is used, but then a java process still remains:


aleb      5196  3.8 11.9 1235136 236548 pts/1  Sl+  03:17   0:15 /usr/bin/java -Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx384m -jar /home/aleb/eclipse//plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar -os linux -ws gtk -arch x86_64 -showsplash -launcher /home/aleb/eclipse/eclipse -name Eclipse --launcher.library /home/aleb/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.100.v20110505/eclipse_1407.so -startup /home/aleb/eclipse//plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar --launcher.overrideVmargs -exitdata 42a800e -product org.eclipse.epp.package.java.product -vm /usr/bin/java -vmargs -Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx384m -jar /home/aleb/eclipse//plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar

I see Sl+ means:
       S    interruptible sleep (waiting for an event to complete)
       l    is multi-threaded (using CLONE_THREAD, like NPTL pthreads do)
       +    is in the foreground process group.
Comment 1 Remy Suen CLA 2011-09-07 07:43:33 EDT
Please use Visual VM and get a thread dump when the Eclipse process appears to be hung.
http://wiki.eclipse.org/index.php/How_to_report_a_deadlock
Comment 2 alexandru.balut CLA 2011-09-08 06:35:48 EDT
Ok, I'll try that if it happens again and reopen the bug. I restarted the computer and it works fine now.