Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Thread-level events explode due to empty stack #3835
I believe this affects all JRuby 9k versions that support Thread begin/end trace events (probably all released versions) up through 9.1).
MRI in 2.1 or 2.2 added the ability to trace the begin and end of thread life via both
On JRuby, the thread begin/end events currently error out, because at least in the case of set_trace_func it is not possible to acquire a thread for the necessary binding:
This is a regression because 1.7 did not have these top-level thread events, and on 9k they prevent even simple set_trace_func from working properly.
Ok, set_trace_func is working properly again in the presence of thread begin/end. It turns out we never modified it to only receive the events Ruby 1.8 sent to it, so it was receiving all the new events like
We still need to fix TracePoint, however. I thought it might escape this bug, since it doesn't normally acquire a binding, but it must still be accessing the frame stack somewhere along the way: