* [ruby-core:122458] [Ruby Bug#21400] rb_bug() hit when killing current root fiber on non-main thread
@ 2025-06-05 15:24 luke-gru (Luke Gruber) via ruby-core
2025-06-05 15:30 ` [ruby-core:122459] " luke-gru (Luke Gruber) via ruby-core
0 siblings, 1 reply; 2+ messages in thread
From: luke-gru (Luke Gruber) via ruby-core @ 2025-06-05 15:24 UTC (permalink / raw)
To: ruby-core; +Cc: luke-gru (Luke Gruber)
Issue #21400 has been reported by luke-gru (Luke Gruber).
----------------------------------------
Bug #21400: rb_bug() hit when killing current root fiber on non-main thread
https://bugs.ruby-lang.org/issues/21400
* Author: luke-gru (Luke Gruber)
* Status: Open
* ruby -v: 3.5.0dev
* Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
This following code hits an `rb_bug`:
```ruby
Thread.new { Fiber.current.kill }.join
```
Normally fibers gracefully handle this case by terminating and switching to another fiber, but if there is no other fiber it raises the `FIBER_FATAL_FIBER_KILLED` error and this is not caught by the starting thread, resulting in a bug.
--
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/
^ permalink raw reply [flat|nested] 2+ messages in thread
* [ruby-core:122459] [Ruby Bug#21400] rb_bug() hit when killing current root fiber on non-main thread
2025-06-05 15:24 [ruby-core:122458] [Ruby Bug#21400] rb_bug() hit when killing current root fiber on non-main thread luke-gru (Luke Gruber) via ruby-core
@ 2025-06-05 15:30 ` luke-gru (Luke Gruber) via ruby-core
0 siblings, 0 replies; 2+ messages in thread
From: luke-gru (Luke Gruber) via ruby-core @ 2025-06-05 15:30 UTC (permalink / raw)
To: ruby-core; +Cc: luke-gru (Luke Gruber)
Issue #21400 has been updated by luke-gru (Luke Gruber).
I created a PR: https://github.com/ruby/ruby/pull/13526
----------------------------------------
Bug #21400: rb_bug() hit when killing current root fiber on non-main thread
https://bugs.ruby-lang.org/issues/21400#change-113647
* Author: luke-gru (Luke Gruber)
* Status: Open
* ruby -v: 3.5.0dev
* Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
This following code hits an `rb_bug`:
```ruby
Thread.new { Fiber.current.kill }.join
```
Normally fibers gracefully handle this case by terminating and switching to another fiber, but if there is no other fiber it raises the `FIBER_FATAL_FIBER_KILLED` error and this is not caught by the starting thread, resulting in a bug.
--
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/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-06-05 15:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-05 15:24 [ruby-core:122458] [Ruby Bug#21400] rb_bug() hit when killing current root fiber on non-main thread luke-gru (Luke Gruber) via ruby-core
2025-06-05 15:30 ` [ruby-core:122459] " luke-gru (Luke Gruber) via ruby-core
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).