This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
On 25 June, Glenn wrote: I am writing a daemon in Java and when I use the IDE to kill it (runtime / processes/ terminate process), it leaves behind a JRE which consumes enormous quantities of CPU. (See following trace.) This occurs reliably for every run after the second. gg38877:who:/export/home/gg38877: [12] ps -ef | grep java gg38877 2609 2583 0 12:29:13 ? 2:57 /usr/jdk/instances/jdk1.5.0/bin/java -Djdk.home=/usr/jdk/instances/jdk1.5.0 -cl gg38877 2764 2645 0 13:31:38 pts/13 0:00 grep java gg38877 2758 1 0 13:23:49 ? 0:41 /usr/jdk/instances/jdk1.5.0/jre/bin/java -client -Xbootclasspath/a:/usr/jdk/ins gg38877:who:/export/home/gg38877: [13] top load averages: 1.95, 1.29, 0.80 13:31:49 98 processes: 97 sleeping, 1 on cpu CPU states: % idle, % user, % kernel, % iowait, % swap Memory: 1792M real, 1023M free, 449M swap in use, 3039M swap free PID USERNAME LWP PRI NICE SIZE RES STATE TIME CPU COMMAND 492 gg38877 1 56 0 61M 48M sleep 49:41 3.35% Xsun 706 gg38877 2 58 0 97M 29M sleep 2:10 2.47% gnome-terminal 2609 gg38877 18 59 0 289M 228M sleep 2:57 0.32% java 2765 gg38877 1 39 0 2704K 1544K cpu 0:00 0.22% top 863 gg38877 1 49 0 67M 13M sleep 2:24 0.19% gnome-netstatus 2758 gg38877 14 59 0 143M 83M sleep 0:40 0.14% java (snip) gg38877:who:/export/home/gg38877: [14] echo "start daemon" start daemon gg38877:who:/export/home/gg38877: [15] echo "stop daemon from IDE" stop daemon from IDE gg38877:who:/export/home/gg38877: [16] ps -ef | grep java gg38877 2609 2583 0 12:29:13 ? 3:28 /usr/jdk/instances/jdk1.5.0/bin/java -Djdk.home=/usr/jdk/instances/jdk1.5.0 -cl gg38877 2766 2609 44 13:34:17 ? 0:49 /usr/jdk/instances/jdk1.5.0/jre/bin/java -classpath /export/home/gg38877/Projec gg38877 2758 1 0 13:23:49 ? 0:41 /usr/jdk/instances/jdk1.5.0/jre/bin/java -client -Xbootclasspath/a:/usr/jdk/ins gg38877:who:/export/home/gg38877: [17] top load averages: 2.19, 1.37, 0.90 13:35:14 99 processes: 97 sleeping, 1 running, 1 on cpu CPU states: % idle, % user, % kernel, % iowait, % swap Memory: 1792M real, 1007M free, 477M swap in use, 3012M swap free PID USERNAME LWP PRI NICE SIZE RES STATE TIME CPU COMMAND 2766 gg38877 10 20 0 95M 30M run 0:52 83.73% java 2609 gg38877 25 59 0 289M 228M sleep 3:28 2.90% java 492 gg38877 1 44 0 61M 48M sleep 49:45 2.19% Xsun 706 gg38877 2 59 0 97M 29M sleep 2:12 1.67% gnome-terminal 698 gg38877 1 59 0 79M 22M sleep 0:49 0.42% metacity 2769 gg38877 1 29 0 2704K 1544K cpu 0:00 0.22% top 863 gg38877 1 49 0 67M 13M sleep 2:24 0.18% gnome-netstatus 2758 gg38877 14 59 0 143M 83M sleep 0:41 0.17% java (snip) gg38877:who:/export/home/gg38877: [18] uname -a SunOS who 5.10 Generic_118822-02 sun4u sparc SUNW,Sun-Blade-100
Created attachment 23069 [details] netbeans log file
It looks like the termination is badly implemented. It's reproducible also on Linux... The java process that is being debugged constinues somehow, the debugger session is also not stopped. Deprecated Thread.stop() is used to terminate the debugger process, the attached exception was thrown..
Created attachment 23129 [details] java.lang.ThreadDeath when debugger was terminated.
The Processes node in Runtime is gone in 6.0. It's best to finish the debugger from Run/Finish Debugger Session. Using Build/Stop build does not finish the debugger.
*** Issue 65621 has been marked as a duplicate of this issue. ***
Changing TM for open issues.
AFAIK process termination works fine now, please verify.