Actions
Bug #20019
closedRuby 3.3 GVL instrumentation events are fired out of order
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.3.0dev (2023-11-23T14:39:30Z fix-thread-instrum.. 285a41d793) +MN [aarch64-linux]
Description
The order of instrumentation events is incorrect, and inconsistent with Ruby 3.2 ordering. You can find a spec to reproduce the broken behavior here: https://github.com/ruby/ruby/pull/9019.
Steps to reproduce¶
- Pull down this PR: https://github.com/ruby/ruby/pull/9019
- Run
make test-all TESTS="../test/-ext-/thread/test_instrumentation_api.rb --name=TestThreadInstrumentation#test_order_of_events"
- Run
RUBY_MN_THREADS=1 make test-all TESTS="../test/-ext-/thread/test_instrumentation_api.rb --name=TestThreadInstrumentation#test_order_of_events"
Expected behavior¶
It should pass the spec, and the events for each thread should match the array %w[started ready resumed suspended exited]
. That is the consistent behavior on Ruby 3.2.
Actual behavior¶
When running make test-all TESTS="../test/-ext-/thread/test_instrumentation_api.rb --name=TestThreadInstrumentation#test_order_of_events"
, the array of events is %w[ready resumed started exited suspended]
.
When running with RUBY_MN_THREADS=1
, the array of events is %w[ready started exited suspended]
.
Actions
Like0
Like1