https://bugs.ruby-lang.org/
https://bugs.ruby-lang.org/favicon.ico?1711330511
2016-01-29T16:53:21Z
Ruby Issue Tracking System
Ruby master - Bug #11869: random hang/SegFault when accessing a missing constant in irb
https://bugs.ruby-lang.org/issues/11869?journal_id=56783
2016-01-29T16:53:21Z
lamont (Lamont Granquist)
lamont@scriptkiddie.org
<ul></ul><p>I'm seeing this on debian 7, rhel 6, and ubuntu 14.04 at least (but running binaries compiled on debian 6, rhel 5, and ubuntu 10.04, respectively). The chef rspec test suite triggers this:</p>
<p>git clone <a href="https://github.com/chef/chef" class="external">https://github.com/chef/chef</a><br>
cd chef<br>
rspec spec/functional/shell_spec.rb<br>
( run repeatedly )</p>
<p>I definitely do not observe this failure on Mac OSX 10.11.2 with rvm installed 2.2.4 (having run the rspec suite many dozens of times on 2.2.x and never seen a seg fault here).</p>
<p>A gcc vs. clang compiler difference? Some gcc optimization that causes it to fail? Seems consistent across a wide range of gcc versions from 3.x to 5.x if that's the case. It seems to only affect linux, but that might be an effect of our running more tests against linux than solaris/freebsd/etc.</p>
Ruby master - Bug #11869: random hang/SegFault when accessing a missing constant in irb
https://bugs.ruby-lang.org/issues/11869?journal_id=56800
2016-01-30T16:29:43Z
lamont (Lamont Granquist)
lamont@scriptkiddie.org
<ul></ul><p>I built our whole system (ruby, libedit, ncurses, etc) without any optimizations at all and got a build that passed our specs.</p>
<p>I tried dropping the optimization down to -O2 from the -O3 we had been using, along with bumping libedit from 20120601-3.0 to 20150325-3.1 and ncurses from 5.9 to 6.0-20150810 and still got one failure on debian-6 in the same spec test but a "memory corruption error" from malloc() this time:</p>
<ol>
<li>
<p>Shell smoke tests sets the override_runlist from the command line<br>
Failure/Error:<br>
raise "did not read expected value <code>#{expected_value}' within #{TIMEOUT}s\n" + "Buffer so far: </code>#{buffer}'"</p>
<p>RuntimeError:<br>
did not read expected value <code>=> "done"' within 300s Buffer so far: </code><br>
["override::foo", "override::bar"]<br>
=> nil<br>
*** glibc detected *** ruby: malloc(): memory corruption: 0xb6c8d008 ***<br>
======= Backtrace: =========<br>
/lib/libc.so.6(+0x6adba)[0xb73c2dba]<br>
/lib/libc.so.6(+0x6dbd7)[0xb73c5bd7]<br>
/lib/libc.so.6(__libc_malloc+0x5c)[0xb73c781c]<br>
/opt/chef/embedded/lib/libruby.so.2.2(+0x7c51b)[0xb759d51b]<br>
/opt/chef/embedded/lib/libruby.so.2.2(+0x212d8)[0xb75422d8]<br>
/opt/chef/embedded/lib/libruby.so.2.2(+0x13473b)[0xb765573b]<br>
/opt/chef/embedded/lib/libruby.so.2.2(+0x17394f)[0xb769494f]<br>
/opt/chef/embedded/lib/libruby.so.2.2(+0x17ab5b)[0xb769bb5b]<br>
/opt/chef/embedded/lib/libruby.so.2.2(+0x182b10)[0xb76a3b10]<br>
/opt/chef/embedded/lib/libruby.so.2.2(+0x187245)[0xb76a8245]<br>
/opt/chef/embedded/lib/libruby.so.2.2(+0x189cd6)[0xb76aacd6]<br>
/opt/chef/embedded/lib/libruby.so.2.2(rb_rescue2+0xa8)[0xb757edb8]<br>
/opt/chef/embedded/lib/libruby.so.2.2(+0x177da5)[0xb7698da5]<br>
/opt/chef/embedded/lib/libruby.so.2.2(+0x17394f)[0xb769494f]<br>
/opt/chef/embedded/lib/libruby.so.2.2(+0x17ab5b)[0xb769bb5b]<br>
/opt/chef/embedded/lib/libruby.so.2.2(+0x1929bc)[0xb76b39bc]<br>
/opt/chef/embedded/lib/libruby.so.2.2(+0x182bb5)[0xb76a3bb5]<br>
/opt/chef/embedded/lib/libruby.so.2.2(+0x187245)[0xb76a8245]<br>
/opt/chef/embedded/lib/libruby.so.2.2(+0x18af70)[0xb76abf70]<br>
/opt/chef/embedded/lib/libruby.so.2.2(+0x1760f1)[0xb76970f1]<br>
/opt/chef/embedded/lib/libruby.so.2.2(rb_catch_obj+0x32)[0xb7697c22]<br>
/opt/chef/embedded/lib/libruby.so.2.2(+0x176c96)[0xb7697c96]<br>
/opt/chef/embedded/lib/libruby.so.2.2(+0x17393d)[0xb769493d]<br>
/opt/chef/embedded/lib/libruby.so.2.2(+0x17ab5b)[0xb769bb5b]<br>
/opt/chef/embedded/lib/libruby.so.2.2(+0x1929bc)[0xb76b39bc]<br>
/opt/chef/embedded/lib/libruby.so.2.2(+0x182bb5)[0xb76a3bb5]<br>
/opt/chef/embedded/lib/libruby.so.2.2(+0x187245)[0xb76a8245]<br>
/opt/chef/embedded/lib/libruby.so.2.2(+0x18af70)[0xb76abf70]<br>
/opt/chef/embedded/lib/libruby.so.2.2(+0x1760f1)[0xb76970f1]<br>
/opt/chef/embedded/lib/libruby.so.2.2(rb_catch_obj+0x32)[0xb7697c22]<br>
/opt/chef/embedded/lib/libruby.so.2.2(+0x176c96)[0xb7697c96]<br>
/opt/chef/embedded/lib/libruby.so.2.2(+0x17393d)[0xb769493d]<br>
/opt/chef/embedded/lib/libruby.so.2.2(+0x17ab5b)[0xb769bb5b]<br>
/opt/chef/embedded/lib/libruby.so.2.2(+0x1929bc)[0xb76b39bc]<br>
/opt/chef/embedded/lib/libruby.so.2.2(+0x182bb5)[0xb76a3bb5]<br>
/opt/chef/embedded/lib/libruby.so.2.2(+0x187245)[0xb76a8245]<br>
/opt/chef/embedded/lib/libruby.so.2.2(rb_iseq_eval_main+0x95)[0xb76a8c45]<br>
/opt/chef/embedded/lib/libruby.so.2.2(+0x5ed30)[0xb757fd30]<br>
/opt/chef/embedded/lib/libruby.so.2.2(ruby_exec_node+0x25)[0xb757fd95]<br>
/opt/chef/embedded/lib/libruby.so.2.2(ruby_run_node+0x35)[0xb75812c5]<br>
ruby[0x80487a8]<br>
/lib/libc.so.6(__libc_start_main+0xe6)[0xb736ec96]<br>
ruby[0x80486a1]<br>
======= Memory map: ========<br>
08048000-08049000 r-xp 00000000 ca:00 1471147 /opt/chef/embedded/bin/ruby<br>
08049000-0804a000 rw-p 00000000 ca:00 1471147 /opt/chef/embedded/bin/ruby<br>
09b1b000-0b4f0000 rw-p 00000000 00:00 0 [heap]<br>
b6500000-b6659000 rw-p 00000000 00:00 0<br>
b6659000-b6700000 ---p 00000000 00:00 0<br>
b6700000-b68ff000 rw-p 00000000 00:00 0<br>
b68ff000-b6900000 ---p 00000000 00:00 0<br>
b6900000-b6aff000 rw-p 00000000 00:00 0<br>
b6aff000-b6b00000 ---p 00000000 00:00 0<br>
b6b00000-b6c00000 rw-p 00000000 00:00 0<br>
b6c1a000-b6c37000 r-xp 00000000 ca:00 450 /lib/libgcc_s.so.1<br>
b6c37000-b6c38000 rw-p 0001c000 ca:00 450 /lib/libgcc_s.so.1<br>
b6c3d000-b6c45000 r-xp 00000000 ca:00 71 /lib/libnss_nis-2.11.3.so<br>
b6c45000-b6c46000 r--p 00008000 ca:00 71 /lib/libnss_nis-2.11.3.so<br>
b6c46000-b6c47000 rw-p 00009000 ca:00 71 /lib/libnss_nis-2.11.3.so<br>
b6c47000-b6c5a000 r-xp 00000000 ca:00 75 /lib/libnsl-2.11.3.so<br>
b6c5a000-b6c5b000 r--p 00012000 ca:00 75 /lib/libnsl-2.11.3.so<br>
b6c5b000-b6c5c000 rw-p 00013000 ca:00 75 /lib/libnsl-2.11.3.so<br>
b6c5c000-b6c5e000 rw-p 00000000 00:00 0<br>
b6c5e000-b6c64000 r-xp 00000000 ca:00 481 /lib/libnss_compat-2.11.3.so<br>
b6c64000-b6c65000 r--p 00006000 ca:00 481 /lib/libnss_compat-2.11.3.so<br>
b6c65000-b6c66000 rw-p 00007000 ca:00 481 /lib/libnss_compat-2.11.3.so<br>
b6c66000-b6c76000 r-xp 00000000 ca:00 116 /lib/libresolv-2.11.3.so<br>
b6c76000-b6c77000 r--p 00010000 ca:00 116 /lib/libresolv-2.11.3.so<br>
b6c77000-b6c78000 rw-p 00011000 ca:00 116 /lib/libresolv-2.11.3.so<br>
b6c78000-b6c7a000 rw-p 00000000 00:00 0<br>
b6c7a000-b6c7e000 r-xp 00000000 ca:00 479 /lib/libnss_dns-2.11.3.so<br>
b6c7e000-b6c7f000 r--p 00004000 ca:00 479 /lib/libnss_dns-2.11.3.so<br>
b6c7f000-b6c80000 rw-p 00005000 ca:00 479 /lib/libnss_dns-2.11.3.so<br>
b6c80000-b6c8a000 r-xp 00000000 ca:00 117 /lib/libnss_files-2.11.3.so<br>
b6c8a000-b6c8b000 r--p 00009000 ca:00 117 /lib/libnss_files-2.11.3.so<br>
b6c8b000-b6c8c000 rw-p 0000a000 ca:00 117 /lib/libnss_files-2.11.3.so<br>
b6c8d000-b6c91000 rw-p 00000000 00:00 0<br>
b6c91000-b6c92000 ---p 00000000 00:00 0<br>
b6c92000-b6d92000 rw-p 00000000 00:00 0<br>
b6d92000-b6d98000 r-xp 00000000 ca:00 1840280 /opt/chef/embedded/lib/libffi.so.6.0.4<br>
b6d98000-b6d99000 rw-p 00005000 ca:00 1840280 /opt/chef/embedded/lib/libffi.so.6.0.4<br>
b6d99000-b6db5000 r-xp 00000000 ca:00 1847430 /opt/chef/embedded/lib/ruby/gems/2.2.0/gems/ffi-1.9.10/lib/ffi_c.so<br>
b6db5000-b6db6000 rw-p 0001c000 ca:00 1847430 /opt/chef/embedded/lib/ruby/gems/2.2.0/gems/ffi-1.9.10/lib/ffi_c.so<br>
b6db6000-b6db7000 r-xp 00000000 ca:00 1841159 /opt/chef/embedded/lib/ruby/2.2.0/i686-linux/digest/md5.so<br>
b6db7000-b6db8000 rw-p 00000000 ca:00 1841159 /opt/chef/embedded/lib/ruby/2.2.0/i686-linux/digest/md5.so<br>
b6db8000-b6db9000 r-xp 00000000 ca:00 1841156 /opt/chef/embedded/lib/ruby/2.2.0/i686-linux/digest/sha2.so<br>
b6db9000-b6dba000 rw-p 00000000 ca:00 1841156 /opt/chef/embedded/lib/ruby/2.2.0/i686-linux/digest/sha2.so<br>
b6dba000-b6dd6000 r-xp 00000000 ca:00 1840254 /opt/chef/embedded/lib/libyaml-0.so.2.0.4<br>
b6dd6000-b6dd7000 rw-p 0001b000 ca:00 1840254 /opt/chef/embedded/lib/libyaml-0.so.2.0.4<br>
b6dd7000-b6ddd000 r-xp 00000000 ca:00 1841070 /opt/chef/embedded/lib/ruby/2.2.0/i686-linux/psych.so<br>
b6ddd000-b6dde000 rw-p 00005000 ca:00 1841070 /opt/chef/embedded/lib/ruby/2.2.0/i686-linux/psych.so<br>
b6dde000-b6de5000 r-xp 00000000 ca:00 1846736 /opt/chef/embedded/lib/ruby/gems/2.2.0/gems/json-1.8.3/lib/json/ext/generator.so<br>
b6de5000-b6de6000 rw-p 00006000 ca:00 1846736 /opt/chef/embedded/lib/ruby/gems/2.2.0/gems/json-1.8.3/lib/json/ext/generator.so<br>
b6de6000-b6de7000 r-xp 00000000 ca:00 1841107 /opt/chef/embedded/lib/ruby/2.2.0/i686-linux/enc/utf_32le.so<br>
b6de7000-b6de8000 rw-p 00000000 ca:00 1841107 /opt/chef/embedded/lib/ruby/2.2.0/i686-linux/enc/utf_32le.so<br>
b6de8000-b6de9000 r-xp 00000000 ca:00 1841115 /opt/chef/embedded/lib/ruby/2.2.0/i686-linux/enc/utf_32be.so<br>
b6de9000-b6dea000 rw-p 00000000 ca:00 1841115 /opt/chef/embedded/lib/ruby/2.2.0/i686-linux/enc/utf_32be.so<br>
b6dea000-b6deb000 r-xp 00000000 ca:00 1841134 /opt/chef/embedded/lib/ruby/2.2.0/i686-linux/enc/utf_16le.so<br>
b6deb000-b6dec000 rw-p 00000000 ca:00 1841134 /opt/chef/embedded/lib/ruby/2.2.0/i686-linux/enc/utf_16le.so<br>
b6dec000-b6ded000 r-xp 00000000 ca:00 1841127 /opt/chef/embedded/lib/ruby/2.2.0/i686-linux/enc/utf_16be.so<br>
b6ded000-b6dee000 rw-p 00000000 ca:00 1841127 /opt/chef/embedded/lib/ruby/2.2.0/i686-linux/enc/utf_16be.so<br>
b6dee000-b6df3000 r-xp 00000000 ca:00 1846735 /opt/chef/embedded/lib/ruby/gems/2.2.0/gems/json-1.8.3/lib/json/ext/parser.so<br>
b6df3000-b6df4000 rw-p 00005000 ca:00 1846735 /opt/chef/embedded/lib/ruby/gems/2.2.0/gems/json-1.8.3/lib/json/ext/parser.so<br>
b6df4000-b6df7000 r-xp 00000000 ca:00 1849062 /opt/chef/embedded/lib/ruby/gems/2.2.0/gems/ffi-yajl-2.2.3/lib/ffi_yajl/ext/encoder.so<br>
b6df7000-b6df8000 rw-p 00002000 ca:00 1849062 /opt/chef/embedded/lib/ruby/gems/2.2.0/gems/ffi-yajl-2.2.3/lib/ffi_yajl/ext/encoder.so<br>
b6df8000-b6dfb000 r-xp 00000000 ca:00 1849059 /opt/chef/embedded/lib/ruby/gems/2.2.0/gems/ffi-yajl-2.2.3/lib/ffi_yajl/ext/parser.so<br>
b6dfb000-b6dfc000 rw-p 00002000 ca:00 1849059 /opt/chef/embedded/lib/ruby/gems/2.2.0/gems/ffi-yajl-2.2.3/lib/ffi_yajl/ext/parser.so<br>
b6dfc000-b6e04000 r-xp 00000000 ca:00 1848501 /opt/chef/embedded/lib/ruby/gems/2.2.0/gems/libyajl2-1.2.0/lib/libyajl2/vendored-libyajl2/lib/libyajl.so<br>
b6e04000-b6e05000 rw-p 00007000 ca:00 1848501 /opt/chef/embedded/lib/ruby/gems/2.2.0/gems/libyajl2-1.2.0/lib/libyajl2/vendored-libyajl2/lib/libyajl.so<br>
b6e05000-b6e06000 r-xp 00000000 ca:00 1849060 /opt/chef/embedded/lib/ruby/gems/2.2.0/gems/ffi-yajl-2.2.3/lib/ffi_yajl/ext/dlopen.so<br>
b6e06000-b6e07000 rw-p 00000000 ca:00 1849060 /opt/chef/embedded/lib/ruby/gems/2.2.0/gems/ffi-yajl-2.2.3/lib/ffi_yajl/ext/dlopen.so<br>
b6e07000-b6e0a000 r-xp 00000000 ca:00 1841148 /opt/chef/embedded/lib/ruby/2.2.0/i686-linux/syslog.so<br>
b6e0a000-b6e0b000 rw-p 00002000 ca:00 1841148 /opt/chef/embedded/lib/ruby/2.2.0/i686-linux/syslog.so<br>
b6e0b000-b6e34000 r-xp 00000000 ca:00 1840281 /opt/chef/embedded/lib/libtinfo.so.6.0<br>
b6e34000-b6e37000 rw-p 00029000 ca:00 1840281 /opt/chef/embedded/lib/libtinfo.so.6.0<br>
b6e37000-b6e58000 r-xp 00000000 ca:00 1840256 /opt/chef/embedded/lib/libncurses.so.6.0<br>
b6e58000-b6e59000 rw-p 00021000 ca:00 1840256 /opt/chef/embedded/lib/libncurses.so.6.0<br>
b6e59000-b6e7d000 r-xp 00000000 ca:00 1840258 /opt/chef/embedded/lib/libedit.so.0.0.53<br>
b6e7d000-b6e7f000 rw-p 00023000 ca:00 1840258 /opt/chef/embedded/lib/libedit.so.0.0.53<br>
b6e7f000-b6e81000 rw-p 00000000 00:00 0<br>
b6e81000-b6e86000 r-xp 00000000 ca:00 1841141 /opt/chef/embedded/lib/ruby/2.2.0/i686-linux/readline.so<br>
b6e86000-b6e87000 rw-p 00005000 ca:00 1841141 /opt/chef/embedded/lib/ruby/2.2.0/i686-linux/readline.so<br>
b6e87000-b6e88000 r-xp 00000000 ca:00 1841084 /opt/chef/embedded/lib/ruby/2.2.0/i686-linux/fcntl.so<br>
b6e88000-b6e89000 rw-p 00000000 ca:00 1841084 /opt/chef/embedded/lib/ruby/2.2.0/i686-linux/fcntl.so<br>
b6e89000-b6ed0000 r-xp 00000000 ca:00 1841080 /opt/chef/embedded/lib/ruby/2.2.0/i686-linux/openssl.so<br>
b6ed0000-b6ed3000 rw-p 00046000 ca:00 1841080 /opt/chef/embedded/lib/ruby/2.2.0/i686-linux/openssl.so<br>
b6ed3000-b6f01000 r-xp 00000000 ca:00 1841154 /opt/chef/embedded/lib/ruby/2.2.0/i686-linux/date_core.so<br>
b6f01000-b6f03000 rw-p 0002d000 ca:00 1841154 /opt/chef/embedded/lib/ruby/2.2.0/i686-linux/date_core.soAborted<br>
'</p>
<a name="specfunctionalshell_specrb44in-read_until"></a>
<h1 >./spec/functional/shell_spec.rb:44:in `read_until'<a href="#specfunctionalshell_specrb44in-read_until" class="wiki-anchor">¶</a></h1>
<a name="specfunctionalshell_specrb107in-run_chef_shell_with"></a>
<h1 >./spec/functional/shell_spec.rb:107:in `run_chef_shell_with'<a href="#specfunctionalshell_specrb107in-run_chef_shell_with" class="wiki-anchor">¶</a></h1>
<a name="specfunctionalshell_specrb138in-block-3-levels-in-lttop-requiredgt"></a>
<h1 >./spec/functional/shell_spec.rb:138:in `block (3 levels) in <top (required)>'<a href="#specfunctionalshell_specrb138in-block-3-levels-in-lttop-requiredgt" class="wiki-anchor">¶</a></h1>
</li>
</ol>
Ruby master - Bug #11869: random hang/SegFault when accessing a missing constant in irb
https://bugs.ruby-lang.org/issues/11869?journal_id=80683
2019-08-13T04:40:51Z
jeremyevans0 (Jeremy Evans)
merch-redmine@jeremyevans.net
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li></ul>