We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IO.wait_*
rb_io_wait
Thread#kill
Since Truffleruby-24.0.0 there is a regression regarding interruptions while waiting for IO.
This rose up in ruby-pg here: https://github.com/ged/ruby-pg/actions/runs/8393741842/job/22989402958#step:12:1202 but it is reproducible with pure ruby code like this:
require "io/wait" describe "wait_readable" do it "should stop waiting on Thread#kill" do rd, _wr = IO.pipe start = Time.now t = Thread.new do rd.wait_readable(1) end sleep 0.1 t.kill sleep 0.1 puts t.backtrace t.join expect( Time.now - start ).to be < 0.9 end end
In Truffleruby-23.x and MRI this looks like so:
rspec test-wait_io.rb . Finished in 0.20932 seconds (files took 0.1265 seconds to load) 1 example, 0 failures
But in Truffleruby-24.0.0 this fails, because the poll is not interrupted:
poll
rspec test-wait_io.rb <internal:core> core/truffle/polyglot.rb:334:in `execute' <internal:core> core/truffle/polyglot.rb:334:in `call' <internal:core> core/posix.rb:142:in `truffleposix_poll_single_fd' <internal:core> core/posix.rb:95:in `truffleposix_poll_single_fd' <internal:core> core/truffle/io_operations.rb:262:in `poll' /home/lars/.rvm/rubies/truffleruby-24.0.0/lib/truffle/io/wait.rb:25:in `wait_readable' /home/lars/comcard/ruby-pg/test-wait_io.rb:8:in `block (3 levels) in <top (required)>' F Failures: 1) wait_readable should stop waiting on Thread#kill Failure/Error: expect( Time.now - start ).to be < 0.9 expected: < 0.9 got: 1.017792 # ./test-wait_io.rb:17:in `block (2 levels) in <top (required)>' Finished in 1.1 seconds (files took 0.42542 seconds to load) 1 example, 1 failure Failed examples: rspec ./test-wait_io.rb:4 # wait_readable should stop waiting on Thread#kill
The text was updated successfully, but these errors were encountered:
Thank you for the report, we'll look into it
Sorry, something went wrong.
a838307
Repair IO#wait_readable, IO#wait_writable, IO#wait to be interruptible
f015bce
* Fixes oracle/truffleruby#3504
andrykonchin
No branches or pull requests
Since Truffleruby-24.0.0 there is a regression regarding interruptions while waiting for IO.
This rose up in ruby-pg here: https://github.com/ged/ruby-pg/actions/runs/8393741842/job/22989402958#step:12:1202 but it is reproducible with pure ruby code like this:
In Truffleruby-23.x and MRI this looks like so:
But in Truffleruby-24.0.0 this fails, because the
poll
is not interrupted:The text was updated successfully, but these errors were encountered: