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 180358 - Scanning projects for Ruby projects never ends on Netbeans 6.8 for Mac
Summary: Scanning projects for Ruby projects never ends on Netbeans 6.8 for Mac
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: YAML (show other bugs)
Version: 6.x
Hardware: Macintosh (x86) Mac OS X
: P1 normal (vote)
Assignee: Erno Mononen
URL:
Keywords:
: 180172 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-02-05 17:36 UTC by mogman1
Modified: 2010-03-12 09:21 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log file from scanning hang (55.96 KB, text/plain)
2010-02-10 09:51 UTC, mogman1
Details
First two log files dumps that were posted directly into thread (20.63 KB, text/plain)
2010-02-10 10:02 UTC, mogman1
Details
Second thread dump (15.63 KB, text/plain)
2010-02-10 10:04 UTC, mogman1
Details
messages log from second thread dump (55.99 KB, application/octet-stream)
2010-02-10 10:05 UTC, mogman1
Details
development thread dump (106.57 KB, text/plain)
2010-02-11 21:59 UTC, mogman1
Details
development IDE log (98.22 KB, application/octet-stream)
2010-02-11 21:59 UTC, mogman1
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mogman1 2010-02-05 17:36:06 UTC
I've seen a few other bugs regarding scanning, but the difference I'm making here is that this only shows up for Ruby projects and this is only for Netbeans on Mac OS 10.6 (Snow Leopard).  When opening a Ruby project with Netbeans, it starts scanning a project and then it never stops.  I've left it running for about an hour before and it still hadn't finished.  Then when I try to quite Netbeans, the application freezes and I have to force quit it.  Incidentally, while it does this it chews up resources like nobody's business.  For example, it maxes out my CPU and uses around 300MB of memory.

On the other hand, when I open up PHP projects using Netbeans, I have no such scanning problems.  It scans the project for about 30 seconds or so and then is normal (the expected behaviour).  So for whatever reason, this only applies to Ruby projects.

I used Netbeans when I was on Linux (specifically Ubuntu) and I never had this problem with any project (Ruby or PHP).  So this problem is specifically local to the Macintosh version of Netbeans and only with Ruby projects.  So I'm not sure if this is an issue with the Ruby aspect of Netbeans or perhaps a corner case within the IDE itself, but this makes Netbeans basically unusable for me.
Comment 1 mogman1 2010-02-05 17:39:47 UTC
Sorry, I forgot to mention but I also downloaded the OS independent ZIP version and ran that on Macintosh and got the same result.  So it may be less of an issue with the OSX version of Netbeans and more to do with Netbeans running on Mac OSX in general.
Comment 2 Erno Mononen 2010-02-09 02:03:54 UTC
Thanks for the report. Can you please take a couple of thread dumps while the scanning is stalled (http://wiki.netbeans.org/GenerateThreadDump) and attach them here along with the IDE log file (you can view it from View -> IDE Log File or just copy the file from <netbeans_userdir>/var/log/messages.log).
Comment 3 Erno Mononen 2010-02-10 02:33:45 UTC
Waiting for more info, so marking as incomplete for now.
Comment 4 mogman1 2010-02-10 09:46:36 UTC
Thread dump after letting Netbeans run while trying to scan a project.  Please note that even after sending the kill signal, Netbeans still did not actually quit, so hopefully this dump is complete enough.


2010-02-10 09:41:01
Full thread dump Java HotSpot(TM) 64-Bit Server VM (14.3-b01-101 mixed mode):

"Parsing & Indexing Loop (200912041610)" daemon prio=1 tid=0x000000010213f000 nid=0x151731000 runnable [0x000000015172f000]
   java.lang.Thread.State: RUNNABLE
	at java.util.Arrays.copyOfRange(Arrays.java:3209)
	at java.lang.String.<init>(String.java:215)
	at java.lang.StringBuilder.toString(StringBuilder.java:430)
	at org.netbeans.modules.languages.yaml.YamlParser.parse(YamlParser.java:147)
	at org.netbeans.modules.languages.yaml.YamlParser.parse(YamlParser.java:334)
	at org.netbeans.modules.parsing.impl.SourceCache.getResult(SourceCache.java:198)
	at org.netbeans.modules.parsing.api.ResultIterator.getParserResult(ResultIterator.java:134)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work$2.run(RepositoryUpdater.java:1836)
	at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:129)
	at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:113)
	at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:190)
	at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:99)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.indexEmbedding(RepositoryUpdater.java:1819)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.index(RepositoryUpdater.java:1697)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$AbstractRootsWork.scanSource(RepositoryUpdater.java:3138)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$AbstractRootsWork.scanSources(RepositoryUpdater.java:3040)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$RootsWork.getDone(RepositoryUpdater.java:2834)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$InitialRootsWork.getDone(RepositoryUpdater.java:3211)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.doTheWork(RepositoryUpdater.java:1936)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task._run(RepositoryUpdater.java:3510)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task.run(RepositoryUpdater.java:3452)
	at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:574)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:637)

"DestroyJavaVM" prio=5 tid=0x0000000102800800 nid=0x100601000 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"AWT-EventQueue-1" prio=6 tid=0x0000000102241800 nid=0x14ced6000 in Object.wait() [0x000000014ced5000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x000000010a72e700> (a org.netbeans.core.TimableEventQueue)
	at java.lang.Object.wait(Object.java:485)
	at java.awt.EventQueue.getNextEvent(EventQueue.java:515)
	- locked <0x000000010a72e700> (a org.netbeans.core.TimableEventQueue)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:263)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

"TimerQueue" daemon prio=5 tid=0x0000000102a53800 nid=0x14bc17000 in Object.wait() [0x000000014bc16000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x000000010929cfa8> (a javax.swing.TimerQueue)
	at javax.swing.TimerQueue.run(TimerQueue.java:232)
	- locked <0x000000010929cfa8> (a javax.swing.TimerQueue)
	at java.lang.Thread.run(Thread.java:637)

"Thread-3" daemon prio=5 tid=0x0000000102a97800 nid=0x14c8bc000 in Object.wait() [0x000000014c8bb000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x000000010a446660> (a java.util.LinkedList)
	at java.lang.Object.wait(Object.java:485)
	at java.util.prefs.AbstractPreferences$EventDispatchThread.run(AbstractPreferences.java:1461)
	- locked <0x000000010a446660> (a java.util.LinkedList)

"Java2D Disposer" daemon prio=10 tid=0x000000010211f000 nid=0x14ba14000 in Object.wait() [0x000000014ba13000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x00000001090d62f8> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
	- locked <0x00000001090d62f8> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
	at sun.java2d.Disposer.run(Disposer.java:125)
	at java.lang.Thread.run(Thread.java:637)

"AWT-Shutdown" prio=5 tid=0x0000000102946000 nid=0x148c6f000 in Object.wait() [0x0000000148c6e000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x00000001090d6328> (a java.lang.Object)
	at java.lang.Object.wait(Object.java:485)
	at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:259)
	- locked <0x00000001090d6328> (a java.lang.Object)
	at java.lang.Thread.run(Thread.java:637)

"AWT-AppKit" daemon prio=5 tid=0x0000000102afd800 nid=0x7fff70679be0 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Inactive RequestProcessor thread [Was:TimedSoftReference/org.openide.util.TimedSoftReference]" daemon prio=1 tid=0x0000000102991000 nid=0x138510000 in Object.wait() [0x000000013850f000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x00000001091ce2a8> (a java.lang.Object)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1037)
	- locked <0x00000001091ce2a8> (a java.lang.Object)

"CLI Requests Server" daemon prio=5 tid=0x0000000102140000 nid=0x13830d000 runnable [0x000000013830c000]
   java.lang.Thread.State: RUNNABLE
	at java.net.PlainSocketImpl.socketAccept(Native Method)
	at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:390)
	- locked <0x00000001091e2af0> (a java.net.SocksSocketImpl)
	at java.net.ServerSocket.implAccept(ServerSocket.java:453)
	at java.net.ServerSocket.accept(ServerSocket.java:421)
	at org.netbeans.CLIHandler$Server.run(CLIHandler.java:1005)

"Active Reference Queue Daemon" daemon prio=1 tid=0x0000000102990000 nid=0x1380e6000 in Object.wait() [0x00000001380e5000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x00000001091ce458> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
	- locked <0x00000001091ce458> (a java.lang.ref.ReferenceQueue$Lock)
	at org.netbeans.modules.openide.util.ActiveQueue.run(ActiveQueue.java:53)
	at java.lang.Thread.run(Thread.java:637)

"Timer-0" daemon prio=5 tid=0x0000000102a56800 nid=0x137ee3000 in Object.wait() [0x0000000137ee2000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x00000001091cba68> (a java.util.TaskQueue)
	at java.util.TimerThread.mainLoop(Timer.java:509)
	- locked <0x00000001091cba68> (a java.util.TaskQueue)
	at java.util.TimerThread.run(Timer.java:462)

"Low Memory Detector" daemon prio=5 tid=0x0000000102001800 nid=0x137890000 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"CompilerThread1" daemon prio=9 tid=0x00000001028b6800 nid=0x13768d000 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"CompilerThread0" daemon prio=9 tid=0x00000001028b5800 nid=0x13748a000 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" daemon prio=9 tid=0x00000001028b5000 nid=0x137287000 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Surrogate Locker Thread (CMS)" daemon prio=5 tid=0x00000001028b4000 nid=0x137084000 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Finalizer" daemon prio=8 tid=0x000000010289e800 nid=0x136c23000 in Object.wait() [0x0000000136c22000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x0000000109231250> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
	- locked <0x0000000109231250> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
	at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

"Reference Handler" daemon prio=10 tid=0x000000010289d800 nid=0x136a20000 in Object.wait() [0x0000000136a1f000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x00000001090d6340> (a java.lang.ref.Reference$Lock)
	at java.lang.Object.wait(Object.java:485)
	at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
	- locked <0x00000001090d6340> (a java.lang.ref.Reference$Lock)

"VM Thread" prio=9 tid=0x0000000102896800 nid=0x13681d000 runnable 

"Gang worker#0 (Parallel GC Threads)" prio=9 tid=0x0000000102802000 nid=0x106405000 runnable 

"Gang worker#1 (Parallel GC Threads)" prio=9 tid=0x0000000102802800 nid=0x106608000 runnable 

"Concurrent Mark-Sweep GC Thread" prio=9 tid=0x0000000102842000 nid=0x1364bf000 runnable 
"VM Periodic Task Thread" prio=10 tid=0x0000000102002000 nid=0x137a93000 waiting on condition 

"Exception Catcher Thread" prio=10 tid=0x0000000102801800 nid=0x103201000 runnable 
JNI global references: 7536

Heap
 par new generation   total 18624K, used 10116K [0x0000000106610000, 0x0000000107ad0000, 0x0000000108fa0000)
  eden space 16000K,  61% used [0x0000000106610000, 0x0000000106fa1410, 0x00000001075b0000)
  from space 2624K,  12% used [0x0000000107840000, 0x000000010788ff98, 0x0000000107ad0000)
  to   space 2624K,   0% used [0x00000001075b0000, 0x00000001075b0000, 0x0000000107840000)
 concurrent mark-sweep generation total 93984K, used 50697K [0x0000000108fa0000, 0x000000010eb68000, 0x0000000126610000)
 concurrent-mark-sweep perm gen total 101276K, used 60752K [0x0000000126610000, 0x000000012c8f7000, 0x0000000132e10000)





This is the dump that came after sending the kill signal a second time after a couple minutes more (it looks to be the same, but I include it for reference):

2010-02-10 09:45:08
Full thread dump Java HotSpot(TM) 64-Bit Server VM (14.3-b01-101 mixed mode):

"Parsing & Indexing Loop (200912041610)" daemon prio=1 tid=0x000000010213f000 nid=0x151731000 runnable [0x000000015172f000]
   java.lang.Thread.State: RUNNABLE
	at org.netbeans.modules.languages.yaml.YamlParser.parse(YamlParser.java:142)
	at org.netbeans.modules.languages.yaml.YamlParser.parse(YamlParser.java:334)
	at org.netbeans.modules.parsing.impl.SourceCache.getResult(SourceCache.java:198)
	at org.netbeans.modules.parsing.api.ResultIterator.getParserResult(ResultIterator.java:134)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work$2.run(RepositoryUpdater.java:1836)
	at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:129)
	at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:113)
	at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:190)
	at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:99)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.indexEmbedding(RepositoryUpdater.java:1819)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.index(RepositoryUpdater.java:1697)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$AbstractRootsWork.scanSource(RepositoryUpdater.java:3138)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$AbstractRootsWork.scanSources(RepositoryUpdater.java:3040)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$RootsWork.getDone(RepositoryUpdater.java:2834)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$InitialRootsWork.getDone(RepositoryUpdater.java:3211)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.doTheWork(RepositoryUpdater.java:1936)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task._run(RepositoryUpdater.java:3510)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task.run(RepositoryUpdater.java:3452)
	at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:574)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:637)

"DestroyJavaVM" prio=5 tid=0x0000000102800800 nid=0x100601000 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"AWT-EventQueue-1" prio=6 tid=0x0000000102241800 nid=0x14ced6000 in Object.wait() [0x000000014ced5000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x000000010a72e700> (a org.netbeans.core.TimableEventQueue)
	at java.lang.Object.wait(Object.java:485)
	at java.awt.EventQueue.getNextEvent(EventQueue.java:515)
	- locked <0x000000010a72e700> (a org.netbeans.core.TimableEventQueue)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:263)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

"TimerQueue" daemon prio=5 tid=0x0000000102a53800 nid=0x14bc17000 in Object.wait() [0x000000014bc16000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x000000010929cfa8> (a javax.swing.TimerQueue)
	at javax.swing.TimerQueue.run(TimerQueue.java:232)
	- locked <0x000000010929cfa8> (a javax.swing.TimerQueue)
	at java.lang.Thread.run(Thread.java:637)

"Thread-3" daemon prio=5 tid=0x0000000102a97800 nid=0x14c8bc000 in Object.wait() [0x000000014c8bb000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x000000010a446660> (a java.util.LinkedList)
	at java.lang.Object.wait(Object.java:485)
	at java.util.prefs.AbstractPreferences$EventDispatchThread.run(AbstractPreferences.java:1461)
	- locked <0x000000010a446660> (a java.util.LinkedList)

"Java2D Disposer" daemon prio=10 tid=0x000000010211f000 nid=0x14ba14000 in Object.wait() [0x000000014ba13000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x00000001090d62f8> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
	- locked <0x00000001090d62f8> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
	at sun.java2d.Disposer.run(Disposer.java:125)
	at java.lang.Thread.run(Thread.java:637)

"AWT-Shutdown" prio=5 tid=0x0000000102946000 nid=0x148c6f000 in Object.wait() [0x0000000148c6e000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x00000001090d6328> (a java.lang.Object)
	at java.lang.Object.wait(Object.java:485)
	at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:259)
	- locked <0x00000001090d6328> (a java.lang.Object)
	at java.lang.Thread.run(Thread.java:637)

"AWT-AppKit" daemon prio=5 tid=0x0000000102afd800 nid=0x7fff70679be0 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"CLI Requests Server" daemon prio=5 tid=0x0000000102140000 nid=0x13830d000 runnable [0x000000013830c000]
   java.lang.Thread.State: RUNNABLE
	at java.net.PlainSocketImpl.socketAccept(Native Method)
	at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:390)
	- locked <0x00000001091e2af0> (a java.net.SocksSocketImpl)
	at java.net.ServerSocket.implAccept(ServerSocket.java:453)
	at java.net.ServerSocket.accept(ServerSocket.java:421)
	at org.netbeans.CLIHandler$Server.run(CLIHandler.java:1005)

"Active Reference Queue Daemon" daemon prio=1 tid=0x0000000102990000 nid=0x1380e6000 in Object.wait() [0x00000001380e5000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x00000001091ce458> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
	- locked <0x00000001091ce458> (a java.lang.ref.ReferenceQueue$Lock)
	at org.netbeans.modules.openide.util.ActiveQueue.run(ActiveQueue.java:53)
	at java.lang.Thread.run(Thread.java:637)

"Timer-0" daemon prio=5 tid=0x0000000102a56800 nid=0x137ee3000 in Object.wait() [0x0000000137ee2000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x00000001091cba68> (a java.util.TaskQueue)
	at java.util.TimerThread.mainLoop(Timer.java:509)
	- locked <0x00000001091cba68> (a java.util.TaskQueue)
	at java.util.TimerThread.run(Timer.java:462)

"Low Memory Detector" daemon prio=5 tid=0x0000000102001800 nid=0x137890000 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"CompilerThread1" daemon prio=9 tid=0x00000001028b6800 nid=0x13768d000 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"CompilerThread0" daemon prio=9 tid=0x00000001028b5800 nid=0x13748a000 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" daemon prio=9 tid=0x00000001028b5000 nid=0x137287000 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Surrogate Locker Thread (CMS)" daemon prio=5 tid=0x00000001028b4000 nid=0x137084000 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Finalizer" daemon prio=8 tid=0x000000010289e800 nid=0x136c23000 in Object.wait() [0x0000000136c22000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x0000000109231250> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
	- locked <0x0000000109231250> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
	at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

"Reference Handler" daemon prio=10 tid=0x000000010289d800 nid=0x136a20000 in Object.wait() [0x0000000136a1f000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x00000001090d6340> (a java.lang.ref.Reference$Lock)
	at java.lang.Object.wait(Object.java:485)
	at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
	- locked <0x00000001090d6340> (a java.lang.ref.Reference$Lock)

"VM Thread" prio=9 tid=0x0000000102896800 nid=0x13681d000 runnable 

"Gang worker#0 (Parallel GC Threads)" prio=9 tid=0x0000000102802000 nid=0x106405000 runnable 

"Gang worker#1 (Parallel GC Threads)" prio=9 tid=0x0000000102802800 nid=0x106608000 runnable 

"Concurrent Mark-Sweep GC Thread" prio=9 tid=0x0000000102842000 nid=0x1364bf000 runnable 
"VM Periodic Task Thread" prio=10 tid=0x0000000102002000 nid=0x137a93000 waiting on condition 

"Exception Catcher Thread" prio=10 tid=0x0000000102801800 nid=0x103201000 runnable 
JNI global references: 20003

Heap
 par new generation   total 18624K, used 10166K [0x0000000106610000, 0x0000000107ad0000, 0x0000000108fa0000)
  eden space 16000K,  60% used [0x0000000106610000, 0x0000000106f92c88, 0x00000001075b0000)
  from space 2624K,  16% used [0x00000001075b0000, 0x000000010761ad68, 0x0000000107840000)
  to   space 2624K,   0% used [0x0000000107840000, 0x0000000107840000, 0x0000000107ad0000)
 concurrent mark-sweep generation total 93984K, used 57269K [0x0000000108fa0000, 0x000000010eb68000, 0x0000000126610000)
 concurrent-mark-sweep perm gen total 101276K, used 60756K [0x0000000126610000, 0x000000012c8f7000, 0x0000000132e10000)
Comment 5 mogman1 2010-02-10 09:51:02 UTC
Created attachment 94052 [details]
IDE log file from scanning hang
Comment 6 mogman1 2010-02-10 10:02:17 UTC
Created attachment 94053 [details]
First two log files dumps that were posted directly into thread

Sorry, should have just saved these to a file and attached them rather than throw that wall of text straight into the bug report.  This is the exact same thing as was pasted into the bug thread.
Comment 7 mogman1 2010-02-10 10:04:36 UTC
Created attachment 94054 [details]
Second thread dump

This was a second thread dump after force-quitting Netbeans after the first attempt.  The first attempt I waited several minutes before initiating the dump, this dump was made 30 seconds or so after Netbeans started.  I suspect that they are very similar, but I post it here for reference.  Also note that again, Netbeans failed to actually quit after sending the signal via the command line and had to be force-quitted again.
Comment 8 mogman1 2010-02-10 10:05:35 UTC
Created attachment 94056 [details]
messages log from second thread dump
Comment 9 Erno Mononen 2010-02-11 01:53:41 UTC
Thanks for the thread dumps! I need to look at them in more details, but I couldn't see a deadlock there off-hand. In any case the problem seems to in the YAML parser, do you happen to have some exceptionally large yaml files in the project?
Comment 10 Erno Mononen 2010-02-11 01:55:00 UTC
One more thing: can you please whether you see the same problem with the latest daily build (http://bits.netbeans.org/dev/nightly/latest/)? Thanks.
Comment 11 Erno Mononen 2010-02-11 05:46:16 UTC
It seems you have a yaml file in the Rails project that contains some php fragments (starting with <? and ending with ?>), do you think you could attach it here, or send to me directly at erno.mononen at sun.com? Can you also try whether temporarily removing the file from the project would help?
Comment 12 Erno Mononen 2010-02-11 06:50:24 UTC
No need to attach the file here, I created a test case and there is an obvious performance issue in the yaml parser with files that have embedded php. I will push a fix soon. Please just confirm that you indeed have such a file (i.e. yaml with <? ?> in it) in the project - thanks.
Comment 13 Erno Mononen 2010-02-11 07:22:29 UTC
Fixed slow yaml parsing in bfe23bc3699c. The fix greatly improves the performance of parsing yaml files with php fragments; I tested with a large file and it should be about 50000 times faster now (7ms vs. 350000 ms). I'm however leaving the issue open until we can confirm that this was causing the issue in your case.
Comment 14 mogman1 2010-02-11 21:58:23 UTC
There aren't any YML files with any PHP code in them.  However, the project does make use of them fairly extensively for some database testing and in these YML files are some XML documents.  So while that isn't PHP, the XML header is usually '<?xml version="1.0"?>', which might be enough to make Netbeans think it's supposed to be PHP?  I should also point out that some of these files are obscenely large (one topping out over 15K lines and another around 10K lines).  Beyond that, there are no other files that have a PHP-like opening tag.

I should mention that I dug up an old Rails project of mine and loaded that into Netbeans (without the project that is causing me grief).  After about 30-50 seconds, it usually loads fine and the scanning finishes normally, so whatever the issue is, it appears to be localized to something found in this one project and it sounds like these large YML files might be the culprit.  Again, I did have this project working all right under my Linux installation of Netbeans back on my old Linux box.

I installed the nightly build for Netbeans to see if that remedied the problem, but unfortunately I still have the same issue.  I let it run for a good 5-10 minutes for attempting to quit Netbeans, at which point it hung as it had previously and I had to force-quit the application.  I've attached the dump and debug code from the console along with the IDE log for this attempt to the ticket in case they can help you (they are, of course, substantially larger).
Comment 15 mogman1 2010-02-11 21:59:22 UTC
Created attachment 94105 [details]
development thread dump
Comment 16 mogman1 2010-02-11 21:59:51 UTC
Created attachment 94106 [details]
development IDE log
Comment 17 Erno Mononen 2010-02-12 02:20:19 UTC
Thanks for following up. I'm pretty sure that <?xml version="1.0"?> in those large yaml files caused the problems here, the yaml parser (incorrectly) considers that to be embedded php. Before the fix I pushed yesterday parsing a 15K lines file easily took 15-20 mins or more (depending on how many chars there are in the file); after the fix it should be a matter of 10-50 milliseconds. The latest thread dump also shows that parsing is stuck on handling those <? ?> fragments. There should be an automated notification here when the fix has been integrated into the latest daily build (with a download link), please give it a try then and reopen this issue if this still isn't fixed for you - thanks!
Comment 18 Quality Engineering 2010-02-12 21:44:05 UTC
Integrated into 'main-golden', will be available in build *201002130200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/bfe23bc3699c
User: Erno Mononen <emononen@netbeans.org>
Log: #180358 - Scanning projects for Ruby projects never ends on Netbeans 6.8 for Mac
Comment 19 mogman1 2010-02-16 09:18:02 UTC
I just wanted to say that this also worked perfectly for the XML that is embedded in my large YML files, too.  It takes a few minutes to run through the scanning just because of the sheer size of the project, but that is to be expected (as opposed to never being able to finish before).  Thanks so much for your time and dedication on this issue of mine.  I greatly appreciate it and I am sure that many others will be able to benefit from it.
Comment 20 Erno Mononen 2010-03-12 09:21:27 UTC
*** Bug 180172 has been marked as a duplicate of this bug. ***