
5 Jun
2025
5 Jun
'25
4:24 p.m.
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/