Description of problem: It seems that since gcc-11.0.0-0.16.fc34, which enables DWARF5, Ruby test suite fils on armv7hl and ppc64 [1]. The specific test cases are checking segfault handler: ~~~ 1) Failure: TestBugReporter#test_bug_reporter_add [/builddir/build/BUILD/ruby-3.0.0/test/-ext-/bug_reporter/test_bug_reporter.rb:24]: pid 2308966 killed by SIGSEGV (signal 11) (core dumped) | -:1: [BUG] Segmentation fault at 0x000003e800233b66 | ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [powerpc64le-linux] | | -- Control frame information ----------------------------------------------- | c:0003 p:---- s:0012 e:000011 CFUNC :kill | c:0002 p:0021 s:0006 e:000005 EVAL -:1 [FINISH] | c:0001 p:0000 s:0003 E:002330 (none) [FINISH] | | -- Ruby level backtrace information ---------------------------------------- | -:1:in `<main>' | -: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:000011 CFUNC :kill\n"+ | "c:0002 p:0021 s:0006 e:000005 EVAL -:1 [FINISH]\n"+ | "c:0001 p:0000 s:0003 E:002330 (none) [FINISH]\n\n"+ | "-- Ruby level backtrace information ----------------------------------------\n"+ | "-:1:in `<main>'\n"+ | "-:1:in `kill'\n\n"+ | "-- C level backtrace information -------------------------------------------\n" | after 4 patterns with 119 characters. 2) Failure: TestRubyOptions#test_segv_loaded_features [/builddir/build/BUILD/ruby-3.0.0/test/ruby/test_rubyoptions.rb:748]: pid 2316347 killed by SIGSEGV (signal 11) (core dumped) | -e:1: [BUG] Segmentation fault at 0x000003e80023583b | ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [powerpc64le-linux] | | -- Control frame information ----------------------------------------------- | c:0003 p:---- s:0012 e:000011 CFUNC :kill | c:0002 p:0016 s:0006 e:000005 BLOCK -e:1 [FINISH] | c:0001 p:0000 s:0003 E:000540 (none) [FINISH] | | -- Ruby level backtrace information ---------------------------------------- | -e:1:in `block in <main>' | -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 [/builddir/build/BUILD/ruby-3.0.0/test/ruby/test_rubyoptions.rb:762]: pid 2316354 killed by SIGSEGV (signal 11) (core dumped) | -e:1: [BUG] Segmentation fault at 0x000003e800235842 | ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [powerpc64le-linux] | | -- Control frame information ----------------------------------------------- | c:0003 p:---- s:0012 e:000011 CFUNC :kill | c:0002 p:0029 s:0006 e:000005 EVAL -e:1 [FINISH] | c:0001 p:0000 s:0003 E:000610 (none) [FINISH] | | -- Ruby level backtrace information ---------------------------------------- | -e:1:in `<main>' | -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 [/builddir/build/BUILD/ruby-3.0.0/test/ruby/test_rubyoptions.rb:742]: pid 2316361 killed by SIGSEGV (signal 11) (core dumped) | -e:1: [BUG] Segmentation fault at 0x000003e800235849 | ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [powerpc64le-linux] | | -- Control frame information ----------------------------------------------- | c:0003 p:---- s:0012 e:000011 CFUNC :kill | c:0002 p:0015 s:0006 e:000005 EVAL -e:1 [FINISH] | c:0001 p:0000 s:0003 E:000500 (none) [FINISH] | | -- Ruby level backtrace information ---------------------------------------- | -e:1:in `<main>' | -e:1:in `kill' | | -- C level backtrace information ------------------------------------------- . 1. [2/2] Assertion for "stderr" | <""> expected but was | <"-- C level backtrace information -------------------------------------------\n">. ~~~ These test cases were always flaky and I don't think they are designed for these platforms, but while they typically used to pass, they does not pass anymore. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: [1] https://koschei.fedoraproject.org/package/ruby?collection=f34
If ruby has its own DWARF reader and that reader doesn't understand DWARF5, then that support should be added, it isn't that hard. DWARF5 has been published in February 2017, so almost 4 years ago, it is nothing really new. Unless you have evidence that this is caused by incorrect DWARF5 produced from the GCC side, I don't see what can be done on the GCC side, we are not going to switch back to DWARF4 because of this.
Is there a way to switch Ruby back to DWARF4? And why there should be issues just on two platforms?
You can use -gdwarf-4 instead of -g to force DWARF4. But the system libraries will be still using DWARF5 and so will e.g. libgcc etc. that might be linked into the libraries or binaries.
I think trying the -gdwarf-4 is probably worth the effort to try. As long as the Ruby stack doesn't need to unwind through system code that should restore proper behavior and give the Ruby project time to implement a complete dwarf-5 solution for the future. As to why it only fails on some architectures, there's a variety of reasons why this could be happening, but at the core I suspect that's just a red herring. dwarf-5 support is highly likely the core issue here.
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle. Changing version to 34.
Might this be related to https://bugzilla.redhat.com/show_bug.cgi?id=1500863 ?
(In reply to Mark Wielaard from comment #6) > Might this be related to https://bugzilla.redhat.com/show_bug.cgi?id=1500863 > ? You are right, it might. However, previously if failed occasionally, now it seems to fail deterministically. Also the platforms are different. Frankly, for Fedora/RHEL, it would be much better if the SIGSEV handler was completely removed, because such failures should be caught by ABRT instead. But I have never digged deep enough to explore this.
Ruby upstream is working on DWARF5 support, therefore I move the ticket to Ruby and going to apply the patch.
FEDORA-2021-e32e00afb5 has been pushed to the Fedora 35 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2021-358c6949a4 has been pushed to the Fedora ELN stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2021-cf72e44fc8 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-cf72e44fc8
FEDORA-2021-cf72e44fc8 has been pushed to the Fedora 34 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-cf72e44fc8` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-cf72e44fc8 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2021-cf72e44fc8 has been pushed to the Fedora 34 stable repository. If problem still persists, please make note of it in this bug report.