Ryan LeCompte created JRUBY-6576:
------------------------------------
Summary: Using a shared listener socket causes
java.nio.channels.IllegalBlockingModeException exceptions to be raised
Key: JRUBY-6576
URL: https://jira.codehaus.org/browse/JRUBY-6576
Project: JRuby
Issue Type: Bug
Affects Versions: JRuby 1.6.7
Environment: JRuby 1.6.7 as well as head on Mac OSX.
Reporter: Ryan LeCompte
Assignee: Thomas E Enebo
I recently wrote an example that uses multiple acceptor threads that all listen
on the same listener socket. This works fine on MRI 1.9.3, however repeatedly
fails in JRuby. The sample app can be found here:
https://github.com/ryanlecompte/timeserver
One server is running, simply telnet localhost 3000 and you will see the error.
Server launched: 10 acceptors, 10 workers.
Exception in thread "RubyThread-34:
/Users/ryan/fun/timeserver/lib/timeserver/server.rb:37"
java.nio.channels.IllegalBlockingModeException
at
java.nio.channels.spi.AbstractSelectableChannel.configureBlocking(AbstractSelectableChannel.java:257)
at org.jruby.util.io.SelectBlob.tidyUp(SelectBlob.java:352)
at org.jruby.util.io.SelectBlob.goForIt(SelectBlob.java:94)
at org.jruby.RubyIO.select_static(RubyIO.java:3398)
at org.jruby.RubyIO.select(RubyIO.java:3394)
at
org.jruby.RubyIO$INVOKER$s$0$3$select.call(RubyIO$INVOKER$s$0$3$select.gen:65535)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:69)
at org.jruby.ast.CallManyArgsNode.interpret(CallManyArgsNode.java:59)
at org.jruby.ast.IfNode.interpret(IfNode.java:111)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.WhileNode.interpret(WhileNode.java:131)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at
org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
at
org.jruby.runtime.Interpreted19Block.evalBlockBody(Interpreted19Block.java:209)
at
org.jruby.runtime.Interpreted19Block.yield(Interpreted19Block.java:197)
at
org.jruby.runtime.Interpreted19Block.call(Interpreted19Block.java:128)
at org.jruby.runtime.Block.call(Block.java:89)
at org.jruby.RubyProc.call(RubyProc.java:269)
at org.jruby.RubyProc.call(RubyProc.java:223)
at org.jruby.internal.runtime.RubyRunnable.run(RubyRunnable.java:101)
at java.lang.Thread.run(Thread.java:680)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email