ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: "froydnj (Nathan Froyd) via ruby-core" <ruby-core@ml.ruby-lang.org>
To: ruby-core@ml.ruby-lang.org
Cc: "froydnj (Nathan Froyd)" <noreply@ruby-lang.org>
Subject: [ruby-core:117503] [Ruby master Bug#20426] crash on aarch64 linux when using fibers (regression with 3.3)
Date: Fri, 12 Apr 2024 14:54:05 +0000 (UTC)	[thread overview]
Message-ID: <redmine.issue-20426.20240412145404.53292@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-20426.20240412145404.53292@ruby-lang.org

Issue #20426 has been reported by froydnj (Nathan Froyd).

----------------------------------------
Bug #20426: crash on aarch64 linux when using fibers (regression with 3.3)
https://bugs.ruby-lang.org/issues/20426

* Author: froydnj (Nathan Froyd)
* Status: Open
* ruby -v: ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [aarch64-linux]
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
We are seeing crashes when using Ruby 3.3 on aarch64-linux and the concurrent-ruby gem.  We reduced the crashing testcase to:

```
Fiber.new {}.resume
```

which crashes on 3.3.0:

```
🍖 froydnj@froydnj-arm64-devbox(graviton):~/ruby-3.3.0$ ~/ruby-3-release/bin/ruby -v
ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [aarch64-linux]
🍖 froydnj@froydnj-arm64-devbox(graviton):~/ruby-3.3.0$ ~/ruby-3-release/bin/ruby -e 'Fiber.new {}.resume'
-e:1: [BUG] Segmentation fault at 0x000baaaac8a27e30
ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [aarch64-linux]

-- Control frame information -----------------------------------------------
c:0003 p:---- s:0010 e:000009 CFUNC  :resume
c:0002 p:0007 s:0006 E:0009f0 EVAL   -e:1 [FINISH]
c:0001 p:0000 s:0003 E:0021b0 DUMMY  [FINISH]

-- Ruby level backtrace information ----------------------------------------
-e:1:in `<main>'
-e:1:in `resume'

-- Threading information ---------------------------------------------------
Total ractor count: 1
Ruby thread count for this ractor: 1

-- Machine register context ------------------------------------------------
  x0: 0x0000aaaae077e910  x1: 0x0000aaaae08a8110  x2: 0x0000ffffd5d49ff0
  x3: 0x0000ffff72bdef60  x4: 0x0000000000000004  x5: 0x0000ffff72bdf018
  x6: 0x0000ffff72b5e000  x7: 0x0000ffff72bff000 x18: 0x0000000000000000
 x19: 0x0000000000000000 x20: 0x0000000000000000 x21: 0x0000000000000000
 x22: 0x0000000000000000 x23: 0x0000000000000000 x24: 0x0000000000000000
 x25: 0x0000000000000000 x26: 0x0000000000000000 x27: 0x0000000000000000
 x28: 0x0000000000000000 x29: 0x0000000000000000  sp: 0x0000ffff72bdf000
 fau: 0x000baaaac8a27e30

-- C level backtrace information -------------------------------------------
Segmentation fault (core dumped)
```

We bisected to this commit, landed shortly before the release:

https://github.com/ruby/ruby/commit/d9e5564ccd0e460b7685b786d21cf386b229e2a9

The parent revision:

https://github.com/ruby/ruby/commit/9a3c49ee5d6dd3770c21ed8193e7efd64cd81a6e

has no problems.

Example output:

```
🍖 froydnj@froydnj-arm64-devbox(graviton):~/ruby$ ~/ruby-3-ok/bin/ruby -e 'Fiber.new {}.resume'
🍖 froydnj@froydnj-arm64-devbox(graviton):~/ruby$ echo $?
0
🍖 froydnj@froydnj-arm64-devbox(graviton):~/ruby$ ~/ruby-3-ok/bin/ruby -v
ruby 3.3.0dev (2023-12-22T01:47:36Z v3_3_0~76 9a3c49ee5d) [aarch64-linux]
🍖 froydnj@froydnj-arm64-devbox(graviton):~/ruby$ ~/ruby-3-ko/bin/ruby -e 'Fiber.new {}.resume'
-e:1: [BUG] Segmentation fault at 0x0026aaaadfeb5698
ruby 3.3.0dev (2023-12-22T02:30:00Z v3_3_0~75 d9e5564ccd) [aarch64-linux]

-- Control frame information -----------------------------------------------
c:0003 p:---- s:0010 e:000009 CFUNC  :resume
c:0002 p:0007 s:0006 E:0023c0 EVAL   -e:1 [FINISH]
c:0001 p:0000 s:0003 E:0004d0 DUMMY  [FINISH]

-- Ruby level backtrace information ----------------------------------------
-e:1:in `<main>'
-e:1:in `resume'

-- Threading information ---------------------------------------------------
Total ractor count: 1
Ruby thread count for this ractor: 1

-- Machine register context ------------------------------------------------
  x0: 0x0000aaaaefe05910  x1: 0x0000aaaaf00229b0  x2: 0x0000ffffe91efc00
  x3: 0x0000ffff6a9fef50  x4: 0x0000000000000004  x5: 0x0000ffff6a9ff018
  x6: 0x0000ffff6a97e000  x7: 0x0000ffff6aa1f000 x18: 0x0000000000000000
 x19: 0x0000000000000000 x20: 0x0000000000000000 x21: 0x0000000000000000
 x22: 0x0000000000000000 x23: 0x0000000000000000 x24: 0x0000000000000000
 x25: 0x0000000000000000 x26: 0x0000000000000000 x27: 0x0000000000000000
 x28: 0x0000000000000000 x29: 0x0000000000000000  sp: 0x0000ffff6a9ff000
 fau: 0x0026aaaadfeb5698

-- C level backtrace information -------------------------------------------
Segmentation fault (core dumped)
🍖 froydnj@froydnj-arm64-devbox(graviton):~/ruby$ ~/ruby-3-ko/bin/ruby -v
ruby 3.3.0dev (2023-12-22T02:30:00Z v3_3_0~75 d9e5564ccd) [aarch64-linux]
```



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

       reply	other threads:[~2024-04-12 14:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-12 14:54 froydnj (Nathan Froyd) via ruby-core [this message]
2024-04-12 15:37 ` [ruby-core:117504] [Ruby master Bug#20426] crash on aarch64 linux when using fibers (regression with 3.3) ufuk (Ufuk Kayserilioglu) via ruby-core

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.issue-20426.20240412145404.53292@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    --cc=noreply@ruby-lang.org \
    --cc=ruby-core@ml.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).