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 153431 - Stale ForkedJavaOverride.Copier threads
Summary: Stale ForkedJavaOverride.Copier threads
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: t_h
URL:
Keywords: THREAD
Depends on: 172523 186063
Blocks:
  Show dependency tree
 
Reported: 2008-11-18 23:39 UTC by Jesse Glick
Modified: 2010-05-13 14:56 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2008-11-18 23:39:20 UTC
I took a thread dump of the IDE today (081117) and noticed four threads that looked like this:

"org.apache.tools.ant.module.bridge.impl.ForkedJavaOverride" daemon prio=10 tid=0x09b4f800 nid=0x3b95 in Object.wait()
[0xb1bfd000..0xb1bfe0b0]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Object.java:485)
	at org.netbeans.core.output2.NbIO$IOReader.read(NbIO.java:354)
	- locked <0x6e733a98> (a java.lang.StringBuffer)
	at org.openide.util.io.ReaderInputStream.read(ReaderInputStream.java:87)
	at org.apache.tools.ant.module.run.TargetExecutor$2.read(TargetExecutor.java:459)
	at java.io.FilterInputStream.read(FilterInputStream.java:66)
	at org.apache.tools.ant.module.bridge.impl.ForkedJavaOverride$Copier.run(ForkedJavaOverride.java:202)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:573)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1005)

No Ant process was running at the time (or recently).

Note that Ant execution uses the ExecutionEngine, which automatically kills off threads in the same thread group. This
does not apply to RequestProcessor, which explicitly creates threads in the top-level thread group.

Using RP for Copier.flusher is probably OK, since it cannot survive long. But there is no reason that I can see to use
RP for in/out/errTask. Just create new Thread's for these. They should all be killed when the Ant process ends.
Comment 1 t_h 2008-11-19 16:09:08 UTC
20e346237b8f
Comment 2 Quality Engineering 2008-11-20 04:45:08 UTC
Integrated into 'main-golden', will be available in build *200811200201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/20e346237b8f
User: Tomas Holy <t_h@netbeans.org>
Log: #153431: Stale ForkedJavaOverride.Copier threads