stompgem / stomp

A ruby gem for sending and receiving messages from a Stomp protocol compliant message queue. Includes: failover logic, ssl support.
http://stomp.github.com
Apache License 2.0
152 stars 80 forks source link

Nasty-looking exception under jRuby #152

Closed andy-twosticks closed 5 years ago

andy-twosticks commented 5 years ago

stomp 1.4.4, jRuby >= 9.1.17.0. This appears to be a warning message; as far as I can tell, operation is unaffected.

warning: thread "Ruby-0-Thread-137: /home/jonea/.rbenv/versions/jruby-9.2.0.0/lib/ruby/gems/shared/gems/stomp-1.4.4/lib/client/utils.rb:192" terminated with exception (report_on_exception is true):warning: thread "Ruby-0-Thread-143: /home/
jonea/.rbenv/versions/jruby-9.2.0.0/lib/ruby/gems/shared/gems/stomp-1.4.4/lib/client/utils.rb:192" terminated with exception (report_on_exception is true):                                                                                                                                                                                                                                                                                                                                 
java.nio.channels.ClosedSelectorExceptionjava.nio.channels.ClosedSelectorException                                                                                                                                                                                                                                                                                                                                                                                                      
    at sun.nio.ch.SelectorImpl.keys(SelectorImpl.java:68)   at sun.nio.ch.SelectorImpl.keys(SelectorImpl.java:68)                                                                                                                                                                                                                                                                                                                                                                         
    at org.jruby.util.io.SelectorPool.put(SelectorPool.java:88)     at     org.jruby.util.io.SelectorPool.put(SelectorPool.java:88)                                                                                                                                                                                                                                                                                                                                                           
    at org.jruby.util.io.SelectExecutor.selectEnd(SelectExecutor.java:59)   at org.jruby.util.io.SelectExecutor.selectEnd(SelectExecutor.java:59)                                                                                                                                                                                                                                                                                                                                         
    at org.jruby.util.io.SelectExecutor.go(SelectExecutor.java:44)  at org.jruby.util.io.SelectExecutor.go(SelectExecutor.java:44)                                                                                                                                                                                                                                                                                                                                                        
    at org.jruby.RubyIO.select(RubyIO.java:3593)    at org.jruby.RubyIO.select(RubyIO.java:3593)                                                                                                                                                                                                                                                                                                                                                                                          
    at org.jruby.RubyIO$INVOKER$s$0$3$select.call(RubyIO$INVOKER$s$0$3$select.gen)  at org.jruby.RubyIO$INVOKER$s$0$3$select.call(RubyIO$INVOKER$s$0$3$select.gen)                                                                                                                                                                                                                                                                                                                      
    at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(JavaMethod.java:819)  at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(JavaMethod.java:819)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:80)     at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:80)
    at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:522)      at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:522)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:360)   at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:360)
    at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:159)     at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:159)
    at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:129)   at org.jruby.ir.interpreter.Interpreter.INTERPRET_BLOCK(Interpreter.java:129)
    at org.jruby.runtime.InterpretedIRBlockBody.yieldDirect(InterpretedIRBlockBody.java:107)        at org.jruby.runtime.InterpretedIRBlockBody.yieldDirect(InterpretedIRBlockBody.java:107)
    at org.jruby.runtime.IRBlockBody.yieldSpecific(IRBlockBody.java:85)     at org.jruby.runtime.IRBlockBody.yieldSpecific(IRBlockBody.java:85)
    at org.jruby.runtime.Block.yieldSpecific(Block.java:134)        at org.jruby.runtime.Block.yieldSpecific(Block.java:134)
    at org.jruby.ext.thread.Mutex.synchronize(Mutex.java:158)       at org.jruby.ext.thread.Mutex.synchronize(Mutex.java:158)
    at org.jruby.ext.thread.Mutex$INVOKER$i$0$0$synchronize.call(Mutex$INVOKER$i$0$0$synchronize.gen)       at org.jruby.ext.thread.Mutex$INVOKER$i$0$0$synchronize.call(Mutex$INVOKER$i$0$0$synchronize.gen)
    at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroBlock.call(JavaMethod.java:537)  at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroBlock.call(JavaMethod.java:537)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:80)     at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:80)
    at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:89) at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:89)
    at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:519)      at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:519)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:360)   at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:360)
    at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:159)     at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:159)
    at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:84)

I can't easily be very specific about what I'm doing when the error occurs since I'm using Stomp in a wrapper library and all I'm seeing here are the tests for the final product. Sorry.

gmallard commented 5 years ago

Yes, it is a warning. These thread level warnings are usually safe to ignore.

Will add code to squelch those warnings for the next gem release:

Thread::report_on_exception = false
gmallard commented 5 years ago

This kind of warning behavior started with Ruby 2.5.

I have comitted 79e1299 on the dev branch. It attempts to globally address these kind of warnings.

If you can, please clone the stomp gem and test against dev branch HEAD.

gmallard commented 5 years ago

Closing this due to 79e1299 - if the issue persists, please re-open and provide additional example(s).