diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 13d720be9e..64d8d93d3f 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -754,6 +754,9 @@ class TestRubyOptions < Test::Unit::TestCase \n )? )x, + %r( + (?:--\sThreading(?:.+\n)*\n)? + )x, %r( (?:--\sMachine(?:.+\n)*\n)? )x, diff --git a/vm_dump.c b/vm_dump.c index 00e82078fd..fae34d72aa 100644 --- a/vm_dump.c +++ b/vm_dump.c @@ -1083,6 +1083,14 @@ rb_vm_bugreport(const void *ctx) SDR(); rb_backtrace_print_as_bugreport(); fputs("\n", stderr); + // If we get here, hopefully things are intact enough that + // we can read these two numbers. It is an estimate because + // we are reading without synchronization. + fprintf(stderr, "-- Threading information " + "---------------------------------------------------\n"); + fprintf(stderr, "Total ractor count: %u\n", vm->ractor.cnt); + fprintf(stderr, "Ruby thread count for this ractor: %u\n", rb_ec_ractor_ptr(ec)->threads.cnt); + fputs("\n", stderr); } rb_dump_machine_register(ctx);