[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[hudson-dev] Hudson Test results being loaded from disk
|
Hi
As discussed on todays call, Hudson does hold at least part of the
Test Result for a build behind a WeakReference which will get garbage
collected. So if someone like us creates a plugin which accesses it
frequently, it will get reloaded all the time.
Reloading is of course slow and causes request threads to hang. Here
is a example of a reload which happens when getResult finds a garbage
collected WeakReference
java.lang.Thread.State: RUNNABLE
at java.io.FileInputStream.readBytes(Native Method)
at java.io.FileInputStream.read(FileInputStream.java:199)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
- locked <0x00002aab3e6dc4a0> (a java.io.InputStreamReader)
at java.io.InputStreamReader.read(InputStreamReader.java:167)
at java.io.BufferedReader.read1(BufferedReader.java:185)
at java.io.BufferedReader.read(BufferedReader.java:261)
- locked <0x00002aab3e6dc4a0> (a java.io.InputStreamReader)
at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:2992)
at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046)
at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1410)
at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395)
at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:109)
at com.thoughtworks.xstream.io.xml.AbstractPullReader.readRealEvent(AbstractPullReader.java:148)
at com.thoughtworks.xstream.io.xml.AbstractPullReader.readEvent(AbstractPullReader.java:141)
at com.thoughtworks.xstream.io.xml.AbstractPullReader.move(AbstractPullReader.java:118)
at com.thoughtworks.xstream.io.xml.AbstractPullReader.moveDown(AbstractPullReader.java:103)
at com.thoughtworks.xstream.io.xml.XppReader.<init>(XppReader.java:63)
at com.thoughtworks.xstream.io.xml.AbstractXppDriver.createReader(AbstractXppDriver.java:58)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:894)
at hudson.XmlFile.read(XmlFile.java:128)
at hudson.tasks.junit.TestResultAction.load(TestResultAction.java:147)
at hudson.tasks.junit.TestResultAction.getResult(TestResultAction.java:104)
- locked <0x00002aab2c9d6b20> (a hudson.tasks.junit.TestResultAction)
<<<<<<<<<<<< Other request threads will wait for this
lock
at hudson.tasks.junit.TestResultAction.getFailedTests(TestResultAction.java:138)
at org.xxxxxxx.hudson.TestResult.getTestResults(TestResult.java:54)
<<<<<<<<<<<< this is our class calling hudson
Best regards
Henrik