[#104004] [Ruby master Feature#17883] Load bundler/setup earlier to make `bundle exec ruby -r` respect Gemfile — mame@...
Issue #17883 has been reported by mame (Yusuke Endoh).
21 messages
2021/05/24
[ruby-core:103927] [Ruby master Bug#17875] Segfault when reusing a closed Fiber scheduler inside a Thread
From:
xtkoba+ruby@...
Date:
2021-05-21 03:49:34 UTC
List:
ruby-core #103927
Issue #17875 has been updated by xtkoba (Tee KOBAYASHI).
Seems already fixed?
```
$ ruby scheduler_bug.rb
#<Thread:0x00007f933e4f7760 scheduler_bug.rb:240 run> terminated with exception (report_on_exception is true):
scheduler_bug.rb:241:in `block in <main>': undefined method `run' for nil:NilClass (NoMethodError)
scheduler_bug.rb:114:in `ensure in close': undefined method `each' for nil:NilClass (NoMethodError)
from scheduler_bug.rb:120:in `close'
scheduler_bug.rb:110:in `close': Scheduler already closed! (RuntimeError)
scheduler_bug.rb:241:in `block in <main>': undefined method `run' for nil:NilClass (NoMethodError)
scheduler_bug.rb:241:in `block in <main>': undefined method `run' for nil:NilClass (NoMethodError)
$ ruby -v
ruby 3.1.0dev (2021-05-04T15:46:40Z master 14c932e52d) [x86_64-linux]
built with x86_64-pc-linux-gnu-gcc (Gentoo 11.1.0 p1) 11.1.0
```
Not the same as #17618, which still segfaults without the PR merged. (I have confirmed that the attached code segfaults with Ruby 3.0.1p64 on x86_64-linux.)
----------------------------------------
Bug #17875: Segfault when reusing a closed Fiber scheduler inside a Thread
https://bugs.ruby-lang.org/issues/17875#change-92058
* Author: rmosolgo (Robert Mosolgo)
* Status: Open
* Priority: Normal
* ruby -v: 3.0.1
* Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN
----------------------------------------
Hi! I've been trying to learn the new `Fiber.scheduler` API. I ran into this segfault when I was misusing scheduler instances in Minitest. I was able to reproduce the bug in isolation and I thought I'd share it here in case it's helpful to anyone.
I attached the program as `scheduler_bug.rb` and the output in `bug_output.txt`. I expected this program to terminate with an error, but not with a segfault.
If there's anything else I can do to help, please let me know! Thanks,
Robert
---Files--------------------------------
scheduler_bug.rb (4.92 KB)
bug_output.txt (24.1 KB)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>