[#122643] [Ruby Bug#21498] Windows - Ruby Overrides C Library APIs thus breaking them — "cfis (Charlie Savage) via ruby-core" <ruby-core@...>

Issue #21498 has been reported by cfis (Charlie Savage).

9 messages 2025/07/02

[#122658] [Ruby Feature#21501] Include native filenames in backtraces as sources for native methods — "ivoanjo (Ivo Anjo) via ruby-core" <ruby-core@...>

Issue #21501 has been reported by ivoanjo (Ivo Anjo).

10 messages 2025/07/05

[#122665] [Ruby Bug#21503] \p{Word} does not match on \p{Join_Control} while docs say it does — "procmarco (Marco Concetto Rudilosso) via ruby-core" <ruby-core@...>

SXNzdWUgIzIxNTAzIGhhcyBiZWVuIHJlcG9ydGVkIGJ5IHByb2NtYXJjbyAoTWFyY28gQ29uY2V0

8 messages 2025/07/07

[#122734] [Ruby Bug#21511] Use-after-free of the execution context after the fiber object carrying it is freed in GC — "tuonigou (tianyang sun) via ruby-core" <ruby-core@...>

Issue #21511 has been reported by tuonigou (tianyang sun).

10 messages 2025/07/14

[#122797] [Ruby Feature#21515] Add `&return` as sugar for `x=my_calculation; return x if x` — "nhorton (Noah Horton) via ruby-core" <ruby-core@...>

Issue #21515 has been reported by nhorton (Noah Horton).

13 messages 2025/07/16

[#122842] [Ruby Feature#21518] Statistical helpers to `Enumerable` — "Amitleshed (Amit Leshed) via ruby-core" <ruby-core@...>

SXNzdWUgIzIxNTE4IGhhcyBiZWVuIHJlcG9ydGVkIGJ5IEFtaXRsZXNoZWQgKEFtaXQgTGVzaGVk

12 messages 2025/07/23

[#122847] [Ruby Feature#21520] Feature Proposal: Enumerator::Lazy#peek — "nuzair46 (Nuzair Rasheed) via ruby-core" <ruby-core@...>

SXNzdWUgIzIxNTIwIGhhcyBiZWVuIHJlcG9ydGVkIGJ5IG51emFpcjQ2IChOdXphaXIgUmFzaGVl

12 messages 2025/07/24

[ruby-core:122645] [Ruby Bug#19981] bootstraptest/test_ractor.rb: Segmentation fault on arm32

From: "jhawthorn (John Hawthorn) via ruby-core" <ruby-core@...>
Date: 2025-07-02 22:09:21 UTC
List: ruby-core #122645
Issue #19981 has been updated by jhawthorn (John Hawthorn).

Status changed from Assigned to Closed

It looks like this was occurring with Ractor.yield, which had some known bugs but was removed with the introduction of `Ractor::Port`.

----------------------------------------
Bug #19981: bootstraptest/test_ractor.rb: Segmentation fault on arm32
https://bugs.ruby-lang.org/issues/19981#change-113920

* Author: jaruga (Jun Aruga)
* Status: Closed
* Assignee: ractor
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN
----------------------------------------
I faced the following segmentation fault on Ubuntu jammy arm32 (emulated environment by `SETARCH='setarch linux32 --verbose --32bit'`) in both Travis CI arm64 [log](https://app.travis-ci.com/github/ruby/ruby/jobs/612418476#L2422
) and RubyCI arm64-neoverse server.

I tested it on the latest ruby master branch `14fa5e39d72c84d3e12e10dc5d77a6e6200c10f5`.

I was able to reproduce this issue on RubyCI arm64-neoverse server, and prepared the reproducing script. So, you can try to debug on the server.
It seems that the `-O3` flag triggered the issue. Because I didn't see the issue when Travis CI setting `- optflags=-O1` in `.travis.yml` on the current master branch.
https://github.com/junaruga/report-ruby-ractor-segmentation-fault

```
+ arm-linux-gnueabihf-gcc --version
arm-linux-gnueabihf-gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0

+ setarch linux32 --verbose --32bit make -s test
Switching on ADDR_LIMIT_32BIT.
Execute command `make'.
 Fstderr output is not empty
   <internal:ractor>:760: [BUG] Segmentation fault at 0x0000000c
   ruby 3.3.0dev (2023-10-30T09:27:06Z master 14fa5e39d7) [armv8l-linux-eabihf]
   
   -- Control frame information -----------------------------------------------
   c:0005 p:0003 s:0021 e:000020 METHOD <internal:ractor>:760
   c:0004 p:0008 s:0014 e:000013 BLOCK  bootstraptest.test_ractor.rb_541_1260.rb:4
   c:0003 p:0018 s:0011 e:000010 METHOD <internal:kernel>:187
   c:0002 p:0004 s:0006 e:000005 BLOCK  bootstraptest.test_ractor.rb_541_1260.rb:3 [FINISH]
   c:0001 p:---- s:0003 e:000002 DUMMY  [FINISH]
   
   -- Ruby level backtrace information ----------------------------------------
   bootstraptest.test_ractor.rb_541_1260.rb:3:in `block in <main>'
   <internal:kernel>:187:in `loop'
   bootstraptest.test_ractor.rb_541_1260.rb:4:in `block (2 levels) in <main>'
   <internal:ractor>:760:in `yield'
   
   -- Threading information ---------------------------------------------------
   Total ractor count: 2
   Ruby thread count for this ractor: 1
   
   -- Machine register context ------------------------------------------------
     r0: 0x00000000  r1: 0x00000001  r2: 0x00000007  r3: 0x00000000  r4: 0x00c935c8
     r5: 0x00000002  r6: 0x00000002  r7: 0x00000000  r8: 0x00000004  r9: 0x00c646b0
    r10: 0x00000002  sp: 0xd5d91c90 fau: 0x0000000c
   
   -- Other runtime information -----------------------------------------------
   
   * Loaded script: bootstraptest.test_ractor.rb_541_1260.rb
   
   * Loaded features:
   
       0 enumerator.so
       1 thread.rb
       2 fiber.so
       3 rational.so
       4 complex.so
       5 ruby2_keywords.rb
       6 /home/jaruga/git/ruby/ruby/build/.ext/armv8l-linux-eabihf/enc/encdb.so
       7 /home/jaruga/git/ruby/ruby/build/.ext/armv8l-linux-eabihf/enc/trans/transdb.so
   
   * Process memory map:
   
   00640000-0093a000 r-xp 00000000 103:03 29263803                          /home/jaruga/git/ruby/ruby/build/ruby
   0094a000-0094e000 r--p 002fa000 103:03 29263803                          /home/jaruga/git/ruby/ruby/build/ruby
   0094e000-0094f000 rw-p 002fe000 103:03 29263803                          /home/jaruga/git/ruby/ruby/build/ruby
   0094f000-00956000 rw-p 00000000 00:00 0 
   00bf3000-00cba000 rw-p 00000000 00:00 0                                  [heap]
   d5700000-d5721000 rw-p 00000000 00:00 0 
   d5721000-d5800000 ---p 00000000 00:00 0 
   d5900000-d5921000 rw-p 00000000 00:00 0 
   d5921000-d5a00000 ---p 00000000 00:00 0 
   d5a00000-d5a21000 rw-p 00000000 00:00 0 
   d5a21000-d5b00000 ---p 00000000 00:00 0 
   d5b00000-d5b21000 rw-p 00000000 00:00 0 
   d5b21000-d5c00000 ---p 00000000 00:00 0 
   d5c5f000-d5c60000 ---p 00000000 00:00 0 
   d5c60000-d5c90000 rw-p 00000000 00:00 0 
   d5c9f000-d5ca0000 ---p 00000000 00:00 0 
   d5ca0000-d5cd0000 rw-p 00000000 00:00 0 
   d5cde000-d5cdf000 ---p 00000000 00:00 0 
   d5cdf000-d5cef000 rw-p 00000000 00:00 0 
   d5cef000-d5cf0000 ---p 00000000 00:00 0 
   d5cf0000-d5d81000 rw-p 00000000 00:00 0 
   d5d81000-d5d82000 ---p 00000000 00:00 0 
   d5d82000-d5e12000 rw-p 00000000 00:00 0 
   d5e12000-d5e13000 ---p 00000000 00:00 0 
   d5e13000-d5ea3000 rw-p 00000000 00:00 0 
   d5ea3000-d5ea4000 ---p 00000000 00:00 0 
   d5ea4000-d5f34000 rw-p 00000000 00:00 0 
   d5f34000-d5f35000 ---p 00000000 00:00 0 
   d5f35000-d5fc5000 rw-p 00000000 00:00 0 
   d5fc5000-d5fc6000 ---p 00000000 00:00 0 
   d5fc6000-d6056000 rw-p 00000000 00:00 0 
   d6056000-d6057000 ---p 00000000 00:00 0 
   d6057000-d60e7000 rw-p 00000000 00:00 0 
   d60e7000-d60e8000 ---p 00000000 00:00 0 
   d60e8000-d6178000 rw-p 00000000 00:00 0 
   d6178000-d6179000 ---p 00000000 00:00 0 
   d6179000-d6209000 rw-p 00000000 00:00 0 
   d6209000-d620a000 ---p 00000000 00:00 0 
   d620a000-d629a000 rw-p 00000000 00:00 0 
   d629a000-d629b000 ---p 00000000 00:00 0 
   d629b000-d632b000 rw-p 00000000 00:00 0 
   d632b000-d632c000 ---p 00000000 00:00 0 
   d632c000-f5d10000 rw-p 00000000 00:00 0 
   f5d10000-f5d12000 r-xp 00000000 103:03 29263555                          /home/jaruga/git/ruby/ruby/build/.ext/armv8l-linux-eabihf/enc/trans/transdb.so
   f5d12000-f5d21000 ---p 00002000 103:03 29263555                          /home/jaruga/git/ruby/ruby/build/.ext/armv8l-linux-eabihf/enc/trans/transdb.so
   f5d21000-f5d22000 r--p 00001000 103:03 29263555                          /home/jaruga/git/ruby/ruby/build/.ext/armv8l-linux-eabihf/enc/trans/transdb.so
   f5d22000-f5d23000 rw-p 00002000 103:03 29263555                          /home/jaruga/git/ruby/ruby/build/.ext/armv8l-linux-eabihf/enc/trans/transdb.so
   f5d30000-f5d32000 r-xp 00000000 103:03 29263548                          /home/jaruga/git/ruby/ruby/build/.ext/armv8l-linux-eabihf/enc/encdb.so
   f5d32000-f5d41000 ---p 00002000 103:03 29263548                          /home/jaruga/git/ruby/ruby/build/.ext/armv8l-linux-eabihf/enc/encdb.so
   f5d41000-f5d42000 r--p 00001000 103:03 29263548                          /home/jaruga/git/ruby/ruby/build/.ext/armv8l-linux-eabihf/enc/encdb.so
   f5d42000-f5d43000 rw-p 00002000 103:03 29263548                          /home/jaruga/git/ruby/ruby/build/.ext/armv8l-linux-eabihf/enc/encdb.so
   f5d4f000-f5d50000 ---p 00000000 00:00 0 
   f5d50000-f5d71000 rw-p 00000000 00:00 0 
   f5d71000-f5d72000 ---p 00000000 00:00 0 
   f5d72000-f5d93000 rw-p 00000000 00:00 0 
   f5d93000-f5d94000 ---p 00000000 00:00 0 
   f5d94000-f5db5000 rw-p 00000000 00:00 0 
   f5db5000-f5db6000 ---p 00000000 00:00 0 
   f5db6000-f5dd7000 rw-p 00000000 00:00 0 
   f5dd7000-f5dd8000 ---p 00000000 00:00 0 
   f5dd8000-f5df9000 rw-p 00000000 00:00 0 
   f5df9000-f5dfa000 ---p 00000000 00:00 0 
   f5dfa000-f5e1b000 rw-p 00000000 00:00 0 
   f5e1b000-f5e1c000 ---p 00000000 00:00 0 
   f5e1c000-f5e3d000 rw-p 00000000 00:00 0 
   f5e3d000-f5e3e000 ---p 00000000 00:00 0 
   f5e3e000-f5e5f000 rw-p 00000000 00:00 0 
   f5e5f000-f5e60000 ---p 00000000 00:00 0 
   f5e60000-f66a0000 rw-p 00000000 00:00 0 
   f66af000-f73b0000 rw-p 00000000 00:00 0 
   f73b5000-f7436000 rw-p 00000000 00:00 0 
   f7436000-f76b0000 r--p 0006f000 103:03 11802136                          /usr/lib/locale/locale-archive
   f76b0000-f78b0000 r--p 00000000 103:03 11802136                          /usr/lib/locale/locale-archive
   f78b0000-f79bc000 r-xp 00000000 103:03 11670018                          /usr/lib/arm-linux-gnueabihf/libc.so.6
   f79bc000-f79cc000 ---p 0010c000 103:03 11670018                          /usr/lib/arm-linux-gnueabihf/libc.so.6
   f79cc000-f79ce000 r--p 0010c000 103:03 11670018                          /usr/lib/arm-linux-gnueabihf/libc.so.6
   f79ce000-f79cf000 rw-p 0010e000 103:03 11670018                          /usr/lib/arm-linux-gnueabihf/libc.so.6
   f79cf000-f79d9000 rw-p 00000000 00:00 0 
   f79e0000-f7a21000 r-xp 00000000 103:03 11670021                          /usr/lib/arm-linux-gnueabihf/libm.so.6
   f7a21000-f7a30000 ---p 00041000 103:03 11670021                          /usr/lib/arm-linux-gnueabihf/libm.so.6
   f7a30000-f7a31000 r--p 00040000 103:03 11670021                          /usr/lib/arm-linux-gnueabihf/libm.so.6
   f7a31000-f7a32000 rw-p 00041000 103:03 11670021                          /usr/lib/arm-linux-gnueabihf/libm.so.6
   f7a40000-f7a6b000 r-xp 00000000 103:03 11670013                          /usr/lib/arm-linux-gnueabihf/libcrypt.so.1.1.0
   f7a6b000-f7a7b000 ---p 0002b000 103:03 11670013                          /usr/lib/arm-linux-gnueabihf/libcrypt.so.1.1.0
   f7a7b000-f7a7c000 r--p 0002b000 103:03 11670013                          /usr/lib/arm-linux-gnueabihf/libcrypt.so.1.1.0
   f7a7c000-f7a7d000 rw-p 0002c000 103:03 11670013                          /usr/lib/arm-linux-gnueabihf/libcrypt.so.1.1.0
   f7a7d000-f7a85000 rw-p 00000000 00:00 0 
   f7a88000-f7aa7000 r-xp 00000000 103:03 11670015                          /usr/lib/arm-linux-gnueabihf/ld-linux-armhf.so.3
   f7aac000-f7ab3000 r--s 00000000 103:03 11670285                          /usr/lib/arm-linux-gnueabihf/gconv/gconv-modules.cache
   f7ab3000-f7ab5000 rw-p 00000000 00:00 0 
   f7ab5000-f7ab6000 r-xp 00000000 00:00 0                                  [sigpage]
   f7ab6000-f7ab8000 r--p 0001e000 103:03 11670015                          /usr/lib/arm-linux-gnueabihf/ld-linux-armhf.so.3
   f7ab8000-f7ab9000 rw-p 00020000 103:03 11670015                          /usr/lib/arm-linux-gnueabihf/ld-linux-armhf.so.3
   ff7dd000-fffdc000 rw-p 00000000 00:00 0                                  [stack]
   ffff0000-ffff1000 r-xp 00000000 00:00 0                                  [vectors]
```




-- 
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/lists/ruby-core.ml.ruby-lang.org/


In This Thread

Prev Next