Skip to content

Instantly share code, notes, and snippets.

@seanguo
Last active December 28, 2015 20:39
Show Gist options
  • Select an option

  • Save seanguo/7559203 to your computer and use it in GitHub Desktop.

Select an option

Save seanguo/7559203 to your computer and use it in GitHub Desktop.
Found one Java-level deadlock:
=============================
"RubyThread-202: <script>:231":
waiting for ownable synchronizer 0x0000000747f66028, (a java.util.concurrent.locks.ReentrantLock$NonfairSync),
which is held by "RubyThread-199: <script>:231"
"RubyThread-199: <script>:231":
waiting for ownable synchronizer 0x0000000747f660a8, (a java.util.concurrent.locks.ReentrantLock$NonfairSync),
which is held by "RubyThread-202: <script>:231"
Java stack information for the threads listed above:
===================================================
"RubyThread-199: <script>:231":
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x0000000747f660a8> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:834)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:867)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1197)
at java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:214)
at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:290)
at org.jruby.javasupport.JavaClass.lockProxy(JavaClass.java:545)
at org.jruby.javasupport.Java.getProxyClass(Java.java:425)
at org.jruby.javasupport.Java.get_proxy_class(Java.java:498)
at org.jruby.javasupport.JavaClass.installClassClasses(JavaClass.java:804)
at org.jruby.javasupport.JavaClass.setupInterfaceModule(JavaClass.java:1072)
at org.jruby.javasupport.Java.getInterfaceModule(Java.java:384)
at org.jruby.javasupport.Java.getInterfaceModule(Java.java:389)
at org.jruby.javasupport.Java.getProxyClass(Java.java:463)
at org.jruby.javasupport.Java.getInstance(Java.java:362)
at org.jruby.javasupport.JavaUtil.convertJavaToUsableRubyObject(JavaUtil.java:165)
at org.jruby.javasupport.JavaMethod.convertReturn(JavaMethod.java:595)
at org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:494)
at org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:356)
at org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:42)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:252)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:71)
at org.jruby.ast.CallManyArgsNode.interpret(CallManyArgsNode.java:59)
at org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.ast.RescueNode.executeBody(RescueNode.java:216)
at org.jruby.ast.RescueNode.interpretWithJavaExceptions(RescueNode.java:120)
at org.jruby.ast.RescueNode.interpret(RescueNode.java:110)
at org.jruby.ast.BeginNode.interpret(BeginNode.java:83)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:75)
at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:233)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:302)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:173)
at org.jruby.ast.FCallTwoArgNode.interpret(FCallTwoArgNode.java:38)
at org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:75)
at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:233)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:302)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:173)
at org.jruby.ast.FCallTwoArgNode.interpret(FCallTwoArgNode.java:38)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
at org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:374)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:328)
at org.jruby.runtime.BlockBody.call(BlockBody.java:73)
at org.jruby.runtime.Block.call(Block.java:89)
at org.jruby.RubyProc.call(RubyProc.java:268)
at org.jruby.RubyProc.call(RubyProc.java:232)
at org.jruby.internal.runtime.RubyRunnable.run(RubyRunnable.java:95)
at java.lang.Thread.run(Thread.java:724)
"RubyThread-202: <script>:231":
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x0000000747f66028> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:834)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:867)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1197)
at java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:214)
at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:290)
at org.jruby.javasupport.JavaClass.lockProxy(JavaClass.java:545)
at org.jruby.javasupport.Java.getInterfaceModule(Java.java:379)
at org.jruby.javasupport.Java.getProxyClass(Java.java:423)
at org.jruby.javasupport.Java.addToJavaPackageModule(Java.java:783)
at org.jruby.javasupport.Java.getProxyClass(Java.java:467)
at org.jruby.javasupport.Java.getInstance(Java.java:362)
at org.jruby.javasupport.JavaUtil.convertJavaToUsableRubyObjectWithConverter(JavaUtil.java:176)
at org.jruby.javasupport.JavaMethod.convertReturn(JavaMethod.java:597)
at org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:511)
at org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:368)
at org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:49)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:262)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:105)
at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:63)
at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:63)
at org.jruby.ast.InstAsgnNode.interpret(InstAsgnNode.java:95)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:75)
at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:212)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:292)
at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:148)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:152)
at org.jruby.RubyClass.newInstance(RubyClass.java:799)
at org.jruby.RubyClass$i$newInstance.call(RubyClass$i$newInstance.gen:65535)
at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroOrOneOrNBlock.call(JavaMethod.java:266)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:282)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:139)
at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
at org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.ast.RescueNode.executeBody(RescueNode.java:216)
at org.jruby.ast.RescueNode.interpretWithJavaExceptions(RescueNode.java:120)
at org.jruby.ast.RescueNode.interpret(RescueNode.java:110)
at org.jruby.ast.BeginNode.interpret(BeginNode.java:83)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:75)
at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:233)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:171)
at org.jruby.ast.FCallTwoArgNode.interpret(FCallTwoArgNode.java:38)
at org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:75)
at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:233)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:171)
at org.jruby.ast.FCallTwoArgNode.interpret(FCallTwoArgNode.java:38)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
at org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:374)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:328)
at org.jruby.runtime.BlockBody.call(BlockBody.java:73)
at org.jruby.runtime.Block.call(Block.java:89)
at org.jruby.RubyProc.call(RubyProc.java:268)
at org.jruby.RubyProc.call(RubyProc.java:232)
at org.jruby.internal.runtime.RubyRunnable.run(RubyRunnable.java:95)
at java.lang.Thread.run(Thread.java:724)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment