[#28687] [Bug #2973] rb_bug - Segmentation fault - error.c:213 — rudolf gavlas <redmine@...>

Bug #2973: rb_bug - Segmentation fault - error.c:213

10 messages 2010/03/16

[#28735] [Bug #2982] Ruby tries to link with both openssl and readline — Lucas Nussbaum <redmine@...>

Bug #2982: Ruby tries to link with both openssl and readline

16 messages 2010/03/18

[#28736] [Bug #2983] Ruby (GPLv2 only) tries to link to with readline (now GPLv3) — Lucas Nussbaum <redmine@...>

Bug #2983: Ruby (GPLv2 only) tries to link to with readline (now GPLv3)

10 messages 2010/03/18

[#28907] [Bug #3000] Open SSL Segfaults — Christian Höltje <redmine@...>

Bug #3000: Open SSL Segfaults

19 messages 2010/03/23

[#28924] [Bug #3005] Ruby core dump - [BUG] rb_sys_fail() - errno == 0 — Sebastian YEPES <redmine@...>

Bug #3005: Ruby core dump - [BUG] rb_sys_fail() - errno == 0

10 messages 2010/03/24

[#28954] [Feature #3010] slow require gems in ruby 1.9.1 — Miao Jiang <redmine@...>

Feature #3010: slow require gems in ruby 1.9.1

15 messages 2010/03/24

[#29179] [Bug #3071] Convert rubygems and rdoc to use psych — Aaron Patterson <redmine@...>

Bug #3071: Convert rubygems and rdoc to use psych

10 messages 2010/03/31

[ruby-core:28605] [Bug #2739] ruby 1.8.7 built with pthreads hangs under some circumstances

From: Lucas Nussbaum <redmine@...>
Date: 2010-03-11 06:34:36 UTC
List: ruby-core #28605
Issue #2739 has been updated by Lucas Nussbaum.


I'm building with:
CFLAGS="-fno-strict-aliasing -g -O2" CXXFLAGS="-fno-strict-aliasing -g" CPPFLAGS="" LDFLAGS="" ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir="\${prefix}/include" --mandir="\${prefix}/share/man" --infodir="\${prefix}/share/info" --sysconfdir=/etc --localstatedir=/var --libexecdir="\${prefix}/lib/ruby1.8" --disable-maintainer-mode --disable-dependency-tracking --disable-silent-rules --srcdir=.   --program-suffix=1.8 --enable-pthread --enable-shared --enable-ipv6 --with-lookup-order-hack=INET --disable-rpath --disable-install-doc --with-sitedir='/usr/local/lib/site_ruby' --with-default-kcode=none --with-dbm-type=gdbm_compat --with-tklib=tk8.4 --with-tcllib=tcl8.4 --with-tcl-include=/usr/include/tcl8.4 --with-bundled-sha1 --with-bundled-md5 --with-bundled-rmd160 && make all && sudo make install

What I did when you proposed the patches was to rebuild the Debian package with the patches. And indeed, the problem remained, and the backtraces are:
Child:
#0  __lll_lock_wait ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:136
#1  0x00007f3d5ed2f40b in pthread_cond_signal@@GLIBC_2.3.2 ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:117
#2  0x00007f3d5ef75308 in rb_thread_stop_timer () at eval.c:12539
#3  0x00007f3d5e1a7e66 in __libc_fork ()
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/../fork.c:170
#4  0x00007f3d5efc6611 in rb_f_system (argc=<value optimized out>, 
    argv=0x7fff7e47c170) at process.c:1584
#5  0x00007f3d5ef7efdc in rb_call0 (klass=<value optimized out>, 
    recv=<value optimized out>, id=<value optimized out>, 
    oid=<value optimized out>, argc=<value optimized out>, 
    argv=<value optimized out>, body=0x7f3d5f4214d8, flags=0)
    at eval.c:6003
#6  0x00007f3d5ef7f1c3 in rb_call (klass=139901568018760, 
    recv=139901568008880, mid=9425, argc=1, argv=0x7fff7e47c170, 
    scope=1, self=139901568008880) at eval.c:6255
#7  0x00007f3d5ef7becb in rb_eval (self=140735312019832,
    n=<value optimized out>) at eval.c:3583
#8  0x00007f3d5ef7d327 in rb_yield_0 (val=<value optimized out>, 
    self=<value optimized out>, klass=<value optimized out>, 
    flags=<value optimized out>, avalue=<value optimized out>)
    at eval.c:5167
#9  0x00007f3d5ef79662 in rb_eval (self=140735312033144, 
    n=<value optimized out>) at eval.c:3371
#10 0x00007f3d5ef7c427 in rb_eval (self=140735312033144, 
    n=<value optimized out>) at eval.c:3382
#11 0x00007f3d5ef7c560 in rb_eval (self=140735312033144, 
    n=<value optimized out>) at eval.c:3432
#12 0x00007f3d5ef7ee60 in rb_call0 (klass=<value optimized out>, recv=0, 
    id=140735312033144, oid=<value optimized out>, argc=0, 
    argv=0x7fff7e47f578, body=0x7f3d5f418068, flags=0) at eval.c:6158
#13 0x00007f3d5ef7f1c3 in rb_call (klass=139901567846520, 
    recv=139901567847360, mid=11025, argc=1, argv=0x7fff7e47f570, 
    scope=0, self=139901568008880) at eval.c:6255
#14 0x00007f3d5ef7bfd2 in rb_eval (self=1, n=<value optimized out>)
    at eval.c:3568
#15 0x00007f3d5ef7c8ba in rb_eval (self=0, n=<value optimized out>)
    at eval.c:3296
#16 0x00007f3d5ef79b66 in rb_eval (self=0, n=<value optimized out>)
    at eval.c:3762
#17 0x00007f3d5ef883cb in ruby_exec_internal () at eval.c:1689
#18 0x00007f3d5ef883f5 in ruby_exec () at eval.c:1712
#19 0x00007f3d5ef88425 in ruby_run () at eval.c:1722
#20 0x00000000004008d1 in main ()


Parent:
#0  0x00007f3d5e1cff82 in select () from /lib/libc.so.6
#1  0x00007f3d5ef8459b in rb_thread_schedule () at eval.c:11280
#2  0x00007f3d5efc6185 in rb_waitpid (pid=<value optimized out>, 
    st=<value optimized out>, flags=1) at process.c:597
#3  0x00007f3d5efc6484 in rb_syswait (pid=16044) at process.c:1442
#4  0x00007f3d5efc6625 in rb_f_system (argc=<value optimized out>, 
    argv=0x7fff7e47c170) at process.c:1601
#5  0x00007f3d5ef7efdc in rb_call0 (klass=<value optimized out>, 
    recv=<value optimized out>, id=<value optimized out>, 
    oid=<value optimized out>, argc=<value optimized out>, 
    argv=<value optimized out>, body=0x7f3d5f4214d8, flags=0)
    at eval.c:6003
#6  0x00007f3d5ef7f1c3 in rb_call (klass=139901568018760, 
    recv=139901568008880, mid=9425, argc=1, argv=0x7fff7e47c170, 
    scope=1, self=139901568008880) at eval.c:6255
#7  0x00007f3d5ef7becb in rb_eval (self=140735312019832, 
    n=<value optimized out>) at eval.c:3583
#8  0x00007f3d5ef7d327 in rb_yield_0 (val=<value optimized out>, 
    self=<value optimized out>, klass=<value optimized out>, 
    flags=<value optimized out>, avalue=<value optimized out>)
    at eval.c:5167
#9  0x00007f3d5ef79662 in rb_eval (self=140735312033144, 
    n=<value optimized out>) at eval.c:3371
#10 0x00007f3d5ef7c427 in rb_eval (self=140735312033144, 
    n=<value optimized out>) at eval.c:3382
#11 0x00007f3d5ef7c560 in rb_eval (self=140735312033144, 
    n=<value optimized out>) at eval.c:3432
#12 0x00007f3d5ef7ee60 in rb_call0 (klass=<value optimized out>, recv=0, 
    id=140735312033144, oid=<value optimized out>, argc=0, 
    argv=0x7fff7e47f578, body=0x7f3d5f418068, flags=0) at eval.c:6158
#13 0x00007f3d5ef7f1c3 in rb_call (klass=139901567846520,
    recv=139901567847360, mid=11025, argc=1, argv=0x7fff7e47f570, 
    scope=0, self=139901568008880) at eval.c:6255
#14 0x00007f3d5ef7bfd2 in rb_eval (self=1, n=<value optimized out>)
    at eval.c:3568
#15 0x00007f3d5ef7c8ba in rb_eval (self=0, n=<value optimized out>)
    at eval.c:3296
#16 0x00007f3d5ef79b66 in rb_eval (self=0, n=<value optimized out>)
    at eval.c:3762
#17 0x00007f3d5ef883cb in ruby_exec_internal () at eval.c:1689
#18 0x00007f3d5ef883f5 in ruby_exec () at eval.c:1712
#19 0x00007f3d5ef88425 in ruby_run () at eval.c:1722
#20 0x00000000004008d1 in main ()

But applying the patch to the svn tree (branch v1_8_7) works, strangely. This is very surprising, because the Debian package and the SVN tree should be almost identical (we do have a few Debian-specific things, but nothing that should be relevant). I tried to download the ruby-1.8.7-p249.tar.gz tarball, and rebuild it with the patch applied, and it works like the SVN branch (=> the patch works).

Conclusion: your patch fixes the bug, and we have something broken in the Debian package that causes the effects of your patch to be hidden. Would you happen to know if something in the Ruby build process could explain that?

Anyway, thanks a lot for working on that issue! What is the next step? Are you going to release a 1.8.7.250?
----------------------------------------
http://redmine.ruby-lang.org/issues/show/2739

----------------------------------------
http://redmine.ruby-lang.org

In This Thread