ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: "vo.x (Vit Ondruch)" <noreply@ruby-lang.org>
To: ruby-core@ruby-lang.org
Subject: [ruby-core:104929] [Ruby master Bug#17052] Ruby with LTO enabled has issues with SIGSEGV handler
Date: Mon, 16 Aug 2021 18:44:15 +0000 (UTC)	[thread overview]
Message-ID: <redmine.journal-93295.20210816184414.703@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-17052.20200727122732.703@ruby-lang.org

Issue #17052 has been updated by vo.x (Vit Ondruch).

Status changed from Closed to Open

Thank you for looking into this.

Unfortunately, I have tried commit:git|72317b333b85eed483ad00bcd4f40944019a7c13 and I see no difference.

BTW I test Ruby 3.0.2 including the following commits:

1) commit:git|9e5105ca451d6d38eb2d03a2ffc904074f0333b9 from #17585
2) https://github.com/ruby/ruby/pull/4439

----------------------------------------
Bug #17052: Ruby with LTO enabled has issues with SIGSEGV handler
https://bugs.ruby-lang.org/issues/17052#change-93295

* Author: vo.x (Vit Ondruch)
* Status: Open
* Priority: Normal
* ruby -v: ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [powerpc64le-linux]
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN
----------------------------------------
Fedora aims to enable link time optimization (LTO) of packages in next release. The specific changes in configuration options are available here [1]. Since that time, I observe following errors [2] at least on {aarch64,ppc64le} (and possibly also other architectures):

~~~
  1) Failure:
TestBugReporter#test_bug_reporter_add [/builddir/build/BUILD/ruby-2.7.1/test/-ext-/bug_reporter/test_bug_reporter.rb:22]:
pid 32395 killed by SIGSEGV (signal 11) (core dumped)
| -:1: [BUG] Segmentation fault at 0x000003e800007e8b
| ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [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:000f80 (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:000f80 (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 120 characters.
  2) Failure:
TestRubyOptions#test_segv_loaded_features [/builddir/build/BUILD/ruby-2.7.1/test/ruby/test_rubyoptions.rb:735]:
pid 38444 killed by SIGSEGV (signal 11) (core dumped)
| -e:1: [BUG] Segmentation fault at 0x000003e80000962c
| ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [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:002460 (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-2.7.1/test/ruby/test_rubyoptions.rb:749]:
pid 38451 killed by SIGSEGV (signal 11) (core dumped)
| -e:1: [BUG] Segmentation fault at 0x000003e800009633
| ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [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:000480 (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-2.7.1/test/ruby/test_rubyoptions.rb:729]:
pid 38460 killed by SIGSEGV (signal 11) (core dumped)
| -e:1: [BUG] Segmentation fault at 0x000003e80000963c
| ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [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:0006a0 (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">.
Finished tests in 840.600443s, 25.0047 tests/s, 3238.9681 assertions/s.
21019 tests, 2722678 assertions, 4 failures, 0 errors, 70 skips
ruby -v: ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [powerpc64le-linux]
~~~

When I raised the issue on fedora-devel ML [3], there was suggestion that it might happen when signal handler modifies any global variable. Now I am not sure if that is the case. Can somebody confirm? Or investigate/fix this, please?



[1]: https://src.fedoraproject.org/rpms/redhat-rpm-config/c/5baaf4a99cc77572d3496a7000674098bef7ed68?branch=master
[2]: https://koschei.fedoraproject.org/package/ruby
[3]: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/D6YUXPU5C2RWIQMNHLT4HBYXUGVKKPOW/

---Files--------------------------------
ruby-addr2line-DW_FORM_ref_addr.patch (651 Bytes)
ruby-addr2line-read_abstract_origin.patch (1.37 KB)


-- 
https://bugs.ruby-lang.org/

  parent reply	other threads:[~2021-08-16 18:44 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-27 12:27 [ruby-core:99351] [Ruby master Bug#17052] Ruby with LTO enabled on {aarch64, ppc64le} architectures v.ondruch
2020-07-27 15:02 ` [ruby-core:99353] [Ruby master Bug#17052] Ruby with LTO enabled has issues with SIGSEGV handler v.ondruch
2020-08-20  3:52 ` [ruby-core:99651] " shyouhei
2020-08-20  3:53 ` [ruby-core:99652] " shyouhei
2020-08-20  7:43 ` [ruby-core:99653] " v.ondruch
2020-08-20  7:44 ` [ruby-core:99654] " v.ondruch
2021-08-09 10:22 ` [ruby-core:104839] " v.ondruch
2021-08-09 10:33 ` [ruby-core:104841] " v.ondruch
2021-08-12 15:59 ` [ruby-core:104900] " v.ondruch
2021-08-12 22:04 ` [ruby-core:104903] " xtkoba+ruby
2021-08-13 11:14 ` [ruby-core:104908] " xtkoba+ruby
2021-08-13 13:45 ` [ruby-core:104911] " xtkoba+ruby
2021-08-16 18:44 ` vo.x (Vit Ondruch) [this message]
2021-08-16 19:46 ` [ruby-core:104931] " xtkoba (Tee KOBAYASHI)
2021-08-16 22:00 ` [ruby-core:104933] " vo.x (Vit Ondruch)
2021-08-16 22:02 ` [ruby-core:104934] " vo.x (Vit Ondruch)
2021-08-17  7:52 ` [ruby-core:104947] " xtkoba (Tee KOBAYASHI)
2021-08-17 10:06 ` [ruby-core:104953] " xtkoba (Tee KOBAYASHI)
2021-08-17 14:16 ` [ruby-core:104955] " xtkoba (Tee KOBAYASHI)
2021-08-18 17:34 ` [ruby-core:104973] " vo.x (Vit Ondruch)
2021-08-18 18:08 ` [ruby-core:104974] " xtkoba (Tee KOBAYASHI)
2021-08-18 20:20 ` [ruby-core:104975] " vo.x (Vit Ondruch)
2021-08-18 21:29 ` [ruby-core:104979] " xtkoba (Tee KOBAYASHI)
2021-08-19  4:50 ` [ruby-core:104988] " vo.x (Vit Ondruch)
2021-08-19 12:52 ` [ruby-core:105007] " xtkoba (Tee KOBAYASHI)
2021-08-23 13:55 ` [ruby-core:105049] " vo.x (Vit Ondruch)
2021-08-23 14:20 ` [ruby-core:105050] " xtkoba (Tee KOBAYASHI)
2021-08-23 15:41 ` [ruby-core:105051] " vo.x (Vit Ondruch)
2021-08-23 16:06 ` [ruby-core:105052] " xtkoba (Tee KOBAYASHI)
2021-08-23 16:46 ` [ruby-core:105053] " vo.x (Vit Ondruch)
2021-08-23 17:07 ` [ruby-core:105054] " xtkoba (Tee KOBAYASHI)
2021-08-23 18:08 ` [ruby-core:105055] " vo.x (Vit Ondruch)
2021-08-25  9:43 ` [ruby-core:105067] " vo.x (Vit Ondruch)
2021-08-25 14:13 ` [ruby-core:105068] " xtkoba (Tee KOBAYASHI)
2021-09-11  4:55 ` [ruby-core:105193] " nagachika (Tomoyuki Chikanaga)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.journal-93295.20210816184414.703@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).