ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:105904] [Ruby master Bug#18283] Creating a subclass in Ractor dumps core
@ 2021-11-02  9:13 mame (Yusuke Endoh)
  2021-11-02  9:17 ` [ruby-core:105905] " mame (Yusuke Endoh)
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: mame (Yusuke Endoh) @ 2021-11-02  9:13 UTC (permalink / raw)
  To: ruby-core

Issue #18283 has been reported by mame (Yusuke Endoh).

----------------------------------------
Bug #18283: Creating a subclass in Ractor dumps core
https://bugs.ruby-lang.org/issues/18283

* Author: mame (Yusuke Endoh)
* Status: Open
* Priority: Normal
* Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN
----------------------------------------
```
$ ruby -e 'class C;end; (1..10).map { Ractor.new { 100000.times { Class.new(C) } } }.each {|r| r.take }'
<internal:ractor>:267: warning: Ractor is experimental, and the behavior may change in future versions of Ruby! Also there are many implementation issues.
-e:1: [BUG] Segmentation fault at 0x00007fc7c802ecf2
ruby 3.1.0dev (2021-11-02T01:24:35Z master 38785aa3b9) [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0006 p:---- s:0021 e:000020 CFUNC  :initialize
c:0005 p:---- s:0018 e:000017 CFUNC  :new
c:0004 p:0020 s:0013 e:000012 BLOCK  -e:1 [FINISH]
c:0003 p:---- s:0010 e:000009 CFUNC  :times
c:0002 p:0005 s:0006 e:000005 BLOCK  -e:1 [FINISH]
c:0001 p:---- s:0003 e:000002 (none) [FINISH]

-- Ruby level backtrace information ----------------------------------------
-e:1:in `block (2 levels) in <main>'
-e:1:in `times'
-e:1:in `block (3 levels) in <main>'
-e:1:in `new'
-e:1:in `initialize'

-- Machine register context ------------------------------------------------
 RIP: 0x000056325882a857 RBP: 0x00007fc041c11cf0 RSP: 0x00007fc0412c9e20
 RAX: 0x00007fc030016cb8 RBX: 0x00007fc041c11cf0 RCX: 0x000056325a714320
 RDX: 0x00007fc7c802ecda RDI: 0x00007fc03c0191e0 RSI: 0x00000000001ca6d8
  R8: 0x00007fc03c019130  R9: 0x000056325a714138 R10: 0x0000000000000028
 R11: 0x0000000000000000 R12: 0x0000000000000000 R13: 0x00007fc041c10000
 R14: 0x0000000000000000 R15: 0x000056325a714100 EFL: 0x0000000000010206

-- C level backtrace information -------------------------------------------
/home/mame/work/ruby2/local/bin/ruby(rb_print_backtrace+0x11) [0x5632587d6c18] vm_dump.c:759
/home/mame/work/ruby2/local/bin/ruby(rb_vm_bugreport) vm_dump.c:1045
/home/mame/work/ruby2/local/bin/ruby(rb_bug_for_fatal_signal+0xec) [0x5632585c993c] error.c:820
/home/mame/work/ruby2/local/bin/ruby(sigsegv+0x4d) [0x56325872a63d] signal.c:964
/lib/x86_64-linux-gnu/libpthread.so.0(__restore_rt+0x0) [0x7fc045cdd1f0] ../sysdeps/pthread/funlockfile.c:28
/home/mame/work/ruby2/local/bin/ruby(rb_class_remove_from_super_subclasses+0x27) [0x56325882a857] class.c:90
/home/mame/work/ruby2/local/bin/ruby(obj_free+0x37a) [0x5632585edaaa] gc.c:3143
/home/mame/work/ruby2/local/bin/ruby(gc_plane_sweep+0x50) [0x5632585edfd0] gc.c:5345
...
```

An operation against the linked list of subclasses is not thread-safe. Related to #18282



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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:105905] [Ruby master Bug#18283] Creating a subclass in Ractor dumps core
  2021-11-02  9:13 [ruby-core:105904] [Ruby master Bug#18283] Creating a subclass in Ractor dumps core mame (Yusuke Endoh)
@ 2021-11-02  9:17 ` mame (Yusuke Endoh)
  2021-11-14 19:16 ` [ruby-core:106054] " peterzhu2118 (Peter Zhu)
  2021-11-15  0:37 ` [ruby-core:106057] " mame (Yusuke Endoh)
  2 siblings, 0 replies; 4+ messages in thread
From: mame (Yusuke Endoh) @ 2021-11-02  9:17 UTC (permalink / raw)
  To: ruby-core

Issue #18283 has been updated by mame (Yusuke Endoh).

Assignee set to ko1 (Koichi Sasada)

----------------------------------------
Bug #18283: Creating a subclass in Ractor dumps core
https://bugs.ruby-lang.org/issues/18283#change-94449

* Author: mame (Yusuke Endoh)
* Status: Open
* Priority: Normal
* Assignee: ko1 (Koichi Sasada)
* Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN
----------------------------------------
```
$ ruby -e 'class C;end; (1..10).map { Ractor.new { 100000.times { Class.new(C) } } }.each {|r| r.take }'
<internal:ractor>:267: warning: Ractor is experimental, and the behavior may change in future versions of Ruby! Also there are many implementation issues.
-e:1: [BUG] Segmentation fault at 0x00007fc7c802ecf2
ruby 3.1.0dev (2021-11-02T01:24:35Z master 38785aa3b9) [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0006 p:---- s:0021 e:000020 CFUNC  :initialize
c:0005 p:---- s:0018 e:000017 CFUNC  :new
c:0004 p:0020 s:0013 e:000012 BLOCK  -e:1 [FINISH]
c:0003 p:---- s:0010 e:000009 CFUNC  :times
c:0002 p:0005 s:0006 e:000005 BLOCK  -e:1 [FINISH]
c:0001 p:---- s:0003 e:000002 (none) [FINISH]

-- Ruby level backtrace information ----------------------------------------
-e:1:in `block (2 levels) in <main>'
-e:1:in `times'
-e:1:in `block (3 levels) in <main>'
-e:1:in `new'
-e:1:in `initialize'

-- Machine register context ------------------------------------------------
 RIP: 0x000056325882a857 RBP: 0x00007fc041c11cf0 RSP: 0x00007fc0412c9e20
 RAX: 0x00007fc030016cb8 RBX: 0x00007fc041c11cf0 RCX: 0x000056325a714320
 RDX: 0x00007fc7c802ecda RDI: 0x00007fc03c0191e0 RSI: 0x00000000001ca6d8
  R8: 0x00007fc03c019130  R9: 0x000056325a714138 R10: 0x0000000000000028
 R11: 0x0000000000000000 R12: 0x0000000000000000 R13: 0x00007fc041c10000
 R14: 0x0000000000000000 R15: 0x000056325a714100 EFL: 0x0000000000010206

-- C level backtrace information -------------------------------------------
/home/mame/work/ruby2/local/bin/ruby(rb_print_backtrace+0x11) [0x5632587d6c18] vm_dump.c:759
/home/mame/work/ruby2/local/bin/ruby(rb_vm_bugreport) vm_dump.c:1045
/home/mame/work/ruby2/local/bin/ruby(rb_bug_for_fatal_signal+0xec) [0x5632585c993c] error.c:820
/home/mame/work/ruby2/local/bin/ruby(sigsegv+0x4d) [0x56325872a63d] signal.c:964
/lib/x86_64-linux-gnu/libpthread.so.0(__restore_rt+0x0) [0x7fc045cdd1f0] ../sysdeps/pthread/funlockfile.c:28
/home/mame/work/ruby2/local/bin/ruby(rb_class_remove_from_super_subclasses+0x27) [0x56325882a857] class.c:90
/home/mame/work/ruby2/local/bin/ruby(obj_free+0x37a) [0x5632585edaaa] gc.c:3143
/home/mame/work/ruby2/local/bin/ruby(gc_plane_sweep+0x50) [0x5632585edfd0] gc.c:5345
...
```

An operation against the linked list of subclasses is not thread-safe. Related to #18282



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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:106054] [Ruby master Bug#18283] Creating a subclass in Ractor dumps core
  2021-11-02  9:13 [ruby-core:105904] [Ruby master Bug#18283] Creating a subclass in Ractor dumps core mame (Yusuke Endoh)
  2021-11-02  9:17 ` [ruby-core:105905] " mame (Yusuke Endoh)
@ 2021-11-14 19:16 ` peterzhu2118 (Peter Zhu)
  2021-11-15  0:37 ` [ruby-core:106057] " mame (Yusuke Endoh)
  2 siblings, 0 replies; 4+ messages in thread
From: peterzhu2118 (Peter Zhu) @ 2021-11-14 19:16 UTC (permalink / raw)
  To: ruby-core

Issue #18283 has been updated by peterzhu2118 (Peter Zhu).


I think this is a duplicate of #18119.

----------------------------------------
Bug #18283: Creating a subclass in Ractor dumps core
https://bugs.ruby-lang.org/issues/18283#change-94640

* Author: mame (Yusuke Endoh)
* Status: Open
* Priority: Normal
* Assignee: ko1 (Koichi Sasada)
* Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN
----------------------------------------
```
$ ruby -e 'class C;end; (1..10).map { Ractor.new { 100000.times { Class.new(C) } } }.each {|r| r.take }'
<internal:ractor>:267: warning: Ractor is experimental, and the behavior may change in future versions of Ruby! Also there are many implementation issues.
-e:1: [BUG] Segmentation fault at 0x00007fc7c802ecf2
ruby 3.1.0dev (2021-11-02T01:24:35Z master 38785aa3b9) [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0006 p:---- s:0021 e:000020 CFUNC  :initialize
c:0005 p:---- s:0018 e:000017 CFUNC  :new
c:0004 p:0020 s:0013 e:000012 BLOCK  -e:1 [FINISH]
c:0003 p:---- s:0010 e:000009 CFUNC  :times
c:0002 p:0005 s:0006 e:000005 BLOCK  -e:1 [FINISH]
c:0001 p:---- s:0003 e:000002 (none) [FINISH]

-- Ruby level backtrace information ----------------------------------------
-e:1:in `block (2 levels) in <main>'
-e:1:in `times'
-e:1:in `block (3 levels) in <main>'
-e:1:in `new'
-e:1:in `initialize'

-- Machine register context ------------------------------------------------
 RIP: 0x000056325882a857 RBP: 0x00007fc041c11cf0 RSP: 0x00007fc0412c9e20
 RAX: 0x00007fc030016cb8 RBX: 0x00007fc041c11cf0 RCX: 0x000056325a714320
 RDX: 0x00007fc7c802ecda RDI: 0x00007fc03c0191e0 RSI: 0x00000000001ca6d8
  R8: 0x00007fc03c019130  R9: 0x000056325a714138 R10: 0x0000000000000028
 R11: 0x0000000000000000 R12: 0x0000000000000000 R13: 0x00007fc041c10000
 R14: 0x0000000000000000 R15: 0x000056325a714100 EFL: 0x0000000000010206

-- C level backtrace information -------------------------------------------
/home/mame/work/ruby2/local/bin/ruby(rb_print_backtrace+0x11) [0x5632587d6c18] vm_dump.c:759
/home/mame/work/ruby2/local/bin/ruby(rb_vm_bugreport) vm_dump.c:1045
/home/mame/work/ruby2/local/bin/ruby(rb_bug_for_fatal_signal+0xec) [0x5632585c993c] error.c:820
/home/mame/work/ruby2/local/bin/ruby(sigsegv+0x4d) [0x56325872a63d] signal.c:964
/lib/x86_64-linux-gnu/libpthread.so.0(__restore_rt+0x0) [0x7fc045cdd1f0] ../sysdeps/pthread/funlockfile.c:28
/home/mame/work/ruby2/local/bin/ruby(rb_class_remove_from_super_subclasses+0x27) [0x56325882a857] class.c:90
/home/mame/work/ruby2/local/bin/ruby(obj_free+0x37a) [0x5632585edaaa] gc.c:3143
/home/mame/work/ruby2/local/bin/ruby(gc_plane_sweep+0x50) [0x5632585edfd0] gc.c:5345
...
```

An operation against the linked list of subclasses is not thread-safe. Related to #18282



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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:106057] [Ruby master Bug#18283] Creating a subclass in Ractor dumps core
  2021-11-02  9:13 [ruby-core:105904] [Ruby master Bug#18283] Creating a subclass in Ractor dumps core mame (Yusuke Endoh)
  2021-11-02  9:17 ` [ruby-core:105905] " mame (Yusuke Endoh)
  2021-11-14 19:16 ` [ruby-core:106054] " peterzhu2118 (Peter Zhu)
@ 2021-11-15  0:37 ` mame (Yusuke Endoh)
  2 siblings, 0 replies; 4+ messages in thread
From: mame (Yusuke Endoh) @ 2021-11-15  0:37 UTC (permalink / raw)
  To: ruby-core

Issue #18283 has been updated by mame (Yusuke Endoh).

Status changed from Open to Rejected

Oh thanks. Let's close this ticket then.

----------------------------------------
Bug #18283: Creating a subclass in Ractor dumps core
https://bugs.ruby-lang.org/issues/18283#change-94645

* Author: mame (Yusuke Endoh)
* Status: Rejected
* Priority: Normal
* Assignee: ko1 (Koichi Sasada)
* Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN
----------------------------------------
```
$ ruby -e 'class C;end; (1..10).map { Ractor.new { 100000.times { Class.new(C) } } }.each {|r| r.take }'
<internal:ractor>:267: warning: Ractor is experimental, and the behavior may change in future versions of Ruby! Also there are many implementation issues.
-e:1: [BUG] Segmentation fault at 0x00007fc7c802ecf2
ruby 3.1.0dev (2021-11-02T01:24:35Z master 38785aa3b9) [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0006 p:---- s:0021 e:000020 CFUNC  :initialize
c:0005 p:---- s:0018 e:000017 CFUNC  :new
c:0004 p:0020 s:0013 e:000012 BLOCK  -e:1 [FINISH]
c:0003 p:---- s:0010 e:000009 CFUNC  :times
c:0002 p:0005 s:0006 e:000005 BLOCK  -e:1 [FINISH]
c:0001 p:---- s:0003 e:000002 (none) [FINISH]

-- Ruby level backtrace information ----------------------------------------
-e:1:in `block (2 levels) in <main>'
-e:1:in `times'
-e:1:in `block (3 levels) in <main>'
-e:1:in `new'
-e:1:in `initialize'

-- Machine register context ------------------------------------------------
 RIP: 0x000056325882a857 RBP: 0x00007fc041c11cf0 RSP: 0x00007fc0412c9e20
 RAX: 0x00007fc030016cb8 RBX: 0x00007fc041c11cf0 RCX: 0x000056325a714320
 RDX: 0x00007fc7c802ecda RDI: 0x00007fc03c0191e0 RSI: 0x00000000001ca6d8
  R8: 0x00007fc03c019130  R9: 0x000056325a714138 R10: 0x0000000000000028
 R11: 0x0000000000000000 R12: 0x0000000000000000 R13: 0x00007fc041c10000
 R14: 0x0000000000000000 R15: 0x000056325a714100 EFL: 0x0000000000010206

-- C level backtrace information -------------------------------------------
/home/mame/work/ruby2/local/bin/ruby(rb_print_backtrace+0x11) [0x5632587d6c18] vm_dump.c:759
/home/mame/work/ruby2/local/bin/ruby(rb_vm_bugreport) vm_dump.c:1045
/home/mame/work/ruby2/local/bin/ruby(rb_bug_for_fatal_signal+0xec) [0x5632585c993c] error.c:820
/home/mame/work/ruby2/local/bin/ruby(sigsegv+0x4d) [0x56325872a63d] signal.c:964
/lib/x86_64-linux-gnu/libpthread.so.0(__restore_rt+0x0) [0x7fc045cdd1f0] ../sysdeps/pthread/funlockfile.c:28
/home/mame/work/ruby2/local/bin/ruby(rb_class_remove_from_super_subclasses+0x27) [0x56325882a857] class.c:90
/home/mame/work/ruby2/local/bin/ruby(obj_free+0x37a) [0x5632585edaaa] gc.c:3143
/home/mame/work/ruby2/local/bin/ruby(gc_plane_sweep+0x50) [0x5632585edfd0] gc.c:5345
...
```

An operation against the linked list of subclasses is not thread-safe. Related to #18282



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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-11-15  0:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-02  9:13 [ruby-core:105904] [Ruby master Bug#18283] Creating a subclass in Ractor dumps core mame (Yusuke Endoh)
2021-11-02  9:17 ` [ruby-core:105905] " mame (Yusuke Endoh)
2021-11-14 19:16 ` [ruby-core:106054] " peterzhu2118 (Peter Zhu)
2021-11-15  0:37 ` [ruby-core:106057] " mame (Yusuke Endoh)

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 NNTP newsgroup(s).