Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 0.9.9, JRuby 1.0.0RC1, JRuby 1.0.0RC2
-
Fix Version/s: JRuby 1.1b1
-
Component/s: Core Classes/Modules
-
Labels:None
-
Number of attachments :2
Description
Once in a great while, it seems that some thread test in our suite runs forever. The trace appears to show the main thread yielding and many threads all stopped. I have not traced it any further, and it doesn't seem to be affecting any user applications.
-
- ant_test_thread_problem_dump.txt
- 22/May/07 4:14 PM
- 101 kB
- Charles Oliver Nutter
-
- openwferu_scheduler_test_dump.txt
- 15/Jun/07 12:43 AM
- 25 kB
- John Mettraux
Activity
Moving to 1.0 but marking as a blocker. I just haven't had a chance to find a test case that demonstrates this. It's gotta be some problem with Thread.stop.
I saw it a couple of days ago. Still lurking about. WinXP, Java 6.
Whoever sees this next, please capture and attach a full stack dump. I have not been able to reproduce it myself since I reported this bug.
Got it today:
[junit] Full thread dump Java HotSpot(TM) Client VM (1.6.0-b88-17-release mixed mode, sharing):
[junit] "Ruby Thread9231196" daemon prio=5 tid=0x028e8000 nid=0x18d1000 in Object.wait() [0xb0c89000..0xb0c89cd0]
[junit] java.lang.Thread.State: WAITING (on object monitor)
[junit] JavaThread state: _thread_blocked
[junit] Thread: 0x028e8000 [0x18d1000] State: _at_safepoint _has_called_back 0 _at_poll_safepoint 0
[junit] JavaThread state: _thread_blocked
[junit] at java.lang.Object.wait(Native Method)
[junit] - waiting on <0x13009890> (a java.lang.Object)
[junit] at java.lang.Object.wait(Object.java:485)
[junit] at org.jruby.RubyThread.stop(RubyThread.java:472)
[junit] - locked <0x13009890> (a java.lang.Object)
[junit] at org.jruby.RubyThreadInvokerSstop0.call(Unknown Source)
[junit] at org.jruby.runtime.callback.FastInvocationCallback.execute(FastInvocationCallback.java:49)
[junit] at org.jruby.internal.runtime.methods.SimpleCallbackMethod.call(SimpleCallbackMethod.java:81)
[junit] at org.jruby.evaluator.EvaluationState.callNode(EvaluationState.java:564)
[junit] at org.jruby.evaluator.EvaluationState.evalInternal(EvaluationState.java:206)
[junit] at org.jruby.evaluator.EvaluationState.blockNode(EvaluationState.java:527)
[junit] at org.jruby.evaluator.EvaluationState.evalInternal(EvaluationState.java:200)
[junit] at org.jruby.evaluator.EvaluationState.eval(EvaluationState.java:163)
[junit] at org.jruby.runtime.Block.yield(Block.java:220)
[junit] at org.jruby.runtime.Block.call(Block.java:174)
[junit] at org.jruby.RubyProc.call(RubyProc.java:167)
[junit] at org.jruby.RubyProc.call(RubyProc.java:142)
[junit] at org.jruby.internal.runtime.RubyNativeThread.run(RubyNativeThread.java:73)
[junit] "Low Memory Detector" daemon prio=5 tid=0x0281d000 nid=0x1808400 runnable [0x00000000..0x00000000]
[junit] java.lang.Thread.State: RUNNABLE
[junit] JavaThread state: _thread_blocked
[junit] Thread: 0x0281d000 [0x1808400] State: _at_safepoint _has_called_back 0 _at_poll_safepoint 0
[junit] JavaThread state: _thread_blocked
[junit] "CompilerThread0" daemon prio=9 tid=0x0281b800 nid=0x180a400 waiting on condition [0x00000000..0xb0b06658]
[junit] java.lang.Thread.State: RUNNABLE
[junit] JavaThread state: _thread_blocked
[junit] Thread: 0x0281b800 [0x180a400] State: _at_safepoint _has_called_back 0 _at_poll_safepoint 0
[junit] JavaThread state: _thread_blocked
[junit] "Signal Dispatcher" daemon prio=9 tid=0x0281a800 nid=0x1803e00 waiting on condition [0x00000000..0x00000000]
[junit] java.lang.Thread.State: RUNNABLE
[junit] JavaThread state: _thread_blocked
[junit] Thread: 0x0281a800 [0x1803e00] State: _at_safepoint _has_called_back 0 _at_poll_safepoint 0
[junit] JavaThread state: _thread_blocked
[junit] "Finalizer" daemon prio=8 tid=0x02816000 nid=0x180a000 in Object.wait() [0xb0a04000..0xb0a04cd0]
[junit] java.lang.Thread.State: WAITING (on object monitor)
[junit] JavaThread state: _thread_blocked
[junit] Thread: 0x02816000 [0x180a000] State: _at_safepoint _has_called_back 0 _at_poll_safepoint 0
[junit] JavaThread state: _thread_blocked
[junit] at java.lang.Object.wait(Native Method)
[junit] - waiting on <0x12dc4018> (a java.lang.ref.ReferenceQueue$Lock)
[junit] at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
[junit] - locked <0x12dc4018> (a java.lang.ref.ReferenceQueue$Lock)
[junit] at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
[junit] at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
[junit] "Reference Handler" daemon prio=10 tid=0x02815000 nid=0x1809c00 in Object.wait() [0xb0983000..0xb0983cd0]
[junit] java.lang.Thread.State: WAITING (on object monitor)
[junit] JavaThread state: _thread_blocked
[junit] Thread: 0x02815000 [0x1809c00] State: _at_safepoint _has_called_back 0 _at_poll_safepoint 0
[junit] JavaThread state: _thread_blocked
[junit] at java.lang.Object.wait(Native Method)
[junit] - waiting on <0x12dc40a8> (a java.lang.ref.Reference$Lock)
[junit] at java.lang.Object.wait(Object.java:485)
[junit] at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
[junit] - locked <0x12dc40a8> (a java.lang.ref.Reference$Lock)
[junit] "main" prio=5 tid=0x02802800 nid=0x1805400 runnable [0xb07fc000..0xb0800034]
[junit] java.lang.Thread.State: RUNNABLE
[junit] JavaThread state: _thread_blocked
[junit] Thread: 0x02802800 [0x1805400] State: _call_back _has_called_back 1 _at_poll_safepoint 0
[junit] JavaThread state: _thread_blocked
[junit] at java.lang.ref.ReferenceQueue.poll(ReferenceQueue.java:81)
[junit] - waiting to lock <0x12f03098> (a java.lang.ref.ReferenceQueue$Lock)
[junit] at org.jruby.runtime.ObjectSpace.cleanup(ObjectSpace.java:154)
[junit] - locked <0x12f02240> (a org.jruby.runtime.ObjectSpace)
[junit] at org.jruby.runtime.ObjectSpace.add(ObjectSpace.java:111)
[junit] - locked <0x12f02240> (a org.jruby.runtime.ObjectSpace)
[junit] at org.jruby.RubyObject.<init>(RubyObject.java:137)
[junit] at org.jruby.RubyObject.<init>(RubyObject.java:127)
[junit] at org.jruby.RubyString.<init>(RubyString.java:309)
[junit] at org.jruby.RubyString.<init>(RubyString.java:297)
[junit] at org.jruby.RubyString.newString(RubyString.java:647)
[junit] at org.jruby.Ruby.newString(Ruby.java:1431)
[junit] at org.jruby.RubyThread.status(RubyThread.java:627)
[junit] at org.jruby.RubyThreadInvokerstatus0.call(Unknown Source)
[junit] at org.jruby.runtime.callback.FastInvocationCallback.execute(FastInvocationCallback.java:49)
[junit] at org.jruby.internal.runtime.methods.SimpleCallbackMethod.call(SimpleCallbackMethod.java:81)
[junit] at org.jruby.evaluator.EvaluationState.callNode(EvaluationState.java:564)
[junit] at org.jruby.evaluator.EvaluationState.evalInternal(EvaluationState.java:206)
[junit] at org.jruby.evaluator.EvaluationState.callNode(EvaluationState.java:544)
[junit] at org.jruby.evaluator.EvaluationState.evalInternal(EvaluationState.java:206)
[junit] at org.jruby.evaluator.EvaluationState.notNode(EvaluationState.java:1339)
[junit] at org.jruby.evaluator.EvaluationState.evalInternal(EvaluationState.java:322)
[junit] at org.jruby.evaluator.EvaluationState.whileNode(EvaluationState.java:1756)
[junit] at org.jruby.evaluator.EvaluationState.evalInternal(EvaluationState.java:391)
[junit] at org.jruby.evaluator.EvaluationState.blockNode(EvaluationState.java:527)
[junit] at org.jruby.evaluator.EvaluationState.evalInternal(EvaluationState.java:200)
[junit] at org.jruby.evaluator.EvaluationState.eval(EvaluationState.java:163)
[junit] at org.jruby.internal.runtime.methods.DefaultMethod.internalCall(DefaultMethod.java:160)
[junit] at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:79)
[junit] at org.jruby.RubyObject.callMethod(RubyObject.java:572)
[junit] at org.jruby.RubyObject.callMethod(RubyObject.java:463)
[junit] at org.jruby.RubyObject.send(RubyObject.java:1419)
[junit] at org.jruby.RubyObjectInvokersendxx1.call(Unknown Source)
[junit] at org.jruby.runtime.callback.InvocationCallback.execute(InvocationCallback.java:49)
[junit] at org.jruby.internal.runtime.methods.FullFunctionCallbackMethod.internalCall(FullFunctionCallbackMethod.java:79)
[junit] at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:79)
[junit] at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:70)
[junit] at org.jruby.evaluator.EvaluationState.fCallNode(EvaluationState.java:1019)
[junit] at org.jruby.evaluator.EvaluationState.evalInternal(EvaluationState.java:252)
[junit] at org.jruby.evaluator.EvaluationState.blockNode(EvaluationState.java:527)
[junit] at org.jruby.evaluator.EvaluationState.evalInternal(EvaluationState.java:200)
[junit] at org.jruby.evaluator.EvaluationState.rescueNode(EvaluationState.java:1510)
[junit] at org.jruby.evaluator.EvaluationState.evalInternal(EvaluationState.java:354)
[junit] at org.jruby.evaluator.EvaluationState.ensureNode(EvaluationState.java:980)
[junit] at org.jruby.evaluator.EvaluationState.evalInternal(EvaluationState.java:246)
[junit] at org.jruby.evaluator.EvaluationState.blockNode(EvaluationState.java:527)
[junit] at org.jruby.evaluator.EvaluationState.evalInternal(EvaluationState.java:200)
[junit] at org.jruby.evaluator.EvaluationState.eval(EvaluationState.java:163)
[junit] at org.jruby.internal.runtime.methods.DefaultMethod.internalCall(DefaultMethod.java:160)
[junit] at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:79)
[junit] at org.jruby.evaluator.EvaluationState.callNode(EvaluationState.java:577)
[junit] at org.jruby.evaluator.EvaluationState.evalInternal(EvaluationState.java:206)
[junit] at org.jruby.evaluator.EvaluationState.eval(EvaluationState.java:163)
[junit] at org.jruby.runtime.Block.yield(Block.java:220)
[junit] at org.jruby.runtime.Block.yield(Block.java:186)
[junit] at org.jruby.RubyArray.each(RubyArray.java:1278)
[junit] at org.jruby.RubyArrayInvokereach0.call(Unknown Source)
[junit] at org.jruby.runtime.callback.InvocationCallback.execute(InvocationCallback.java:49)
[junit] at org.jruby.internal.runtime.methods.FullFunctionCallbackMethod.internalCall(FullFunctionCallbackMethod.java:79)
[junit] at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:79)
[junit] at org.jruby.evaluator.EvaluationState.callNode(EvaluationState.java:577)
[junit] at org.jruby.evaluator.EvaluationState.evalInternal(EvaluationState.java:206)
[junit] at org.jruby.evaluator.EvaluationState.blockNode(EvaluationState.java:527)
[junit] at org.jruby.evaluator.EvaluationState.evalInternal(EvaluationState.java:200)
[junit] at org.jruby.evaluator.EvaluationState.eval(EvaluationState.java:163)
[junit] at org.jruby.internal.runtime.methods.DefaultMethod.internalCall(DefaultMethod.java:160)
[junit] at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:79)
[junit] at org.jruby.evaluator.EvaluationState.callNode(EvaluationState.java:577)
[junit] at org.jruby.evaluator.EvaluationState.evalInternal(EvaluationState.java:206)
[junit] at org.jruby.evaluator.EvaluationState.blockNode(EvaluationState.java:527)
[junit] at org.jruby.evaluator.EvaluationState.evalInternal(EvaluationState.java:200)
[junit] at org.jruby.evaluator.EvaluationState.eval(EvaluationState.java:163)
[junit] at org.jruby.internal.runtime.methods.DefaultMethod.internalCall(DefaultMethod.java:160)
[junit] at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:79)
[junit] at org.jruby.evaluator.EvaluationState.callNode(EvaluationState.java:564)
[junit] at org.jruby.evaluator.EvaluationState.evalInternal(EvaluationState.java:206)
[junit] at org.jruby.evaluator.EvaluationState.returnNode(EvaluationState.java:1579)
[junit] at org.jruby.evaluator.EvaluationState.evalInternal(EvaluationState.java:358)
[junit] at org.jruby.evaluator.EvaluationState.eval(EvaluationState.java:163)
[junit] at org.jruby.internal.runtime.methods.DefaultMethod.internalCall(DefaultMethod.java:160)
[junit] at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:79)
[junit] at org.jruby.evaluator.EvaluationState.vcallNode(EvaluationState.java:1746)
[junit] at org.jruby.evaluator.EvaluationState.evalInternal(EvaluationState.java:386)
[junit] at org.jruby.evaluator.EvaluationState.returnNode(EvaluationState.java:1579)
[junit] at org.jruby.evaluator.EvaluationState.evalInternal(EvaluationState.java:358)
[junit] at org.jruby.evaluator.EvaluationState.blockNode(EvaluationState.java:527)
[junit] at org.jruby.evaluator.EvaluationState.evalInternal(EvaluationState.java:200)
[junit] at org.jruby.evaluator.EvaluationState.eval(EvaluationState.java:163)
[junit] at org.jruby.internal.runtime.methods.DefaultMethod.internalCall(DefaultMethod.java:160)
[junit] at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:79)
[junit] at org.jruby.evaluator.EvaluationState.callNode(EvaluationState.java:564)
[junit] at org.jruby.evaluator.EvaluationState.evalInternal(EvaluationState.java:206)
[junit] at org.jruby.evaluator.EvaluationState.blockNode(EvaluationState.java:527)
[junit] at org.jruby.evaluator.EvaluationState.evalInternal(EvaluationState.java:200)
[junit] at org.jruby.evaluator.EvaluationState.rootNode(EvaluationState.java:1601)
[junit] at org.jruby.evaluator.EvaluationState.evalInternal(EvaluationState.java:360)
[junit] at org.jruby.evaluator.EvaluationState.eval(EvaluationState.java:163)
[junit] at org.jruby.Ruby.eval(Ruby.java:277)
[junit] at org.jruby.Ruby.evalScript(Ruby.java:270)
[junit] at org.jruby.test.TestUnitTestSuite$ScriptTest.runTest(TestUnitTestSuite.java:195)
[junit] at junit.framework.TestCase.runBare(TestCase.java:127)
[junit] at junit.framework.TestResult$1.protect(TestResult.java:106)
[junit] at junit.framework.TestResult.runProtected(TestResult.java:124)
[junit] at junit.framework.TestResult.run(TestResult.java:109)
[junit] at junit.framework.TestCase.run(TestCase.java:118)
[junit] at junit.framework.TestSuite.runTest(TestSuite.java:208)
[junit] at junit.framework.TestSuite.run(TestSuite.java:203)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:297)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:672)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:567)
Rare, intermittent issues with ant test won't prevent a release. This is still a major problem that needs to be resolved, but we have had no reports of actual threading problems in real applications. Pragmatism dictates we put more pressing issues at a higher priority.
This isn't hurting anything real, so I'm gonna punt it to post 1.0. I have a few theories about what might be happening, it's just a matter of narrowing down which test/unit test is resulting in this and digging in.
Hi Charles, Hi Thomas,
hope you're enjoying Japan and Kamakura.
So I've been trying to run OpenWFEru on top of JRuby these days and this bug here seems to be a total showstopper. Launching small business processes and playing with them is OK, but I've got a load test that stalls after 10 to 30 launches. I had the impression that a "sleep" call never returned.
I also have a scheduler test (testing this component : http://openwferu.rubyforge.org/scheduler.html ) and half of the time, it blocks.
Seems like you guys have enough test cases for it, I attached one of my dumps anyway (I have the test case at hand if necessary).
Best regards,
John
I haven't seen this one in a long time, but since it's thread-related I would like to get it truly resolved for 1.1. Unfortunately, we have no reliable test case. John Mettraux, do you have anything?
Hi Charles,
please close it.
It was fixed by Nicolas Modrzyk's patch about threads a while ago. ( http://jira.codehaus.org/browse/JRUBY-1157 )
I thought this bug got closed at this point, sorry for the garbage.
Congrats for the compiler.
Reported as fixed on 1.1. I've seen it still happen occasionally on 1.0, but it would be impossible to know which fixes to backport.
I've seen it twice in the last two days, out of perhaps 5-6 "ant test" builds, so I think it's a fairly frequent occurrence. WinXp, Java 6.