[ruby-core:115465] [Ruby master Bug#20019] Ruby 3.3 GVL instrumentation events are fired out of order

Issue #20019 has been reported by jpcamara (JP Camara). ---------------------------------------- Bug #20019: Ruby 3.3 GVL instrumentation events are fired out of order https://bugs.ruby-lang.org/issues/20019 * Author: jpcamara (JP Camara) * Status: Open * Priority: Normal * ruby -v: ruby 3.3.0dev (2023-11-23T14:39:30Z fix-thread-instrum.. 285a41d793) +MN [aarch64-linux] * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- 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 1. Pull down this PR: https://github.com/ruby/ruby/pull/9019 2. Run `make test-all TESTS="../test/-ext-/thread/test_instrumentation_api.rb --name=TestThreadInstrumentation#test_order_of_events"` 3. 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]`. -- https://bugs.ruby-lang.org/
participants (1)
-
jpcamara (JP Camara)