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.

Bug 18053 - Terminate externally executed procsess causes JVM freeze [JDK1.4]
Summary: Terminate externally executed procsess causes JVM freeze [JDK1.4]
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: PC Linux
: P1 blocker (vote)
Assignee: Petr Hrebejk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-11-23 15:32 UTC by David Strupl
Modified: 2008-12-22 16:16 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Thread dump after the freeze (13.41 KB, text/plain)
2001-11-23 15:34 UTC, David Strupl
Details
patch against release33 to fix the bug (4.71 KB, patch)
2001-11-26 16:18 UTC, _ ttran
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Strupl 2001-11-23 15:32:45 UTC
Steps to reproduce:
1. Run MemoryView with External execution
2. try to "Terminate" the process from the runtime tab

Will attach the thread dump - JVM is creating more and more Terminator threads!
Comment 1 David Strupl 2001-11-23 15:34:06 UTC
Created attachment 3561 [details]
Thread dump after the freeze
Comment 2 David Strupl 2001-11-23 15:38:03 UTC
More details:
Using [JDK 1.4 b87]
NB dev build from 20011123
and the problem is around
org.netbeans.core.CoronaClipboard.getContents(CoronaClipboard.java:174)

Comment 3 _ ttran 2001-11-23 16:29:54 UTC
fixed in release33 branch, will be merged into trunk later.
Comment 4 David Strupl 2001-11-23 16:48:43 UTC
Even with the fix this can be reproduced.
Comment 5 David Strupl 2001-11-23 16:57:06 UTC
When the same is done with JDK 1.3.1_01 you get this exception
and the process is not stopped.

Fri Nov 23 17:48:55 CET 2001: java.lang.IllegalMonitorStateException:
<no message>
java.lang.IllegalMonitorStateException
[catch] at sun.awt.motif.SelectionThread.run(X11Selection.java:312)&Z

If you do this and exit the IDE the MemoryView is still running.
Comment 6 _ ttran 2001-11-23 17:27:21 UTC
Peter, please investigate.  We know that Thread.stop() is not safe but
what we can use instead?
Comment 7 _ ttran 2001-11-25 12:54:56 UTC
On my Linux 2.4.15 + JDK 1.3.1_01 I does not see any exception but
"Terminate Process" really does not have any effect on the externally
executed process.
Comment 8 Jan Zajicek 2001-11-26 15:16:01 UTC
Just CCing me.
Comment 9 _ ttran 2001-11-26 16:18:38 UTC
Created attachment 3573 [details]
patch against release33 to fix the bug
Comment 10 _ ttran 2001-11-26 16:29:51 UTC
fixed in release33 branch and marked as a candidate for NB 3.3.0. 
Hrebejk, please review the fix.  Also look at ProcessExecutor class. 
It's ugly to my tastes.
Comment 11 David Strupl 2001-11-26 17:18:25 UTC
The process is killed now. But on JDK1.4-rc-b87 the JVM still hangs in
my setup.
Comment 12 _ ttran 2001-11-30 16:46:00 UTC
merged release33 -> release330
Comment 13 Jan Zajicek 2001-12-03 12:52:26 UTC
release33 #200111300330

BTW the problem that externaly executed processes are still running
after the ide shutdown still persist. I'll file new issue against this
behaviour.
Comment 14 Quality Engineering 2003-07-01 16:42:02 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.