Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.4
-
Fix Version/s: None
-
Component/s: Extensions, Intro
-
Labels:None
-
Number of attachments :
Description
# jruby -e "a=[]; loop {a << IO.pipe}"
PipeImpl.java:106:in `run': java.io.IOException: Unable to establish loopback connection
from AccessController.java:-2:in `doPrivileged'
from PipeImpl.java:122:in `<init>'
from SelectorProviderImpl.java:27:in `openPipe'
from Pipe.java:133:in `open'
from RubyIO.java:3495:in `pipe'
from org/jruby/RubyIO$s_method_0_0$RUBYINVOKER$pipe.gen:-1:in `call'
from CachingCallSite.java:106:in `call'
from -e:1:in `block_0$RUBY$__block__'
from null:-1:in `call'
from CompiledBlock.java:105:in `yield'
from Block.java:194:in `yield'
from RubyKernel.java:1181:in `loop_1_9'
from org/jruby/RubyKernel$s_method_0_0$RUBYFRAMEDINVOKER$loop_1_9.gen:-1:in `call'
from CachingCallSite.java:299:in `cacheAndCall'
from CachingCallSite.java:117:in `callBlock'
from CachingCallSite.java:132:in `callIter'
from -e:1:in `__file__'
from -e:-1:in `load'
from Ruby.java:631:in `runScript'
from Ruby.java:549:in `runNormally'
from Ruby.java:395:in `runFromMain'
from Main.java:272:in `run'
from Main.java:117:in `run'
from Main.java:97:in `main'
Caused by:
Net.java:-2:in `connect': java.net.SocketException: No buffer space available (maximum connections reached?): connect
MRI does:
ruby -e "a=[]; loop {a << IO.pipe}"
-e:1:in `pipe': Too many open files (Errno::EMFILE)
Easy one...at the very least we shouldn't let the IOException escape. If we can decide to raise EMFILE that's even better.