Processed: Re: Bug#996724: ruby3.0: FTBFS on ppc64el: Segmentation fault
Processing control commands: > reopen -1 Bug #996724 {Done: Antonio Terceiro } [src:ruby3.0] ruby3.0: FTBFS on ppc64el: Segmentation fault 'reopen' may be inappropriate when a bug has been closed with a version; all fixed versions will be cleared, and you may need to re-add them. Bug reopened No longer marked as fixed in versions ruby3.0/3.0.2-5. > retitle -1 ruby3.0: Segmentation fault on ppc64el when compiled with gcc-11 Bug #996724 [src:ruby3.0] ruby3.0: FTBFS on ppc64el: Segmentation fault Changed Bug title to 'ruby3.0: Segmentation fault on ppc64el when compiled with gcc-11' from 'ruby3.0: FTBFS on ppc64el: Segmentation fault'. > severity -1 important Bug #996724 [src:ruby3.0] ruby3.0: Segmentation fault on ppc64el when compiled with gcc-11 Severity set to 'important' from 'serious' -- 996724: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=996724 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems
Bug#996724: ruby3.0: FTBFS on ppc64el: Segmentation fault
Control: reopen -1 Control: retitle -1 ruby3.0: Segmentation fault on ppc64el when compiled with gcc-11 Control: severity -1 important Hi, On Sat, Oct 30, 2021 at 08:50:10AM +0200, Lucas Nussbaum wrote: > Hi, > > On 30/10/21 at 00:13 +0200, Lucas Nussbaum wrote: > > Hi, > > > > ruby 3.0 3.0.2-4: > > - builds fine in Debian stable > > - fails in unstable > > - builds fine in unstable snapshotted on 20210930T210616Z > > - fails in unstable snapshotted on 20211014T215029Z > > I confirm that this is due to the switch from GCC 10 to GCC 11 in > gcc-defaults. > I wonder if this should be tracked separately and investigated, as it's > either a miscompilation issue in GCC 11, or a bug in Ruby 3.0... Yes. I think for now we can just reopen this bug. It would be nice to have a simpler/faster reproducer. but for now that is "revert the changes in 3.0.2-5 and do a build". signature.asc Description: PGP signature
Bug#996724: ruby3.0: FTBFS on ppc64el: Segmentation fault
Hi, On 30/10/21 at 00:13 +0200, Lucas Nussbaum wrote: > Hi, > > ruby 3.0 3.0.2-4: > - builds fine in Debian stable > - fails in unstable > - builds fine in unstable snapshotted on 20210930T210616Z > - fails in unstable snapshotted on 20211014T215029Z I confirm that this is due to the switch from GCC 10 to GCC 11 in gcc-defaults. I wonder if this should be tracked separately and investigated, as it's either a miscompilation issue in GCC 11, or a bug in Ruby 3.0... Lucas
Bug#996724: ruby3.0: FTBFS on ppc64el: Segmentation fault
Hi, ruby 3.0 3.0.2-4: - builds fine in Debian stable - fails in unstable - builds fine in unstable snapshotted on 20210930T210616Z - fails in unstable snapshotted on 20211014T215029Z The differences in terms of packages between the two last builds are: 14c14 < ii bash 5.1-3+b1 ppc64el GNU Bourne Again SHell --- > ii bash 5.1-3+b2 ppc64el >GNU Bourne Again SHell 18c18 < ii bison2:3.8.1+dfsg-1 ppc64el YACC-compatible parser generator --- > ii bison2:3.8.2+dfsg-1 ppc64el >YACC-compatible parser generator 23c23 < ii ca-certificates 20210119 all Common CA certificates --- > ii ca-certificates 20211004 all >Common CA certificates 25c25 < ii cpp 4:10.2.1-1 ppc64el GNU C preprocessor (cpp) --- > ii cpp 4:11.2.0-2 ppc64el >GNU C preprocessor (cpp) 26a27 > ii cpp-11 11.2.0-9 ppc64el >GNU C preprocessor 43c44 < ii g++ 4:10.2.1-1 ppc64el GNU C++ compiler --- > ii g++ 4:11.2.0-2 ppc64el >GNU C++ compiler 45c46,47 < ii gcc 4:10.2.1-1 ppc64el GNU C compiler --- > ii g++-11 11.2.0-9 ppc64el >GNU C++ compiler > ii gcc 4:11.2.0-2 ppc64el >GNU C compiler 48c50,51 < ii gcc-11-base:ppc64el 11.2.0-8 ppc64el GCC, the GNU Compiler Collection (base package) --- > ii gcc-11 11.2.0-9 ppc64el >GNU C compiler > ii gcc-11-base:ppc64el 11.2.0-9 ppc64el >GCC, the GNU Compiler Collection (base package) 63,64c66,67 < ii libasan6:ppc64el 11.2.0-8 ppc64el AddressSanitizer -- a fast memory error detector < ii libatomic1:ppc64el 11.2.0-8 ppc64el support library providing __atomic built-in functions --- > ii libasan6:ppc64el 11.2.0-9 ppc64el >AddressSanitizer -- a fast memory error detector > ii libatomic1:ppc64el 11.2.0-9 ppc64el >support library providing __atomic built-in functions 66,67c69,70 < ii libaudit-common 1:3.0.5-1 all Dynamic library for security auditing - common files < ii libaudit1:ppc64el1:3.0.5-1 ppc64el Dynamic library for security auditing --- > ii libaudit-common 1:3.0.6-1 all >Dynamic library for security auditing - common files > ii libaudit1:ppc64el1:3.0.6-1 ppc64el >Dynamic library for security auditing 80c83 < ii libcc1-0:ppc64el 11.2.0-8 ppc64el GCC cc1 plugin for GDB --- > ii libcc1-0:ppc64el 11.2.0-9 ppc64el >GCC cc1 plugin for GDB 97c100 < ii libffi-dev:ppc64el 3.4.2-2ppc64el Foreign Function Interface library (development files) --- > ii libffi-dev:ppc64el 3.4.2-3ppc64el >Foreign Function Interface library (development files) 99c102 < ii libffi8:ppc64el 3.4.2-2ppc64el Foreign Function Interface library runtime --- > ii libffi8:ppc64el 3.4.2-3ppc64el >Foreign Function Interface library runtime 102c105,106 < ii libgcc-s1:ppc64el11.2.0-8 ppc64el GCC support library --- > ii libgcc-11-dev:ppc64el11.2.0-9 ppc64el >GCC support library (development files) > ii libgcc-s1:ppc64el11.2.0-9 ppc64el >GCC support library 112c116 < ii libgomp1:ppc64el 11.2.0-8 ppc64el GCC OpenMP (GOMP) support library --- > ii libgomp1:ppc64el 11.2.0-9 ppc64el >GCC OpenMP (GOMP) support library 119,120c123,124 < ii libisl23:ppc64el 0.23-1 ppc64el manipulating sets and relations of integer points bounded by linear constraints < ii libitm1:ppc64el 11.2.0-8 ppc64el GNU Transactional Memory Library --- > ii
Bug#996724: ruby3.0: FTBFS on ppc64el: Segmentation fault
On Mon, Oct 18, 2021 at 01:22:25PM +0200, John Paul Adrian Glaubitz wrote: > On 10/18/21 13:16, Antonio Terceiro wrote: > > I don't think we are on the right track here. I need to read the failing > > test correctly. this "test case" alone is bogus, as > > > > ruby -e 'END {Process.kill :SEGV, $$}' > > > > is _expected_ to segfault, i.e. the process is sending a SEGV signal to > > itself. This test case is not complete. Those tests pass on the upstream master branch, but I couldn't really bisect the issue due to other build failures in the intermediary commits. In the end I "solved" this particular issue by skipping the tests that cause that failure. I'm not really happy about that, but the other 21k+ tests pass so I guess I will have to live with it. > It might be an idea to look at the Fedora package: > > > https://src.fedoraproject.org/rpms/ruby/blob/rawhide/f/ruby.spec > > It has a number of patches against 3.x: > > > https://src.fedoraproject.org/rpms/ruby/tree/rawhide > > It builds fine on ppc64el: > > > https://koji.fedoraproject.org/koji/buildinfo?buildID=1801321 The test run here runs less tests than we do so I assume there's also a skip list somewhere. > OTOH, ruby3.0 builds fine in openSUSE Factory on ppc64el, but they're still at > version 3.0.1, so it might be an issue that will only show with 3.0.2? > > > https://build.opensuse.org/package/show/openSUSE:Factory:PowerPC/ruby3.0 the build log for ppc64el also has Segmentation faults, that I assume is not being considered fatal. Thanks for your help. signature.asc Description: PGP signature
Bug#996724: ruby3.0: FTBFS on ppc64el: Segmentation fault
On 10/18/21 13:16, Antonio Terceiro wrote: > I don't think we are on the right track here. I need to read the failing > test correctly. this "test case" alone is bogus, as > > ruby -e 'END {Process.kill :SEGV, $$}' > > is _expected_ to segfault, i.e. the process is sending a SEGV signal to > itself. This test case is not complete. It might be an idea to look at the Fedora package: > https://src.fedoraproject.org/rpms/ruby/blob/rawhide/f/ruby.spec It has a number of patches against 3.x: > https://src.fedoraproject.org/rpms/ruby/tree/rawhide It builds fine on ppc64el: > https://koji.fedoraproject.org/koji/buildinfo?buildID=1801321 OTOH, ruby3.0 builds fine in openSUSE Factory on ppc64el, but they're still at version 3.0.1, so it might be an issue that will only show with 3.0.2? > https://build.opensuse.org/package/show/openSUSE:Factory:PowerPC/ruby3.0 Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `. `' Freie Universitaet Berlin - glaub...@physik.fu-berlin.de `-GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Bug#996724: ruby3.0: FTBFS on ppc64el: Segmentation fault
On Mon, Oct 18, 2021 at 12:59:35PM +0200, John Paul Adrian Glaubitz wrote: > On 10/18/21 12:51, Antonio Terceiro wrote: > >> So, we need a backtrace to see where the crash actually happens. I assume > >> it's in one > >> of the build dependencies. > > > > it happens in glibc: > > > > Program received signal SIGSEGV, Segmentation fault. > > 0x77a48f04 in kill () from /lib/powerpc64le-linux-gnu/libc.so.6 > > Hmm, both were built with glibc 2.32-4. I don't think we are on the right track here. I need to read the failing test correctly. this "test case" alone is bogus, as ruby -e 'END {Process.kill :SEGV, $$}' is _expected_ to segfault, i.e. the process is sending a SEGV signal to itself. This test case is not complete. signature.asc Description: PGP signature
Bug#996724: ruby3.0: FTBFS on ppc64el: Segmentation fault
On 10/18/21 12:51, Antonio Terceiro wrote: >> So, we need a backtrace to see where the crash actually happens. I assume >> it's in one >> of the build dependencies. > > it happens in glibc: > > Program received signal SIGSEGV, Segmentation fault. > 0x77a48f04 in kill () from /lib/powerpc64le-linux-gnu/libc.so.6 Hmm, both were built with glibc 2.32-4. Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `. `' Freie Universitaet Berlin - glaub...@physik.fu-berlin.de `-GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Bug#996724: ruby3.0: FTBFS on ppc64el: Segmentation fault
On Mon, Oct 18, 2021 at 10:00:42AM +0200, John Paul Adrian Glaubitz wrote: > Hello! > > On 10/17/21 21:50, John Paul Adrian Glaubitz wrote: > > Ah, so the last successful build was 3.0.2-2 and the first failure was in > > 3.0.2-3, > > the only difference being the mipsel patch to fix an unaligned access. > > > > However, 3.0.2-2 was built with gcc-10: > > > >> https://buildd.debian.org/status/fetch.php?pkg=ruby3.0&arch=ppc64el&ver=3.0.2-2&stamp=1633362713&raw=0 > > > > while 3.0.2-3 was built with gcc-11: > > > >> https://buildd.debian.org/status/fetch.php?pkg=ruby3.0&arch=ppc64el&ver=3.0.2-3&stamp=1634169532&raw=0 > > > > So, first we should try building with gcc-10 and see if that makes a > > difference. > > I have tested the build with gcc-10 but the problem remains, so it's not a > compiler > issue. Dropping the patch rand_init-fix-off-by-one-error.patch that was > introduced > with 3.0.2-3 doesn't help either. > > So, we need a backtrace to see where the crash actually happens. I assume > it's in one > of the build dependencies. it happens in glibc: Program received signal SIGSEGV, Segmentation fault. 0x77a48f04 in kill () from /lib/powerpc64le-linux-gnu/libc.so.6 #0 0x77a48f04 in kill () from /lib/powerpc64le-linux-gnu/libc.so.6 #1 0x00010023a8ec in rb_f_kill (argc=, argv=) at signal.c:481 #2 0x0001001d0608 in proc_rb_f_kill (c=, v=, _=) at process.c:8605 #3 0x0001002bd848 in ractor_safe_call_cfunc_m1 (recv=, argc=, argv=, func=) at vm_insnhelper.c:2736 #4 0x0001002d2e6c in vm_call_cfunc_with_frame (ec=0x100453ad0, reg_cfp=0x779effa0, calling=) at vm_insnhelper.c:2926 #5 0x0001002d5bb4 in vm_sendish (ec=0x100453ad0, reg_cfp=0x779effa0, cd=0x1005a0960, block_handler=, method_explorer=) at vm_callinfo.h:336 #6 0x0001002da06c in vm_exec_core (ec=0x100453ad0, initial=, initial@entry=0) at insns.def:789 #7 0x0001002dfcb0 in rb_vm_exec (ec=0x100453ad0, mjit_enable_p=) at vm.c:2172 #8 0x0001002e5d7c in invoke_block (captured=, captured=, opt_pc=, type=, cref=0x0, self=4300276880, iseq=0x10046a478, ec=0x100453ad0) at vm.c:1263 #9 invoke_iseq_block_from_c (me=0x0, is_lambda=0, cref=0x0, passed_block_handler=0, kw_splat=0, argv=0x10046a280, argc=0, self=4300276880, captured=, ec=0x100453ad0) at vm.c:1335 #10 invoke_block_from_c_proc (me=0x0, is_lambda=, passed_block_handler=0, kw_splat=0, argv=0x10046a280, argc=0, self=4300276880, proc=, ec=0x100453ad0) at vm.c:1435 #11 vm_invoke_proc (ec=0x100453ad0, proc=, self=4300276880, argc=, argv=0x10046a280, kw_splat=, passed_block_handler=0) at vm.c:1464 #12 0x0001001c8ffc in rb_proc_call (self=, args=) at proc.c:986 #13 0x0001000c9cb0 in rb_call_end_proc (data=4299596440) at eval_jump.c:13 #14 0x0001000c9d64 in exec_end_procs_chain (procs=procs@entry=0x10043a750 , errp=errp@entry=0x100453b48) at eval_jump.c:105 #15 0x0001000cf9fc in rb_ec_exec_end_proc (ec=ec@entry=0x100453ad0) at eval_jump.c:120 #16 0x0001000cfd84 in rb_ec_teardown (ec=ec@entry=0x100453ad0) at eval.c:175 #17 0x0001000d0068 in rb_ec_cleanup (ec=ec@entry=0x100453ad0, ex=) at eval.c:243 #18 0x0001000d0598 in ruby_run_node (n=0x10046a5b8) at eval.c:375 #19 0x00010002aaa8 in main (argc=, argv=) at ./main.c:50 signature.asc Description: PGP signature
Bug#996724: ruby3.0: FTBFS on ppc64el: Segmentation fault
Hello! On 10/17/21 21:50, John Paul Adrian Glaubitz wrote: > Ah, so the last successful build was 3.0.2-2 and the first failure was in > 3.0.2-3, > the only difference being the mipsel patch to fix an unaligned access. > > However, 3.0.2-2 was built with gcc-10: > >> https://buildd.debian.org/status/fetch.php?pkg=ruby3.0&arch=ppc64el&ver=3.0.2-2&stamp=1633362713&raw=0 > > while 3.0.2-3 was built with gcc-11: > >> https://buildd.debian.org/status/fetch.php?pkg=ruby3.0&arch=ppc64el&ver=3.0.2-3&stamp=1634169532&raw=0 > > So, first we should try building with gcc-10 and see if that makes a > difference. I have tested the build with gcc-10 but the problem remains, so it's not a compiler issue. Dropping the patch rand_init-fix-off-by-one-error.patch that was introduced with 3.0.2-3 doesn't help either. So, we need a backtrace to see where the crash actually happens. I assume it's in one of the build dependencies. Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `. `' Freie Universitaet Berlin - glaub...@physik.fu-berlin.de `-GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Bug#996724: ruby3.0: FTBFS on ppc64el: Segmentation fault
Hi! On 10/17/21 21:47, John Paul Adrian Glaubitz wrote: > Since ruby3.0 used to build fine on ppc64el in the past, the easiest way would > be to just bisect the issue. I can give it a try and see if I can find the > problematic commit. Ah, so the last successful build was 3.0.2-2 and the first failure was in 3.0.2-3, the only difference being the mipsel patch to fix an unaligned access. However, 3.0.2-2 was built with gcc-10: > https://buildd.debian.org/status/fetch.php?pkg=ruby3.0&arch=ppc64el&ver=3.0.2-2&stamp=1633362713&raw=0 while 3.0.2-3 was built with gcc-11: > https://buildd.debian.org/status/fetch.php?pkg=ruby3.0&arch=ppc64el&ver=3.0.2-3&stamp=1634169532&raw=0 So, first we should try building with gcc-10 and see if that makes a difference. Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `. `' Freie Universitaet Berlin - glaub...@physik.fu-berlin.de `-GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Bug#996724: ruby3.0: FTBFS on ppc64el: Segmentation fault
Hello Antonio! On 10/17/21 20:57, Antonio Terceiro wrote: > I'm copying the debian-powerpc list to see if anyone can help. > > ruby3.0 fails to build on ppc64el. 4 test cases results in Segmentation > faults. > > I was able to reproduce this on the porter box, and the minimal test > case, inside a build source tree, is this: > > ./miniruby -e 'END {Process.kill :SEGV, $$}' Since ruby3.0 used to build fine on ppc64el in the past, the easiest way would be to just bisect the issue. I can give it a try and see if I can find the problematic commit. Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `. `' Freie Universitaet Berlin - glaub...@physik.fu-berlin.de `-GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Bug#996724: ruby3.0: FTBFS on ppc64el: Segmentation fault
Source: ruby3.0 Version: 3.0.2-4 Severity: serious Justification: FTBFS Tags: bookworm sid ftbfs X-Debbugs-CC: debian-powe...@lists.debian.org I'm copying the debian-powerpc list to see if anyone can help. ruby3.0 fails to build on ppc64el. 4 test cases results in Segmentation faults. I was able to reproduce this on the porter box, and the minimal test case, inside a build source tree, is this: ./miniruby -e 'END {Process.kill :SEGV, $$}' The actual build failures are: > 1) Failure: > TestBugReporter#test_bug_reporter_add > [/<>/test/-ext-/bug_reporter/test_bug_reporter.rb:24]: > pid 111637 killed by SIGSEGV (signal 11) > | -:1: [BUG] Segmentation fault at 0x0b880001b415 > | ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [powerpc64le-linux-gnu] > | > | -- Control frame information --- > | c:0003 p: s:0012 e:11 CFUNC :kill > | c:0002 p:0021 s:0006 e:05 EVAL -:1 [FINISH] > | c:0001 p: s:0003 E:c0 (none) [FINISH] > | > | -- Ruby level backtrace information > | -:1:in `' > | -:1:in `kill' > | > | -- C level backtrace information --- > . > > 1. [2/2] Assertion for "stderr" >| Expected /Sample bug reporter: 12345/ >| to match >| "-- Control frame information > ---\n"+ >| "c:0003 p: s:0012 e:11 CFUNC :kill\n"+ >| "c:0002 p:0021 s:0006 e:05 EVAL -:1 [FINISH]\n"+ >| "c:0001 p: s:0003 E:c0 (none) [FINISH]\n\n"+ >| "-- Ruby level backtrace information > \n"+ >| "-:1:in `'\n"+ >| "-:1:in `kill'\n\n"+ >| "-- C level backtrace information > ---\n" >| after 4 patterns with 125 characters. > > 2) Failure: > TestRubyOptions#test_segv_loaded_features > [/<>/test/ruby/test_rubyoptions.rb:757]: > pid 119318 killed by SIGSEGV (signal 11) > | -e:1: [BUG] Segmentation fault at 0x0b880001d216 > | ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [powerpc64le-linux-gnu] > | > | -- Control frame information --- > | c:0003 p: s:0012 e:11 CFUNC :kill > | c:0002 p:0016 s:0006 e:05 BLOCK -e:1 [FINISH] > | c:0001 p: s:0003 E:001240 (none) [FINISH] > | > | -- Ruby level backtrace information > | -e:1:in `block in ' > | -e:1:in `kill' > | > | -- C level backtrace information --- > . > > 1. [2/2] Assertion for "stderr" >| <""> expected but was >| <"-- C level backtrace information > ---\n">. > > 3) Failure: > TestRubyOptions#test_segv_setproctitle > [/<>/test/ruby/test_rubyoptions.rb:771]: > pid 119319 killed by SIGSEGV (signal 11) > | -e:1: [BUG] Segmentation fault at 0x0b880001d217 > | ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [powerpc64le-linux-gnu] > | > | -- Control frame information --- > | c:0003 p: s:0012 e:11 CFUNC :kill > | c:0002 p:0029 s:0006 e:05 EVAL -e:1 [FINISH] > | c:0001 p: s:0003 E:001a80 (none) [FINISH] > | > | -- Ruby level backtrace information > | -e:1:in `' > | -e:1:in `kill' > | > | -- C level backtrace information --- > . > > 1. [2/2] Assertion for "stderr" >| <""> expected but was >| <"-- C level backtrace information > ---\n">. > > 4) Failure: > TestRubyOptions#test_segv_test > [/<>/test/ruby/test_rubyoptions.rb:751]: > pid 119320 killed by SIGSEGV (signal 11) > | -e:1: [BUG] Segmentation fault at 0x0b880001d218 > | ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [powerpc64le-linux-gnu] > | > | -- Control frame information --- > | c:0003 p: s:0012 e:11 CFUNC :kill > | c:0002 p:0015 s:0006 e:05 EVAL -e:1 [FINISH] > | c:0001 p: s:0003 E:001870 (none) [FINISH] > | > | -- Ruby level backtrace information > | -e:1:in `' > | -e:1:in `kill' > | > | -- C level backtrace information --- > . > > 1. [2/2] Assertion for "stderr" >| <""> expected but was >| <"-- C level backtrace information > ---\n">. > > Finished tests in 784.310094s, 26.8248 tests/s, 3410.9162 assertions/s. > 21039 tests, 2675216 assertions, 4 failures, 0 errors, 107 skips > > ruby -v: ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) > [powerpc64le-linux-gnu] > make[2]: *** [uncommon.mk:800: yes-test-all] Error 4 The full build log is available from: http://qa-logs.debian.net/2021/10/17/ruby3.0.log A list of current common problems and possible solutions is available at http: