[DRE-maint] Bug#1024652: ruby3.0: Segmentation fault from irb when performing a simple multiplication

Bernhard Übelacker bernhardu at mailbox.org
Wed Dec 7 14:14:40 GMT 2022


Dear Gunnar,
I tried to collect some more information for the Maintainer.

First I need to create a .irbrc with the USE_SINGLELINE
set to true, to reach any function in libedit/readline.

Next I tried to reach the address given in _IO_new_file_overflow,
but was not able to. This might be related to some EOF handling
or some customer buffer settings.

Therfore, maybe you could have a look at your .irbrc
if there is any setting that sounds related.

(And just to be on the safe side, maybe you could do a memory test
to exclude a hardware failure.)

Kind regards,
Bernhard




echo IRB.conf[:USE_SINGLELINE]=true >> .irbrc


benutzer at debian:~$ irb
irb(main):001:0> 20000 * 1.03


$ gdb -q --pid $(pidof irb)
...
(gdb) bt
#0  0x00007f5639905347 in _IO_new_file_overflow at ./libio/fileops.c:757
#1  0x00007f56399044de in _IO_new_file_xsputn at ./libio/libioP.h:947
#2  _IO_new_file_xsputn at ./libio/fileops.c:1196
#3  0x00007f56398f94a9 in __GI__IO_fputs at ./libio/libioP.h:947
#4  0x00007f5635f52cf9 in terminal__putc at ./src/terminal.c:1237
#5  0x00007f5635f4f97c in re_goto_bottom at ./src/refresh.c:386
#6  0x00007f5635f47439 in ed_newline at ./src/common.c:470
#7  0x00007f5635f4e014 in el_wgets at ./src/read.c:537
#8  0x00007f5635f48f73 in el_gets at ./src/eln.c:75
#9  0x00007f5635f5c5da in readline at ./src/readline.c:486
#10 0x00007f5639cb259e in rb_protect at ./eval.c:1120
#11 0x00007f563970624a in readline_readline at ./ext/readline/readline.c:508
#12 0x00007f5639e3a5a8 in vm_call_cfunc_with_frame at ./vm_insnhelper.c:2928
#13 0x00007f5639e3ca09 in vm_sendish at ./vm_callinfo.h:336
#14 0x00007f5639e3f62e in vm_exec_core at ./insns.def:789
#15 0x00007f5639e43bbe in rb_vm_exec at ./vm.c:2171
...


(gdb) list fileops.c:757
752              Otherwise, set the read pointers to _IO_read_end (leaving that
753              alone, so it can continue to correspond to the external position). */
754           if (__glibc_unlikely (_IO_in_backup (f)))
755             {
756               size_t nbackup = f->_IO_read_end - f->_IO_read_ptr;
757               _IO_free_backup_area (f);
758               f->_IO_read_base -= MIN (nbackup,
759                                        f->_IO_read_base - f->_IO_buf_base);
760               f->_IO_read_ptr = f->_IO_read_base;
761             }


(gdb) list fileops.c:775
774       if (ch == EOF)
775         return _IO_do_write (f, f->_IO_write_base,
776                              f->_IO_write_ptr - f->_IO_write_base);
777       if (f->_IO_write_ptr == f->_IO_buf_end ) /* Buffer is really full */
778         if (_IO_do_flush (f) == EOF)
779           return EOF;


apt install systemd-coredump strace psmisc dos2unix devscripts mc gdb rr ruby pry libedit2-dbgsym libruby3.0-dbgsym
apt build-dep glibc


wget https://snapshot.debian.org/archive/debian/20221113T031952Z/pool/main/g/glibc/libc-bin_2.36-5_amd64.deb
wget https://snapshot.debian.org/archive/debian/20221113T031952Z/pool/main/g/glibc/libc-l10n_2.36-5_all.deb
wget https://snapshot.debian.org/archive/debian/20221113T031952Z/pool/main/g/glibc/libc6_2.36-5_amd64.deb
wget https://snapshot.debian.org/archive/debian/20221113T031952Z/pool/main/g/glibc/libc6-dbg_2.36-5_amd64.deb
wget https://snapshot.debian.org/archive/debian/20221113T031952Z/pool/main/g/glibc/libc6-i386_2.36-5_amd64.deb
wget https://snapshot.debian.org/archive/debian/20221113T031952Z/pool/main/g/glibc/locales_2.36-5_all.deb
wget https://snapshot.debian.org/archive/debian/20221113T031952Z/pool/main/g/glibc/libc-dev-bin_2.36-5_amd64.deb
wget https://snapshot.debian.org/archive/debian/20221113T031952Z/pool/main/g/glibc/libc6-dev_2.36-5_amd64.deb
wget https://snapshot.debian.org/archive/debian/20221113T031952Z/pool/main/g/glibc/libc6-dev-i386_2.36-5_amd64.deb
wget https://snapshot.debian.org/archive/debian/20221113T031952Z/pool/main/g/glibc/libc6-dev-x32_2.36-5_amd64.deb
wget https://snapshot.debian.org/archive/debian/20221113T031952Z/pool/main/g/glibc/libc6-x32_2.36-5_amd64.deb
dpkg -i *.deb


mkdir /home/benutzer/source/glibc/orig -p
cd    /home/benutzer/source/glibc/orig
dget https://snapshot.debian.org/archive/debian-debug/20221112T205312Z/pool/main/g/glibc/glibc_2.36-5.dsc



More information about the Pkg-ruby-extras-maintainers mailing list