Project

General

Profile

Bug #12603

Segmentation fault random in irb with ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux-musl]

Added by dlupu (Dorian LUPU) about 3 years ago. Updated 7 days ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux-musl]
Backport:
[ruby-core:76476]

Description

Real example from a docker container with ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux-musl]

First start the ruby console

dlupu ~/app $ irb

Next play by typing something, anything really :)

irb(main):001:0> 313131
=> 313131
irb(main):002:0> 
irb(main):003:0* 313131
=> 313131
irb(main):004:0> 313131
=> 313131
irb(main):005:0> 313131
=> 313131
irb(main):006:0> 
irb(main):007:0* 
irb(main):008:0* 313131
=> 313131
irb(main):009:0> 
irb(main):010:0* 
irb(main):011:0* 313131
=> 313131
irb(main):012:0> 
irb(main):013:0* dqs
NameError: undefined local variable or method `dqs' for main:Object
    from (irb):13
    from /usr/bin/irb:11:in `<main>'
irb(main):014:0> 313131
=> 313131
irb(main):015:0> dqvq
NameError: /usr/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb:13: [BUG] Segmentation fault at 0x00000000000010
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux-musl]

And then this is displayed

-- Control frame information -----------------------------------------------
c:0023 p:---- s:0088 e:000087 CFUNC  :methods
c:0022 p:0048 s:0085 e:000084 METHOD /usr/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb:1 [FINISH]
c:0021 p:---- s:0080 e:000079 CFUNC  :new
c:0020 p:0076 s:0076 e:000075 METHOD /usr/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/name_error_checkers.rb:18
c:0019 p:0039 s:0072 e:000071 METHOD /usr/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/core_ext/name_error.rb:24
c:0018 p:0008 s:0069 e:000068 METHOD /usr/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/core_ext/name_error.rb:20
c:0017 p:0054 s:0066 e:000063 METHOD /usr/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/core_ext/name_error.rb:13 [FINISH]
c:0016 p:---- s:0059 e:000058 CFUNC  :write
c:0015 p:---- s:0057 e:000056 CFUNC  :print
c:0014 p:0071 s:0050 e:000049 BLOCK  /usr/lib/ruby/2.3.0/irb.rb:498
c:0013 p:0041 s:0042 e:000041 METHOD /usr/lib/ruby/2.3.0/irb.rb:623
c:0012 p:0011 s:0037 e:000036 BLOCK  /usr/lib/ruby/2.3.0/irb.rb:486
c:0011 p:0128 s:0033 e:000032 BLOCK  /usr/lib/ruby/2.3.0/irb/ruby-lex.rb:246 [FINISH]
c:0010 p:---- s:0030 e:000029 CFUNC  :loop
c:0009 p:0009 s:0027 e:000026 BLOCK  /usr/lib/ruby/2.3.0/irb/ruby-lex.rb:232 [FINISH]
c:0008 p:---- s:0025 e:000024 CFUNC  :catch
c:0007 p:0018 s:0021 e:000020 METHOD /usr/lib/ruby/2.3.0/irb/ruby-lex.rb:231
c:0006 p:0037 s:0018 E:000f50 METHOD /usr/lib/ruby/2.3.0/irb.rb:485
c:0005 p:0009 s:0015 e:000014 BLOCK  /usr/lib/ruby/2.3.0/irb.rb:395 [FINISH]
c:0004 p:---- s:0013 e:000012 CFUNC  :catch
c:0003 p:0174 s:0009 E:0008d0 METHOD /usr/lib/ruby/2.3.0/irb.rb:394
c:0002 p:0023 s:0004 E:0015a0 EVAL   /usr/bin/irb:11 [FINISH]
c:0001 p:0000 s:0002 E:000000 (none) [FINISH]

-- Ruby level backtrace information ----------------------------------------
/usr/bin/irb:11:in `<main>'
/usr/lib/ruby/2.3.0/irb.rb:394:in `start'
/usr/lib/ruby/2.3.0/irb.rb:394:in `catch'
/usr/lib/ruby/2.3.0/irb.rb:395:in `block in start'
/usr/lib/ruby/2.3.0/irb.rb:485:in `eval_input'
/usr/lib/ruby/2.3.0/irb/ruby-lex.rb:231:in `each_top_level_statement'
/usr/lib/ruby/2.3.0/irb/ruby-lex.rb:231:in `catch'
/usr/lib/ruby/2.3.0/irb/ruby-lex.rb:232:in `block in each_top_level_statement'
/usr/lib/ruby/2.3.0/irb/ruby-lex.rb:232:in `loop'
/usr/lib/ruby/2.3.0/irb/ruby-lex.rb:246:in `block (2 levels) in each_top_level_statement'
/usr/lib/ruby/2.3.0/irb.rb:486:in `block in eval_input'
/usr/lib/ruby/2.3.0/irb.rb:623:in `signal_status'
/usr/lib/ruby/2.3.0/irb.rb:498:in `block (2 levels) in eval_input'
/usr/lib/ruby/2.3.0/irb.rb:498:in `print'
/usr/lib/ruby/2.3.0/irb.rb:498:in `write'
/usr/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/core_ext/name_error.rb:13:in `to_s'
/usr/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/core_ext/name_error.rb:20:in `corrections'
/usr/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/core_ext/name_error.rb:24:in `spell_checker'
/usr/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/name_error_checkers.rb:18:in `new'
/usr/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/name_error_checkers.rb:18:in `new'
/usr/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb:13:in `initialize'
/usr/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb:13:in `methods'

-- Machine register context ------------------------------------------------
 RIP: 0x00007fe9fe41f689 RBP: 0x0000000000000020 RSP: 0x00007fff27d5a9e8
 RAX: 0x0000000000000000 RBX: 0x000055b10bbf5690 RCX: 0x0000000000000420
 RDX: 0x000055b10bc10030 RDI: 0x000055b10bbf5690 RSI: 0x0000000000000020
  R8: 0x0000000000000300  R9: 0x000055b10bbe3f00 R10: 0x000055b10b76e118
 R11: 0x000055b10b76e0a0 R12: 0x0000000000000020 R13: 0xffffffff00000000
 R14: 0x00007fe9fe684ce8 R15: 0x00007fe9fe6849e0 EFL: 0x0000000000010283

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

* Loaded script: irb

* Loaded features:

    0 enumerator.so
    1 thread.rb
    2 rational.so
    3 complex.so
    4 /usr/lib/ruby/2.3.0/x86_64-linux-musl/enc/encdb.so
    5 /usr/lib/ruby/2.3.0/x86_64-linux-musl/enc/trans/transdb.so
    6 /usr/lib/ruby/2.3.0/unicode_normalize.rb
    7 /usr/lib/ruby/2.3.0/x86_64-linux-musl/rbconfig.rb
    8 /usr/local/lib/site_ruby/2.3.0/rubygems/compatibility.rb
    9 /usr/local/lib/site_ruby/2.3.0/rubygems/defaults.rb
   10 /usr/local/lib/site_ruby/2.3.0/rubygems/deprecate.rb
   11 /usr/local/lib/site_ruby/2.3.0/rubygems/errors.rb
   12 /usr/local/lib/site_ruby/2.3.0/rubygems/version.rb
   13 /usr/local/lib/site_ruby/2.3.0/rubygems/requirement.rb
   14 /usr/local/lib/site_ruby/2.3.0/rubygems/platform.rb
   15 /usr/local/lib/site_ruby/2.3.0/rubygems/basic_specification.rb
   16 /usr/local/lib/site_ruby/2.3.0/rubygems/stub_specification.rb
   17 /usr/local/lib/site_ruby/2.3.0/rubygems/util/list.rb
   18 /usr/lib/ruby/2.3.0/x86_64-linux-musl/stringio.so
   19 /usr/local/lib/site_ruby/2.3.0/rubygems/specification.rb
   20 /usr/local/lib/site_ruby/2.3.0/rubygems/exceptions.rb
   21 /usr/local/lib/site_ruby/2.3.0/rubygems/core_ext/kernel_gem.rb
   22 /usr/lib/ruby/2.3.0/monitor.rb
   23 /usr/local/lib/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb
   24 /usr/local/lib/site_ruby/2.3.0/rubygems.rb
   25 /usr/local/lib/site_ruby/2.3.0/rubygems/path_support.rb
   26 /usr/local/lib/site_ruby/2.3.0/rubygems/dependency.rb
   27 /usr/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/version.rb
   28 /usr/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/core_ext/name_error.rb
   29 /usr/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/levenshtein.rb
   30 /usr/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/jaro_winkler.rb
   31 /usr/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkable.rb
   32 /usr/lib/ruby/2.3.0/delegate.rb
   33 /usr/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb
   34 /usr/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb
   35 /usr/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/name_error_checkers.rb
   36 /usr/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/method_name_checker.rb
   37 /usr/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/spell_checkers/null_checker.rb
   38 /usr/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean/formatter.rb
   39 /usr/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib/did_you_mean.rb
   40 /usr/lib/ruby/2.3.0/e2mmap.rb
   41 /usr/lib/ruby/2.3.0/irb/init.rb
   42 /usr/lib/ruby/2.3.0/irb/workspace.rb
   43 /usr/lib/ruby/2.3.0/irb/inspector.rb
   44 /usr/lib/ruby/2.3.0/irb/context.rb
   45 /usr/lib/ruby/2.3.0/irb/extend-command.rb
   46 /usr/lib/ruby/2.3.0/irb/output-method.rb
   47 /usr/lib/ruby/2.3.0/irb/notifier.rb
   48 /usr/lib/ruby/2.3.0/irb/slex.rb
   49 /usr/lib/ruby/2.3.0/irb/ruby-token.rb
   50 /usr/lib/ruby/2.3.0/irb/ruby-lex.rb
   51 /usr/lib/ruby/2.3.0/irb/src_encoding.rb
   52 /usr/lib/ruby/2.3.0/irb/magic-file.rb
   53 /usr/lib/ruby/2.3.0/x86_64-linux-musl/readline.so
   54 /usr/lib/ruby/2.3.0/irb/input-method.rb
   55 /usr/lib/ruby/2.3.0/irb/locale.rb
   56 /usr/lib/ruby/2.3.0/irb.rb

* Process memory map:

55b10b1a7000-55b10b1a8000 r-xp 00000000 00:14 26222                      /usr/bin/ruby
55b10b3a7000-55b10b3a8000 r--p 00000000 00:14 26222                      /usr/bin/ruby
55b10b3a8000-55b10b3a9000 rw-p 00001000 00:14 26222                      /usr/bin/ruby
55b10b6c4000-55b10bc5e000 rw-p 00000000 00:00 0                          [heap]
7fe9fd0f1000-7fe9fd340000 r-xp 00000000 00:14 8783                       /usr/lib/libncursesw.so.6.0
7fe9fd340000-7fe9fd345000 r--p 0004f000 00:14 8783                       /usr/lib/libncursesw.so.6.0
7fe9fd345000-7fe9fd346000 rw-p 00054000 00:14 8783                       /usr/lib/libncursesw.so.6.0
7fe9fd346000-7fe9fd56b000 r-xp 00000000 00:14 8688                       /usr/lib/libedit.so.0.0.53
7fe9fd56b000-7fe9fd56e000 r--p 00025000 00:14 8688                       /usr/lib/libedit.so.0.0.53
7fe9fd56e000-7fe9fd56f000 rw-p 00028000 00:14 8688                       /usr/lib/libedit.so.0.0.53
7fe9fd56f000-7fe9fd572000 rw-p 00000000 00:00 0 
7fe9fd572000-7fe9fd777000 r-xp 00000000 00:14 26992                      /usr/lib/ruby/2.3.0/x86_64-linux-musl/readline.so
7fe9fd777000-7fe9fd778000 r--p 00005000 00:14 26992                      /usr/lib/ruby/2.3.0/x86_64-linux-musl/readline.so
7fe9fd778000-7fe9fd779000 rw-p 00006000 00:14 26992                      /usr/lib/ruby/2.3.0/x86_64-linux-musl/readline.so
7fe9fd779000-7fe9fd97e000 r-xp 00000000 00:14 26996                      /usr/lib/ruby/2.3.0/x86_64-linux-musl/stringio.so
7fe9fd97e000-7fe9fd97f000 r--p 00005000 00:14 26996                      /usr/lib/ruby/2.3.0/x86_64-linux-musl/stringio.so
7fe9fd97f000-7fe9fd980000 rw-p 00006000 00:14 26996                      /usr/lib/ruby/2.3.0/x86_64-linux-musl/stringio.so
7fe9fd980000-7fe9fdb82000 r-xp 00000000 00:14 26954                      /usr/lib/ruby/2.3.0/x86_64-linux-musl/enc/trans/transdb.so
7fe9fdb82000-7fe9fdb83000 r--p 00002000 00:14 26954                      /usr/lib/ruby/2.3.0/x86_64-linux-musl/enc/trans/transdb.so
7fe9fdb83000-7fe9fdb84000 rw-p 00003000 00:14 26954                      /usr/lib/ruby/2.3.0/x86_64-linux-musl/enc/trans/transdb.so
7fe9fdb84000-7fe9fdd85000 r-xp 00000000 00:14 26911                      /usr/lib/ruby/2.3.0/x86_64-linux-musl/enc/encdb.so
7fe9fdd85000-7fe9fdd86000 r--p 00001000 00:14 26911                      /usr/lib/ruby/2.3.0/x86_64-linux-musl/enc/encdb.so
7fe9fdd86000-7fe9fdd87000 rw-p 00002000 00:14 26911                      /usr/lib/ruby/2.3.0/x86_64-linux-musl/enc/encdb.so
7fe9fdd87000-7fe9fdfe8000 r-xp 00000000 00:14 8720                       /usr/lib/libgmp.so.10.3.0
7fe9fdfe8000-7fe9fdfea000 r--p 00061000 00:14 8720                       /usr/lib/libgmp.so.10.3.0
7fe9fdfea000-7fe9fdfeb000 rw-p 00063000 00:14 8720                       /usr/lib/libgmp.so.10.3.0
7fe9fdfeb000-7fe9fe3e5000 r-xp 00000000 00:14 26268                      /usr/lib/libruby.so.2.3.0
7fe9fe3e5000-7fe9fe3ed000 r--p 001fa000 00:14 26268                      /usr/lib/libruby.so.2.3.0
7fe9fe3ed000-7fe9fe3ee000 rw-p 00202000 00:14 26268                      /usr/lib/libruby.so.2.3.0
7fe9fe3ee000-7fe9fe3fc000 rw-p 00000000 00:00 0 
7fe9fe3fc000-7fe9fe484000 r-xp 00000000 00:14 1149                       /lib/ld-musl-x86_64.so.1
7fe9fe57b000-7fe9fe57c000 r--s 00000000 00:14 366                        /etc/localtime
7fe9fe57c000-7fe9fe57d000 ---p 00000000 00:00 0 
7fe9fe57d000-7fe9fe683000 rw-p 00000000 00:00 0                          [stack:85]
7fe9fe683000-7fe9fe684000 r--p 00087000 00:14 1149                       /lib/ld-musl-x86_64.so.1
7fe9fe684000-7fe9fe685000 rw-p 00088000 00:14 1149                       /lib/ld-musl-x86_64.so.1
7fe9fe685000-7fe9fe688000 rw-p 00000000 00:00 0 
7fff27d3f000-7fff27d60000 rw-p 00000000 00:00 0 
7fff27d6f000-7fff27d71000 r--p 00000000 00:00 0                          [vvar]
7fff27d71000-7fff27d73000 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

History

#1

Updated by jeremyevans0 (Jeremy Evans) 7 days ago

  • Status changed from Open to Closed

Also available in: Atom PDF