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 186629 - Output not displayed after running ruby from <exec>
Summary: Output not displayed after running ruby from <exec>
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Output Window (show other bugs)
Version: 7.0
Hardware: All All
: P2 normal (vote)
Assignee: Jesse Glick
URL: https://issues.apache.org/bugzilla/sh...
Keywords: REGRESSION
Depends on:
Blocks: 185375
  Show dependency tree
 
Reported: 2010-05-24 20:18 UTC by converginglight
Modified: 2010-06-23 14:37 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Ant 1.8.1 ran from command line (works). (3.04 KB, text/plain)
2010-05-24 22:47 UTC, converginglight
Details
Reproduction of the bug. (13.71 KB, application/x-gzip)
2010-05-24 23:27 UTC, converginglight
Details
Reproduction of the bug. (13.71 KB, application/x-gzip)
2010-05-24 23:30 UTC, converginglight
Details

Note You need to log in before you can comment on or make changes to this bug.
Description converginglight 2010-05-24 20:18:42 UTC
Building an Ant project (wwhich uses a -pre-compile target to generate sources) stops before it's finished.

Every time when this issue is encountered, the command `top` shows that `java` is using 100% CPU for about 5-10sec, then it goes to 0%, but the build is not finished.

On my two (nearly identical) Opensuse 11.2 x64 systems, this issue is present for Netbeans trunk 2010-05-19 and later. But trunk 2010-05-18 is OK.

Some other project, which also generates sources in -pre-compile, is, strangely, always OK.

This is the -pre-compile definition:
--------------------------------------------------
<target name="-pre-compile">
	<mkdir dir="${build.generated.sources.dir}/gen/ranges"/>
	<exec executable="ruby" failonerror="true">
		<env key="outputDir" value="${build.generated.sources.dir}/gen/ranges/"/>
		<env key="execDir" value="${src.dir}/ranges/GEN/"/>
		<arg value="${src.dir}/ranges/GEN/RangeCaller.rb"/>
	</exec>
</target>
--------------------------------------------------

This is the build output:
--------------------------------------------------
init:
deps-clean:
Updating property file: /my-projects/RangesLibrary/build/built-clean.properties
Deleting directory /my-projects/RangesLibrary/build
clean:
init:
deps-jar:
Created dir: /my-projects/RangesLibrary/build
Updating property file: /my-projects/RangesLibrary/build/built-jar.properties
Created dir: /my-projects/RangesLibrary/build/classes
Created dir: /my-projects/RangesLibrary/build/generated-sources/gen/ranges

[here, it stops.]
--------------------------------------------------
Comment 1 Jesse Glick 2010-05-24 20:57:25 UTC
Probably an issue with Ant 1.8.1, bundled around that time. Do you have a minimal, self-contained test case to reproduce? What does jstack say it is waiting for?

BTW you probably want to be using the 'location' attr in place of 'value'.
Comment 2 converginglight 2010-05-24 21:36:00 UTC
> Probably an issue with Ant 1.8.1, bundled around that time.
You mean, Ant 1.8.1 was bundled after trunk 2010-05-18?

Here, I hope jstack output helps:

--------------------------------------------------
# jstack `pgrep java`

2010-05-24 23:27:53
Full thread dump Java HotSpot(TM) 64-Bit Server VM (19.0-b01 mixed mode):

"exec_RangeLibrary (clean,jar)_3" prio=10 tid=0x00007f1430192000 nid=0x3b1e runnable [0x00007f142737f000]
   java.lang.Thread.State: RUNNABLE
        at java.io.File.<init>(File.java:343)
        at org.apache.tools.ant.util.FileUtils.resolveFile(FileUtils.java:572)
        at org.apache.tools.ant.taskdefs.Zip.addResources(Zip.java:942)
        at org.apache.tools.ant.taskdefs.Zip.addResources(Zip.java:1064)
        at org.apache.tools.ant.taskdefs.Zip.executeMain(Zip.java:664)
        at org.apache.tools.ant.taskdefs.Zip.execute(Zip.java:568)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:613)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:390)
        at org.apache.tools.ant.Target.performTasks(Target.java:411)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1366)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
        at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:282)
        at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:539)
        - locked <0x00000000fea07fc0> (a org.apache.tools.ant.module.run.TargetExecutor)
        at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:154)

"Attach Listener" daemon prio=10 tid=0x000000000112d000 nid=0x3ae6 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Inactive RequestProcessor thread [Was:Java Task Provider/org.netbeans.modules.parsing.impl.indexing.errors.TaskProvider$Work]" daemon prio=10 tid=0x00007f14301d2800 nid=0x3ac0 in Object.wait() [0x00007f142ec0d000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000fe9841e8> (a java.lang.Object)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1910)
        - locked <0x00000000fe9841e8> (a java.lang.Object)

"Refresh-After-WindowActivated" daemon prio=10 tid=0x0000000001059800 nid=0x3aae in Object.wait() [0x00007f142f01d000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000e7c7feb8> (a java.lang.ThreadLocal)
        at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.waitIOLoadLowerThan(FileChangedManager.java:207)
        - locked <0x00000000e7c7feb8> (a java.lang.ThreadLocal)
        at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.pingIO(FileChangedManager.java:236)
        at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.checkRead(FileChangedManager.java:111)
        at org.netbeans.TopSecurityManager.notifyRead(TopSecurityManager.java:179)
        at org.netbeans.TopSecurityManager.checkRead(TopSecurityManager.java:302)
        at java.io.File.isDirectory(File.java:795)
        at java.io.File.toURI(File.java:702)
        at org.openide.filesystems.FileUtil.normalizeFileOnUnixAlike(FileUtil.java:1700)
        at org.openide.filesystems.FileUtil.normalizeFile(FileUtil.java:1687)
        at org.openide.filesystems.FileUtil$Holder.locateCurrent(FileUtil.java:404)
        at org.openide.filesystems.FileUtil$Holder.someChange(FileUtil.java:441)
        - locked <0x00000000e8a2ea38> (a org.openide.filesystems.FileUtil$Holder)
        at org.openide.filesystems.FileUtil$Holder.fileDeleted(FileUtil.java:480)
        at org.openide.filesystems.FCLSupport$DispatchEventWrapper.dispatchEventImpl(FCLSupport.java:148)
        at org.openide.filesystems.FCLSupport$DispatchEventWrapper.dispatchEvent(FCLSupport.java:128)
        at org.openide.filesystems.FCLSupport.dispatchEvent(FCLSupport.java:105)
        at org.openide.filesystems.FileObject$ED.dispatch(FileObject.java:1076)
        at org.openide.filesystems.FileSystem$EventDispatcher.run(FileSystem.java:915)
        at org.openide.filesystems.EventControl.dispatchEvent(EventControl.java:82)
        at org.openide.filesystems.FileSystem.dispatchEvent(FileSystem.java:577)
        at org.openide.filesystems.FileObject.dispatchEvent(FileObject.java:534)
        at org.openide.filesystems.FileObject.fireFileDeletedEvent(FileObject.java:510)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.BaseFileObj.fireFileDeletedEvent(BaseFileObj.java:568)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj.refreshImpl(FolderObj.java:426)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj.refreshImpl(FolderObj.java:392)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.BaseFileObj.refresh(BaseFileObj.java:680)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj.refresh(FolderObj.java:438)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObjectFactory.refresh(FileObjectFactory.java:514)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObjectFactory.refresh(FileObjectFactory.java:487)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObjectFactory.refreshAll(FileObjectFactory.java:434)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObjectFactory$1.run(FileObjectFactory.java:696)
        at org.netbeans.modules.masterfs.filebasedfs.FileBasedFileSystem.runAsInconsistent(FileBasedFileSystem.java:105)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObjectFactory.refresh(FileObjectFactory.java:703)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.RootObj.invokeRefreshFor(RootObj.java:194)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.RefreshSlow.run(RefreshSlow.java:70)
        at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.idleIO(FileChangedManager.java:179)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.RefreshSlow.run(RefreshSlow.java:68)
        at org.netbeans.core.ui.warmup.MenuWarmUpTask$NbWindowsAdapter.run(MenuWarmUpTask.java:294)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1957)

"org.apache.tools.ant.module.run.TargetExecutor" daemon prio=10 tid=0x00000000015df800 nid=0x3aab in Object.wait() [0x00007f142f21f000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000feaf05d8> (a org.netbeans.core.execution.ExecutorTaskImpl)
        at java.lang.Object.wait(Object.java:502)
        at org.openide.util.Task.waitFinished(Task.java:133)
        - locked <0x00000000feaf05d8> (a org.netbeans.core.execution.ExecutorTaskImpl)
        at org.apache.tools.ant.module.run.TargetExecutor$WrapperRunnable.run(TargetExecutor.java:422)
        at org.openide.util.Task.run(Task.java:248)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1957)

"Timer-1" prio=10 tid=0x00000000017aa000 nid=0x3a95 in Object.wait() [0x00007f142179d000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000e8994680> (a java.util.TaskQueue)
        at java.lang.Object.wait(Object.java:502)
        at java.util.TimerThread.mainLoop(Timer.java:526)
        - locked <0x00000000e8994680> (a java.util.TaskQueue)
        at java.util.TimerThread.run(Timer.java:505)

"Parsing & Indexing Loop (201005241008)" daemon prio=10 tid=0x00007f14314cc800 nid=0x3a93 waiting on condition [0x00007f142628a000]
   java.lang.Thread.State: WAITING (parking)
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for  <0x00000000e8b83b98> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
        at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
        at java.util.concurrent.PriorityBlockingQueue.take(PriorityBlockingQueue.java:248)
        at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:573)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:717)

"DestroyJavaVM" prio=10 tid=0x00007f1430196800 nid=0x3a6d waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"AWT-EventQueue-1" prio=10 tid=0x00007f1431777800 nid=0x3a88 waiting on condition [0x00007f142758d000]
   java.lang.Thread.State: WAITING (parking)
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for  <0x00000000e7492e40> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
        at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
        at java.awt.EventQueue.getNextEvent(EventQueue.java:516)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:222)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:170)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:160)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:155)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:136)

"TimerQueue" daemon prio=10 tid=0x0000000000917800 nid=0x3a87 waiting on condition [0x00007f142d707000]
   java.lang.Thread.State: TIMED_WAITING (parking)
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for  <0x00000000e83556b0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
        at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2077)
        at java.util.concurrent.DelayQueue.take(DelayQueue.java:220)
        at javax.swing.TimerQueue.run(TimerQueue.java:171)
        at java.lang.Thread.run(Thread.java:717)

"Thread-2" daemon prio=10 tid=0x0000000001455000 nid=0x3a86 in Object.wait() [0x00007f14279a1000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000e7c44100> (a java.util.LinkedList)
        at java.lang.Object.wait(Object.java:502)
        at java.util.prefs.AbstractPreferences$EventDispatchThread.run(AbstractPreferences.java:1478)
        - locked <0x00000000e7c44100> (a java.util.LinkedList)

"AWT-Shutdown" prio=10 tid=0x0000000000916000 nid=0x3a81 in Object.wait() [0x00007f142d908000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000e7494680> (a java.lang.Object)
        at java.lang.Object.wait(Object.java:502)
        at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:287)
        - locked <0x00000000e7494680> (a java.lang.Object)
        at java.lang.Thread.run(Thread.java:717)

"AWT-XAWT" daemon prio=10 tid=0x000000000087f000 nid=0x3a80 runnable [0x00007f142e1f0000]
   java.lang.Thread.State: RUNNABLE
        at sun.awt.X11.XToolkit.waitForEvents(Native Method)
        at sun.awt.X11.XToolkit.run(XToolkit.java:625)
        at sun.awt.X11.XToolkit.run(XToolkit.java:589)
        at java.lang.Thread.run(Thread.java:717)

"Java2D Disposer" daemon prio=10 tid=0x00007f14301e3800 nid=0x3a7f in Object.wait() [0x00007f142ea0c000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000e75008a8> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)
        - locked <0x00000000e75008a8> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)
        at sun.java2d.Disposer.run(Disposer.java:145)
        at java.lang.Thread.run(Thread.java:717)

"CLI Requests Server" daemon prio=10 tid=0x00007f1430197800 nid=0x3a7a runnable [0x00007f142f420000]
   java.lang.Thread.State: RUNNABLE
        at java.net.PlainSocketImpl.socketAccept(Native Method)
        at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:375)
        at java.net.ServerSocket.implAccept(ServerSocket.java:513)
        at java.net.ServerSocket.accept(ServerSocket.java:481)
        at org.netbeans.CLIHandler$Server.run(CLIHandler.java:999)

"Active Reference Queue Daemon" daemon prio=10 tid=0x00007f14300d3800 nid=0x3a79 in Object.wait() [0x00007f1434c06000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000e74dc620> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)
        - locked <0x00000000e74dc620> (a java.lang.ref.ReferenceQueue$Lock)
        at org.openide.util.lookup.implspi.ActiveQueue$Impl.run(ActiveQueue.java:59)
        at java.lang.Thread.run(Thread.java:717)

"Timer-0" daemon prio=10 tid=0x00000000007d0800 nid=0x3a78 in Object.wait() [0x00007f1434e07000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000e7493538> (a java.util.TaskQueue)
        at java.util.TimerThread.mainLoop(Timer.java:552)
        - locked <0x00000000e7493538> (a java.util.TaskQueue)
        at java.util.TimerThread.run(Timer.java:505)

"Low Memory Detector" daemon prio=10 tid=0x00007f1430001800 nid=0x3a76 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"CompilerThread1" daemon prio=10 tid=0x0000000000693000 nid=0x3a75 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"CompilerThread0" daemon prio=10 tid=0x0000000000690000 nid=0x3a74 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" daemon prio=10 tid=0x000000000068e000 nid=0x3a73 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Finalizer" daemon prio=10 tid=0x000000000066a800 nid=0x3a72 in Object.wait() [0x00007f1435754000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000e722ae78> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)
        - locked <0x00000000e722ae78> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)
        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:177)

"Reference Handler" daemon prio=10 tid=0x0000000000669000 nid=0x3a71 in Object.wait() [0x00007f1435955000]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00000000e722ae10> (a java.lang.ref.Reference$Lock)
        at java.lang.Object.wait(Object.java:502)
        at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:133)
        - locked <0x00000000e722ae10> (a java.lang.ref.Reference$Lock)

"VM Thread" prio=10 tid=0x0000000000664800 nid=0x3a70 runnable 

"GC task thread#0 (ParallelGC)" prio=10 tid=0x0000000000615800 nid=0x3a6e runnable 

"GC task thread#1 (ParallelGC)" prio=10 tid=0x0000000000617800 nid=0x3a6f runnable 

"VM Periodic Task Thread" prio=10 tid=0x00007f1430004800 nid=0x3a77 waiting on condition 

JNI global references: 2764
Comment 3 Jesse Glick 2010-05-24 22:01:56 UTC
(In reply to comment #2)
> You mean, Ant 1.8.1 was bundled after trunk 2010-05-18?

Yes, around then.

> Here, I hope jstack output helps:

Partially. (By the way, long sequences of text like this are better included as attachments than inline.)

> "exec_RangeLibrary (clean,jar)_3" prio=10 tid=0x00007f1430192000 nid=0x3b1e
> runnable [0x00007f142737f000]
>    java.lang.Thread.State: RUNNABLE
>         at java.io.File.<init>(File.java:343)
>         at org.apache.tools.ant.util.FileUtils.resolveFile(FileUtils.java:572)
>         at org.apache.tools.ant.taskdefs.Zip.addResources(Zip.java:942)
>         at org.apache.tools.ant.taskdefs.Zip.addResources(Zip.java:1064)
>         at org.apache.tools.ant.taskdefs.Zip.executeMain(Zip.java:664)
>         at org.apache.tools.ant.taskdefs.Zip.execute(Zip.java:568)
> ...

So it looks like the File constructor is simply hanging. (strace would tell you if there is continued I/O activity.) Not sure what else to suggest, pending a way to reproduce.
Comment 4 Jesse Glick 2010-05-24 22:02:49 UTC
BTW you can try reproducing with command-line Ant 1.8.0 vs. 1.8.1; you can also switch the version of Ant that NB runs (the right Options panel can be opened using a button on the Ant output window).
Comment 5 converginglight 2010-05-24 22:47:42 UTC
Created attachment 99409 [details]
Ant 1.8.1 ran from command line (works).
Comment 6 converginglight 2010-05-24 23:27:42 UTC
Created attachment 99410 [details]
Reproduction of the bug.

I have managed copy my project, remove all irrelevant files, and to reproduce the bug.

Please note: though the build output "hangs", the class files and the ".jar" are produced. That is not the problem.

The problem is: should other projects depend on this one (as it is the case in the original project, which caused the problem initially), the "hanging" prevents those dependent projects from being built.
Comment 7 converginglight 2010-05-24 23:30:19 UTC
Created attachment 99411 [details]
Reproduction of the bug.

I have managed copy my project, remove all irrelevant files, and to reproduce the bug.

Please note: though the build output "hangs", the class files and the ".jar" are produced. That is not the problem.

The problem is: should other projects depend on this one (as it is the case in the original project, which caused the problem initially), the "hanging" prevents those dependent projects from being built.
Comment 8 converginglight 2010-05-24 23:33:42 UTC
Sorry for the duplicate attachment and comment.

Please note: To be able to build this project, one needs Ruby (with the binaries "ruby" and "erb" in path; erb is included in standard ruby distributions).

I have tested it with Ruby 1.8.x and 1.9.x.
Same effect: bug is being reproduced successfully.
Comment 9 converginglight 2010-05-24 23:42:07 UTC
Further notes:

1)
Building the attached project (Bug186629.tar.gz) with Ant 1.8.1 from command-line WORKS (same as for original project). So it must be something inside Netbeans, right?

2)
The Ant output is not so interesting, but if you need this, it's the first (and now obsolete) attachment, which is from the original project, but it looks same.

3)
"ruby" and "erb" binaries are needed to generate the template classes during the -pre-compile target. There is NO dependency on any Ruby stuff in this project from the aspect of Netbeans'. It's usual "Java Class Library Ant Project".
Comment 10 Jesse Glick 2010-05-25 16:20:37 UTC
For me (current Ubuntu) there is no real hang - nothing remaining in thread dump, and progress bar finishes and status bar says build finished. But messages following the execution of ruby are not printed to the output window. Perhaps something changed with stream handling in Ant 1.8.1.
Comment 11 Jesse Glick 2010-05-25 16:23:19 UTC
Workaround is just to switch Ant version in IDE to 1.8.0.
Comment 12 Jesse Glick 2010-05-25 16:33:15 UTC
Regression caused by a fix of an Ant bug; reverting that patch in Ant dev trunk fixes the problem.
Comment 13 Jesse Glick 2010-05-25 16:41:54 UTC
Could ship a binary patch if the upstream issue is not fixed and Ant 1.8.2 released before the next NB code freeze.
Comment 14 converginglight 2010-05-25 17:17:59 UTC
In Tools->Options->Misc.->Ant :

I've switched to a local (non-bundled) installation of Ant 1.8.1 (original release from apache). This fixes the bug.

Does it mean that Netbeans' bundled Ant 1.8.1 is not the "real" 1.8.1 ?

In this case, one could add a warning message:
"This copy of Ant is not genuine" ;)
Comment 15 Jesse Glick 2010-05-26 21:22:55 UTC
(In reply to comment #14)
> I've switched to a local (non-bundled) installation of Ant 1.8.1 (original
> release from apache). This fixes the bug.

Not for me; has same behavior as bundled version, whereas using 1.8.0 (original release) is OK.
Comment 16 converginglight 2010-05-27 09:43:00 UTC
This is everything strange. I sum up, what works for me, what doesn't, and under which circumstances:

CASE 1:
Building the attached bug reproduction project.
CASE 2:
Building my original project AND some project which depend on it.

1) Netbeans 20100518
- CASE 1:  WORKS
- CASE 2:  WORKS

2) Netbeans NEWER than 20100518, BUNDLED Ant 1.8.1
- CASE 1:  DOESN'T WORK
- CASE 2:  DOESN'T WORK

3) Netbeans NEWER than 20100518, EXTERNAL Ant 1.8.1
- CASE 1:  WORKS
- CASE 2:  DOESN'T WORK

4) Netbeans NEWER than 20100518, EXTERNAL Ant 1.8.0
- CASE 1:  WORKS
- CASE 2:  WORKS

5) Command-line external Ant, both versions 1.8.0 AND 1.8.1
- CASE 1:  WORKS
- CASE 2:  WORKS
Comment 17 Jesse Glick 2010-05-28 14:58:28 UTC
In core.output2, OutWriter.write is getting an AsynchronousCloseException during a write to storage, so onWriteException() is called and this shuts down output. I am not really sure what caused the channel to be closed. (I tried using -J-Dnb.output.heap=true but this appeared to be completely broken.)
Comment 18 Jesse Glick 2010-05-28 16:46:58 UTC
Seems to be a bug in the Output Window tickled by use of Thread.interrupt from Ant's PumpStreamHandler.
Comment 19 Jesse Glick 2010-05-28 16:48:05 UTC
core-main #2b7a5ca8062b
Comment 20 Jesse Glick 2010-05-28 16:48:50 UTC
Reproducible also on XP, though somewhat less often.
Comment 21 converginglight 2010-05-28 17:19:38 UTC
Great to see, that it is fixed now!

Please, allow me to ask: Since which trunk this fix will be included? Will it be in Netbeans 6.9? I'm asking because of the "NO69" tag.
Comment 22 Jesse Glick 2010-05-28 17:25:11 UTC
(In reply to comment #21)
> Great to see, that it is fixed now!

I think it is. You should verify or reopen when getting a dev build with the fix.

(Note that I will be on vacation next week.)

> Since which trunk [build] this fix will be included?

I cannot predict that in advance, but when a nightly build is made which includes the fix, a note will be appended to this issue automatically with details including the build number.

> Will it be in Netbeans 6.9?

No, because 6.9 does not bundle Ant 1.8.1 and is not known to exhibit the problem.
Comment 23 Quality Engineering 2010-05-30 07:10:10 UTC
Integrated into 'main-golden', will be available in build *201005300001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/2b7a5ca8062b
User: Jesse Glick <jglick@netbeans.org>
Log: #186629: Output not displayed after running ruby from <exec>
Comment 24 rbalada 2010-06-18 06:06:41 UTC
Please verify this bugfix asap.
Thanks,
-R
Comment 25 rbalada 2010-06-21 16:01:13 UTC
Please verify bugfix for this bug, so it can be integrated into release691 repository.

Thanks,
-R
Comment 26 Jesse Glick 2010-06-22 16:48:45 UTC
Reporter is not responding to requests to verify. Can I get someone from QE to try to reproduce this (in older post-6.9 dev builds, or 6.9.1 builds, or 6.9 with Ant 1.8.1 manually configured) and verify the fix in current dev builds?
Comment 27 Marian Mirilovic 2010-06-23 11:46:20 UTC
I can't reproduce mentioned problems with NB Dev 20100621 ... verified
Comment 28 rbalada 2010-06-23 14:37:19 UTC
main #2b7a5ca8062b transplanted to release691 #4beda6429067