Issue #11600 has been updated by Nobuyoshi Nakada.


Erkki Eilonen wrote:
> Happens on OSX (10.10.5) as well (on 2.2.3 and earlier, presumably on latest 2_2 as well)

It's a bug of a system library.
We can do nothing for it.

----------------------------------------
Bug #11600: indeterministic failures on socket operations when running out of file descriptors
https://bugs.ruby-lang.org/issues/11600#change-54476

* Author: Erkki Eilonen
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: ruby 2.2.4p180 (2015-10-06 revision 52046) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
We've been getting indeterministic failures on socket operations when running out of file descriptors, instead of the correct Errno::EMFILE being raised we've seen various failure modes, on both linux and osx:

1) This is what we're seeing in production the most, masquerading as a dns failure
>ruby test.rb 
1017 tempfiles
freeing 4
test.rb:24:in `getaddrinfo': getaddrinfo: Name or service not known (SocketError)
	from test.rb:24:in `block (3 levels) in <main>'

2)
>ruby test.rb 
1017 tempfiles
freeing 4
test.rb:24: [BUG] rb_sys_fail(getaddrinfo) - errno == 0
ruby 2.2.4p180 (2015-10-06 revision 52046) [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0003 p:---- s:0009 e:000008 CFUNC  :getaddrinfo
c:0002 p:0018 s:0004 e:000003 BLOCK  test.rb:24 [FINISH]
c:0001 p:---- s:0002 e:000001 TOP    [FINISH]

-- Ruby level backtrace information ----------------------------------------
test.rb:24:in `block (3 levels) in <main>'
test.rb:24:in `getaddrinfo'

-- C level backtrace information -------------------------------------------

-- Other runtime information -----------------------------------------------

* Loaded script: test.rb

* Loaded features:

    0 enumerator.so
    1 rational.so
    2 complex.so
    3 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/x86_64-linux/enc/encdb.so
    4 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/x86_64-linux/enc/trans/transdb.so
    5 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/unicode_normalize.rb
    6 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/x86_64-linux/rbconfig.rb
    7 thread.rb
    8 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/x86_64-linux/thread.so
    9 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/rubygems/compatibility.rb
   10 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/rubygems/defaults.rb
   11 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/rubygems/deprecate.rb
   12 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/rubygems/errors.rb
   13 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/rubygems/version.rb
   14 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/rubygems/requirement.rb
   15 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/rubygems/platform.rb
   16 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/rubygems/basic_specification.rb
   17 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/rubygems/stub_specification.rb
   18 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/rubygems/util/stringio.rb
   19 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/rubygems/specification.rb
   20 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/rubygems/exceptions.rb
   21 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/rubygems/core_ext/kernel_gem.rb
   22 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/monitor.rb
   23 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb
   24 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/rubygems.rb
   25 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/x86_64-linux/socket.so
   26 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/socket.rb
   27 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/delegate.rb
   28 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/x86_64-linux/etc.so
   29 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/fileutils.rb
   30 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/tmpdir.rb
   31 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/tempfile.rb

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Aborted


3)
>ruby test.rb 
1017 tempfiles
freeing 4
test.rb:24: [BUG] rb_sys_fail(getaddrinfo) - errno == 0
ruby 2.2.4p180 (2015-10-06 revision 52046) [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0003 p:---- s:0009 e:000008 CFUNC  :getaddrinfo
c:0002 p:0018 s:0004 e:000003 BLOCK  test.rb:24 [FINISH]
c:0001 p:---- s:0002 e:000001 TOP    [FINISH]

-- Ruby level backtrace information ----------------------------------------
test.rb:24:in `block (3 levels) in <main>'
test.rb:24:in `getaddrinfo'

-- C level backtrace information -------------------------------------------

-- Other runtime information -----------------------------------------------

* Loaded script: test.rb

* Loaded features:

    0 enumerator.so
    1 rational.so
    2 complex.so
    3 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/x86_64-linux/enc/encdb.so
    4 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/x86_64-linux/enc/trans/transdb.so
    5 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/unicode_normalize.rb
    6 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/x86_64-linux/rbconfig.rb
    7 thread.rb
    8 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/x86_64-linux/thread.so
    9 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/rubygems/compatibility.rb
   10 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/rubygems/defaults.rb
   11 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/rubygems/deprecate.rb
   12 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/rubygems/errors.rb
   13 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/rubygems/version.rb
   14 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/rubygems/requirement.rb
   15 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/rubygems/platform.rb
   16 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/rubygems/basic_specification.rb
   17 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/rubygems/stub_specification.rb
   18 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/rubygems/util/stringio.rb
   19 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/rubygems/specification.rb
   20 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/rubygems/exceptions.rb
   21 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/rubygems/core_ext/kernel_gem.rb
   22 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/monitor.rb
   23 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb
   24 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/rubygems.rb
   25 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/x86_64-linux/socket.so
   26 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/socket.rb
   27 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/delegate.rb
   28 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/x86_64-linux/etc.so
   29 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/fileutils.rb
   30 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/tmpdir.rb
   31 /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/tempfile.rb

* Process memory map:

7f6d80000000-7f6d80021000 rw-p 00000000 00:00 0 
7f6d80021000-7f6d84000000 ---p 00000000 00:00 0 
7f6d84000000-7f6d84021000 rw-p 00000000 00:00 0 
7f6d84021000-7f6d88000000 ---p 00000000 00:00 0 
7f6d88000000-7f6d88021000 rw-p 00000000 00:00 0 
7f6d88021000-7f6d8c000000 ---p 00000000 00:00 0 
7f6d8c000000-7f6d8c021000 rw-p 00000000 00:00 0 
7f6d8c021000-7f6d90000000 ---p 00000000 00:00 0 
7f6d90000000-7f6d90021000 rw-p 00000000 00:00 0 
7f6d90021000-7f6d94000000 ---p 00000000 00:00 0 
7f6d94000000-7f6d94021000 rw-p 00000000 00:00 0 
7f6d94021000-7f6d98000000 ---p 00000000 00:00 0 
7f6d98000000-7f6d98021000 rw-p 00000000 00:00 0 
7f6d98021000-7f6d9c000000 ---p 00000000 00:00 0 
7f6d9c000000-7f6d9c021000 rw-p 00000000 00:00 0 
7f6d9c021000-7f6da0000000 ---p 00000000 00:00 0 
7f6da0000000-7f6da0021000 rw-p 00000000 00:00 0 
7f6da0021000-7f6da4000000 ---p 00000000 00:00 0 
7f6da4000000-7f6da4021000 rw-p 00000000 00:00 0 
7f6da4021000-7f6da8000000 ---p 00000000 00:00 0 
7f6da8000000-7f6da8021000 rw-p 00000000 00:00 0 
7f6da8021000-7f6dac000000 ---p 00000000 00:00 0 
7f6dac000000-7f6dac021000 rw-p 00000000 00:00 0 
7f6dac021000-7f6db0000000 ---p 00000000 00:00 0 
7f6db0000000-7f6db0021000 rw-p 00000000 00:00 0 
7f6db0021000-7f6db4000000 ---p 00000000 00:00 0 
7f6db4000000-7f6db4021000 rw-p 00000000 00:00 0 
7f6db4021000-7f6db8000000 ---p 00000000 00:00 0 
7f6db8000000-7f6db8021000 rw-p 00000000 00:00 0 
7f6db8021000-7f6dbc000000 ---p 00000000 00:00 0 
7f6dbc000000-7f6dbc021000 rw-p 00000000 00:00 0 
7f6dbc021000-7f6dc0000000 ---p 00000000 00:00 0 
7f6dc0000000-7f6dc0021000 rw-p 00000000 00:00 0 
7f6dc0021000-7f6dc4000000 ---p 00000000 00:00 0 
7f6dc4000000-7f6dc4021000 rw-p 00000000 00:00 0 
7f6dc4021000-7f6dc8000000 ---p 00000000 00:00 0 
7f6dc8000000-7f6dc8021000 rw-p 00000000 00:00 0 
7f6dc8021000-7f6dcc000000 ---p 00000000 00:00 0 
7f6dcc000000-7f6dcc021000 rw-p 00000000 00:00 0 
7f6dcc021000-7f6dd0000000 ---p 00000000 00:00 0 
7f6dd0177000-7f6dd0178000 ---p 00000000 00:00 0 
7f6dd0178000-7f6dd0379000 rw-p 00000000 00:00 0                          [stack:9385]
7f6dd0379000-7f6dd037a000 ---p 00000000 00:00 0 
7f6dd037a000-7f6dd057b000 rw-p 00000000 00:00 0                          [stack:9374]
7f6dd057b000-7f6dd057c000 ---p 00000000 00:00 0 
7f6dd057c000-7f6dd077d000 rw-p 00000000 00:00 0                          [stack:9383]
7f6dd077d000-7f6dd077e000 ---p 00000000 00:00 0 
7f6dd077e000-7f6dd097f000 rw-p 00000000 00:00 0                          [stack:9379]
7f6dd097f000-7f6dd0980000 ---p 00000000 00:00 0 
7f6dd0980000-7f6dd0b81000 rw-p 00000000 00:00 0                          [stack:9384]
7f6dd0b81000-7f6dd0b82000 ---p 00000000 00:00 0 
7f6dd0b82000-7f6dd0d83000 rw-p 00000000 00:00 0                          [stack:9377]
7f6dd0d83000-7f6dd0d84000 ---p 00000000 00:00 0 
7f6dd0d84000-7f6dd0f85000 rw-p 00000000 00:00 0                          [stack:9372]
7f6dd0f85000-7f6dd0f86000 ---p 00000000 00:00 0 
7f6dd0f86000-7f6dd1187000 rw-p 00000000 00:00 0                          [stack:9368]
7f6dd1187000-7f6dd1188000 ---p 00000000 00:00 0 
7f6dd1188000-7f6dd1389000 rw-p 00000000 00:00 0                          [stack:9376]
7f6dd1389000-7f6dd138a000 ---p 00000000 00:00 0 
7f6dd138a000-7f6dd158b000 rw-p 00000000 00:00 0                          [stack:9375]
7f6dd158b000-7f6dd158c000 ---p 00000000 00:00 0 
7f6dd158c000-7f6dd178d000 rw-p 00000000 00:00 0                          [stack:9380]
7f6dd178d000-7f6dd178e000 ---p 00000000 00:00 0 
7f6dd178e000-7f6dd198f000 rw-p 00000000 00:00 0                          [stack:9386]
7f6dd198f000-7f6dd1990000 ---p 00000000 00:00 0 
7f6dd1990000-7f6dd1b91000 rw-p 00000000 00:00 0                          [stack:9371]
7f6dd1b91000-7f6dd1b92000 ---p 00000000 00:00 0 
7f6dd1b92000-7f6dd1d93000 rw-p 00000000 00:00 0                          [stack:9382]
7f6dd1d93000-7f6dd1d94000 ---p 00000000 00:00 0 
7f6dd1d94000-7f6dd1f95000 rw-p 00000000 00:00 0                          [stack:9373]
7f6dd1f95000-7f6dd1f96000 ---p 00000000 00:00 0 
7f6dd1f96000-7f6dd2197000 rw-p 00000000 00:00 0                          [stack:9367]
7f6dd2197000-7f6dd2198000 ---p 00000000 00:00 0 
7f6dd2198000-7f6dd2399000 rw-p 00000000 00:00 0                          [stack:9381]
7f6dd2399000-7f6dd23b0000 r-xp 00000000 fc:00 523441                     /lib/x86_64-linux-gnu/libresolv-2.19.so
7f6dd23b0000-7f6dd25b0000 ---p 00017000 fc:00 523441                     /lib/x86_64-linux-gnu/libresolv-2.19.so
7f6dd25b0000-7f6dd25b1000 r--p 00017000 fc:00 523441                     /lib/x86_64-linux-gnu/libresolv-2.19.so
7f6dd25b1000-7f6dd25b2000 rw-p 00018000 fc:00 523441                     /lib/x86_64-linux-gnu/libresolv-2.19.so
7f6dd25b2000-7f6dd25b4000 rw-p 00000000 00:00 0 
7f6dd25b4000-7f6dd25b9000 r-xp 00000000 fc:00 528797                     /lib/x86_64-linux-gnu/libnss_dns-2.19.so
7f6dd25b9000-7f6dd27b8000 ---p 00005000 fc:00 528797                     /lib/x86_64-linux-gnu/libnss_dns-2.19.so
7f6dd27b8000-7f6dd27b9000 r--p 00004000 fc:00 528797                     /lib/x86_64-linux-gnu/libnss_dns-2.19.so
7f6dd27b9000-7f6dd27ba000 rw-p 00005000 fc:00 528797                     /lib/x86_64-linux-gnu/libnss_dns-2.19.so
7f6dd27ba000-7f6dd27c5000 r-xp 00000000 fc:00 523507                     /lib/x86_64-linux-gnu/libnss_files-2.19.so
7f6dd27c5000-7f6dd29c4000 ---p 0000b000 fc:00 523507                     /lib/x86_64-linux-gnu/libnss_files-2.19.so
7f6dd29c4000-7f6dd29c5000 r--p 0000a000 fc:00 523507                     /lib/x86_64-linux-gnu/libnss_files-2.19.so
7f6dd29c5000-7f6dd29c6000 rw-p 0000b000 fc:00 523507                     /lib/x86_64-linux-gnu/libnss_files-2.19.so
7f6dd29c6000-7f6dd29c7000 ---p 00000000 00:00 0 
7f6dd29c7000-7f6dd2bc8000 rw-p 00000000 00:00 0                          [stack:9378]
7f6dd2bc8000-7f6dd2bc9000 ---p 00000000 00:00 0 
7f6dd2bc9000-7f6dd2dca000 rw-p 00000000 00:00 0                          [stack:9370]
7f6dd2dca000-7f6dd2dcb000 ---p 00000000 00:00 0 
7f6dd2dcb000-7f6dd2fcc000 rw-p 00000000 00:00 0                          [stack:9369]
7f6dd2fcc000-7f6dd2fd2000 r-xp 00000000 fc:00 941692                     /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/x86_64-linux/etc.so
7f6dd2fd2000-7f6dd31d1000 ---p 00006000 fc:00 941692                     /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/x86_64-linux/etc.so
7f6dd31d1000-7f6dd31d2000 r--p 00005000 fc:00 941692                     /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/x86_64-linux/etc.so
7f6dd31d2000-7f6dd31d3000 rw-p 00006000 fc:00 941692                     /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/x86_64-linux/etc.so
7f6dd31d3000-7f6dd31fe000 r-xp 00000000 fc:00 941691                     /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/x86_64-linux/socket.so
7f6dd31fe000-7f6dd33fd000 ---p 0002b000 fc:00 941691                     /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/x86_64-linux/socket.so
7f6dd33fd000-7f6dd33fe000 r--p 0002a000 fc:00 941691                     /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/x86_64-linux/socket.so
7f6dd33fe000-7f6dd33ff000 rw-p 0002b000 fc:00 941691                     /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/x86_64-linux/socket.so
7f6dd33ff000-7f6dd3402000 r-xp 00000000 fc:00 941751                     /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/x86_64-linux/thread.so
7f6dd3402000-7f6dd3602000 ---p 00003000 fc:00 941751                     /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/x86_64-linux/thread.so
7f6dd3602000-7f6dd3603000 r--p 00003000 fc:00 941751                     /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/x86_64-linux/thread.so
7f6dd3603000-7f6dd3604000 rw-p 00004000 fc:00 941751                     /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/x86_64-linux/thread.so
7f6dd3604000-7f6dd3606000 r-xp 00000000 fc:00 941731                     /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/x86_64-linux/enc/trans/transdb.so
7f6dd3606000-7f6dd3806000 ---p 00002000 fc:00 941731                     /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/x86_64-linux/enc/trans/transdb.so
7f6dd3806000-7f6dd3807000 r--p 00002000 fc:00 941731                     /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/x86_64-linux/enc/trans/transdb.so
7f6dd3807000-7f6dd3808000 rw-p 00003000 fc:00 941731                     /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/x86_64-linux/enc/trans/transdb.so
7f6dd3808000-7f6dd380a000 r-xp 00000000 fc:00 941711                     /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/x86_64-linux/enc/encdb.so
7f6dd380a000-7f6dd3a09000 ---p 00002000 fc:00 941711                     /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/x86_64-linux/enc/encdb.so
7f6dd3a09000-7f6dd3a0a000 r--p 00001000 fc:00 941711                     /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/x86_64-linux/enc/encdb.so
7f6dd3a0a000-7f6dd3a0b000 rw-p 00002000 fc:00 941711                     /opt/rbenv/versions/2.2.0-dev/lib/ruby/2.2.0/x86_64-linux/enc/encdb.so
7f6dd3a0b000-7f6dd3cd4000 r--p 00000000 fc:00 2097779                    /usr/lib/locale/locale-archive
7f6dd3cd4000-7f6dd3e8f000 r-xp 00000000 fc:00 528809                     /lib/x86_64-linux-gnu/libc-2.19.so
7f6dd3e8f000-7f6dd408e000 ---p 001bb000 fc:00 528809                     /lib/x86_64-linux-gnu/libc-2.19.so
7f6dd408e000-7f6dd4092000 r--p 001ba000 fc:00 528809                     /lib/x86_64-linux-gnu/libc-2.19.so
7f6dd4092000-7f6dd4094000 rw-p 001be000 fc:00 528809                     /lib/x86_64-linux-gnu/libc-2.19.so
7f6dd4094000-7f6dd4099000 rw-p 00000000 00:00 0 
7f6dd4099000-7f6dd419e000 r-xp 00000000 fc:00 523474                     /lib/x86_64-linux-gnu/libm-2.19.so
7f6dd419e000-7f6dd439d000 ---p 00105000 fc:00 523474                     /lib/x86_64-linux-gnu/libm-2.19.so
7f6dd439d000-7f6dd439e000 r--p 00104000 fc:00 523474                     /lib/x86_64-linux-gnu/libm-2.19.so
7f6dd439e000-7f6dd439f000 rw-p 00105000 fc:00 523474                     /lib/x86_64-linux-gnu/libm-2.19.so
7f6dd439f000-7f6dd43a8000 r-xp 00000000 fc:00 528801                     /lib/x86_64-linux-gnu/libcrypt-2.19.so
7f6dd43a8000-7f6dd45a8000 ---p 00009000 fc:00 528801                     /lib/x86_64-linux-gnu/libcrypt-2.19.so
7f6dd45a8000-7f6dd45a9000 r--p 00009000 fc:00 528801                     /lib/x86_64-linux-gnu/libcrypt-2.19.so
7f6dd45a9000-7f6dd45aa000 rw-p 0000a000 fc:00 528801                     /lib/x86_64-linux-gnu/libcrypt-2.19.so
7f6dd45aa000-7f6dd45d8000 rw-p 00000000 00:00 0 
7f6dd45d8000-7f6dd45db000 r-xp 00000000 fc:00 528798                     /lib/x86_64-linux-gnu/libdl-2.19.so
7f6dd45db000-7f6dd47da000 ---p 00003000 fc:00 528798                     /lib/x86_64-linux-gnu/libdl-2.19.so
7f6dd47da000-7f6dd47db000 r--p 00002000 fc:00 528798                     /lib/x86_64-linux-gnu/libdl-2.19.so
7f6dd47db000-7f6dd47dc000 rw-p 00003000 fc:00 528798                     /lib/x86_64-linux-gnu/libdl-2.19.so
7f6dd47dc000-7f6dd47f5000 r-xp 00000000 fc:00 528810                     /lib/x86_64-linux-gnu/libpthread-2.19.so
7f6dd47f5000-7f6dd49f4000 ---p 00019000 fc:00 528810                     /lib/x86_64-linux-gnu/libpthread-2.19.so
7f6dd49f4000-7f6dd49f5000 r--p 00018000 fc:00 528810                     /lib/x86_64-linux-gnu/libpthread-2.19.so
7f6dd49f5000-7f6dd49f6000 rw-p 00019000 fc:00 528810                     /lib/x86_64-linux-gnu/libpthread-2.19.so
7f6dd49f6000-7f6dd49fa000 rw-p 00000000 00:00 0 
7f6dd49fa000-7f6dd4a1d000 r-xp 00000000 fc:00 528806                     /lib/x86_64-linux-gnu/ld-2.19.so
7f6dd4b09000-7f6dd4c0f000 rw-p 00000000 00:00 0 
7f6dd4c0f000-7f6dd4c16000 r--s 00000000 fc:00 2108798                    /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache
7f6dd4c16000-7f6dd4c17000 ---p 00000000 00:00 0 
7f6dd4c17000-7f6dd4c1c000 rw-p 00000000 00:00 0                          [stack:9285]
7f6dd4c1c000-7f6dd4c1d000 r--p 00022000 fc:00 528806                     /lib/x86_64-linux-gnu/ld-2.19.so
7f6dd4c1d000-7f6dd4c1e000 rw-p 00023000 fc:00 528806                     /lib/x86_64-linux-gnu/ld-2.19.so
7f6dd4c1e000-7f6dd4c1f000 rw-p 00000000 00:00 0 
7f6dd4c1f000-7f6dd4eed000 r-xp 00000000 fc:00 940952                     /opt/rbenv/versions/2.2.0-dev/bin/ruby
7f6dd50ed000-7f6dd50f2000 r--p 002ce000 fc:00 940952                     /opt/rbenv/versions/2.2.0-dev/bin/ruby
7f6dd50f2000-7f6dd50f3000 rw-p 002d3000 fc:00 940952                     /opt/rbenv/versions/2.2.0-dev/bin/ruby
7f6dd50f3000-7f6dd5105000 rw-p 00000000 00:00 0 
7f6dd513d000-7f6dd58a0000 rw-p 00000000 00:00 0                          [heap]
7fff6f182000-7fff6f981000 rw-p 00000000 00:00 0                          [stack]
7fff6f9c3000-7fff6f9c5000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]


[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Aborted


Similar errors also happen doing other operations (eg TCPSocket.open)

Test case attached

---Files--------------------------------
test.rb (483 Bytes)
testcase.rb (431 Bytes)


-- 
https://bugs.ruby-lang.org/