From: Ronald B. <rb...@rb...> - 2014-03-23 17:10:33
|
Hi David, looks like the usual problem with not synchronzed hashMaps. see here as a starting poing http://stackoverflow.com/questions/17070184/hashmap-stuck-on-get Please open an issue, will try to fix it RBRi On Sun, 23 Mar 2014 17:32:49 +0200 David Michael Gang wrote: > >Hi all, > > >I please need some pointers how to continue this research > >I am using htmlunit 2.15 snapshot. > >My java is hanging with 100 % cpu. > >The jstack gives the following >Full thread dump Java HotSpot(TM) 64-Bit Server VM (14.0-b16 mixed mode): > >"Attach Listener" daemon prio=10 tid=0x00000000471f8800 nid=0x7756 waiting >on condition [0x0000000000000000] > java.lang.Thread.State: RUNNABLE > >"JS executor for com.gargoylesoftware.htmlunit.WebClient@39e32cd6" daemon >prio=10 tid=0x00000000471fc800 nid=0x5e61 waiting on condition >[0x00002ad519ddc000] > java.lang.Thread.State: TIMED_WAITING (sleeping) > at java.lang.Thread.sleep(Native Method) > at >com.gargoylesoftware.htmlunit.javascript.background.DefaultJavaScriptExecutor.run(DefaultJavaScriptExecutor.java:180) > at java.lang.Thread.run(Thread.java:619) > >"JS executor for com.gargoylesoftware.htmlunit.WebClient@62946d22" daemon >prio=10 tid=0x00002ad51c442000 nid=0x5813 waiting on condition >[0x00002ad519ab6000] > java.lang.Thread.State: TIMED_WAITING (sleeping) > at java.lang.Thread.sleep(Native Method) > at >com.gargoylesoftware.htmlunit.javascript.background.DefaultJavaScriptExecutor.run(DefaultJavaScriptExecutor.java:180) > at java.lang.Thread.run(Thread.java:619) > >"Low Memory Detector" daemon prio=10 tid=0x0000000046a47800 nid=0x578a >runnable [0x0000000000000000] > java.lang.Thread.State: RUNNABLE > >"CompilerThread1" daemon prio=10 tid=0x0000000046a44800 nid=0x5789 waiting >on condition [0x0000000000000000] > java.lang.Thread.State: RUNNABLE > >"CompilerThread0" daemon prio=10 tid=0x0000000046a40800 nid=0x5788 waiting >on condition [0x0000000000000000] > java.lang.Thread.State: RUNNABLE > >"Signal Dispatcher" daemon prio=10 tid=0x0000000046a3e800 nid=0x5787 >runnable [0x0000000000000000] > java.lang.Thread.State: RUNNABLE > >"Finalizer" daemon prio=10 tid=0x0000000046a1a000 nid=0x5785 in >Object.wait() [0x00002ad515a1d000] > java.lang.Thread.State: WAITING (on object monitor) > at java.lang.Object.wait(Native Method) > - waiting on <0x00002ad504c5aa28> (a >java.lang.ref.ReferenceQueue$Lock) > at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118) > - locked <0x00002ad504c5aa28> (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=0x0000000046a18000 nid=0x5784 in >Object.wait() [0x00002ad51591c000] > java.lang.Thread.State: WAITING (on object monitor) > at java.lang.Object.wait(Native Method) > - waiting on <0x00002ad504c5baf8> (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 <0x00002ad504c5baf8> (a java.lang.ref.Reference$Lock) > >"main" prio=10 tid=0x0000000046867000 nid=0x577a runnable >[0x00002ad4fbfb4000] > java.lang.Thread.State: RUNNABLE > at java.util.HashMap.get(HashMap.java:303) > at >com.gargoylesoftware.htmlunit.html.HtmlPage.addElement(HtmlPage.java:1875) > at >com.gargoylesoftware.htmlunit.html.HtmlPage.addMappedElement(HtmlPage.java:1850) > at >com.gargoylesoftware.htmlunit.html.HtmlPage.notifyNodeAdded(HtmlPage.java:1793) > at >com.gargoylesoftware.htmlunit.html.DomNode.fireAddition(DomNode.java:1043) > at >com.gargoylesoftware.htmlunit.html.DomNode.appendChild(DomNode.java:937) > at >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.addNodeToRightParent(HTMLParser.java:652) > at >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.startElement(HTMLParser.java:565) > at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown >Source) > at >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.startElement(HTMLParser.java:510) > at >org.cyberneko.html.HTMLTagBalancer.callStartElement(HTMLTagBalancer.java:1164) > at >org.cyberneko.html.HTMLTagBalancer.startElement(HTMLTagBalancer.java:754) > at >org.cyberneko.html.filters.DefaultFilter.startElement(DefaultFilter.java:136) > at >org.cyberneko.html.filters.NamespaceBinder.startElement(NamespaceBinder.java:279) > at >org.cyberneko.html.HTMLScanner$ContentScanner.scanStartElement(HTMLScanner.java:2760) > at >org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2110) > at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:920) > at >org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499) > at >org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452) > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) > at >com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:926) > at >com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:245) > at >com.gargoylesoftware.htmlunit.html.HTMLParser.parseHtml(HTMLParser.java:191) > at >com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java:268) > at >com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:156) > at >com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:455) > at >com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:329) > at >com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:394) > ... > > >"VM Thread" prio=10 tid=0x0000000046a11800 nid=0x5783 runnable > >"GC task thread#0 (ParallelGC)" prio=10 tid=0x0000000046871000 nid=0x577b >runnable > >"GC task thread#1 (ParallelGC)" prio=10 tid=0x0000000046872800 nid=0x577c >runnable > >"GC task thread#2 (ParallelGC)" prio=10 tid=0x0000000046874800 nid=0x577d >runnable > >"GC task thread#3 (ParallelGC)" prio=10 tid=0x0000000046876000 nid=0x577e >runnable > >"GC task thread#4 (ParallelGC)" prio=10 tid=0x0000000046878000 nid=0x577f >runnable > >"GC task thread#5 (ParallelGC)" prio=10 tid=0x000000004687a000 nid=0x5780 >runnable > >"GC task thread#6 (ParallelGC)" prio=10 tid=0x000000004687c000 nid=0x5781 >runnable > >"GC task thread#7 (ParallelGC)" prio=10 tid=0x000000004687d800 nid=0x5782 >runnable > >"VM Periodic Task Thread" prio=10 tid=0x0000000046a4a000 nid=0x578b waiting >on condition > >JNI global references: 1142 > >When waiting a couple of seconds and taking the thread dump again the trace >does not change. > >The memory looks fine > > S0 S1 E O P YGC YGCT FGC FGCT GCT > 0.00 75.00 88.28 34.37 73.05 1025 1.798 8 0.842 2.640 > > >I am running on a file of urls, so i cannot pinpoint the line where it gets >stuck. > >What else can i change? > >Thanks, >David > |