Your environment
ruby -v: 3.1.3rdbg -v: 1.7.1
Describe the bug
When the following conditions all match, the debugger has a high possibility to freeze:
Inside a Rails app with Puma web server
The breakpoint is inside a timeout call, like
defhelloTimeout.timeout(3600)dobinding.bendend
From the breakpoint, executes something that calls Timeout.timeout underneath
To Reproduce
I've documented reproduction steps in this repo.
Expected behavior
The debugger doesn't freeze.
Additional context
It may not be the root cause, but Timeout's thread being stopped by the debugger plays a major role here.
If we somehow modify this method to skip pausing the Timeout thread, like
privatedefthread_stopperTracePoint.new(:line)do# run on each threadtc=ThreadClient.currentnextiftc.management?nextunlesstc.running?nextiftc == @tcnextiftc.thread.name && tc.thread.name.match?(/Timeout/)tc.on_pauseendend
Then the issue doesn't occur.
Your environment
ruby -v:3.1.3rdbg -v:1.7.1Describe the bug
When the following conditions all match, the debugger has a high possibility to freeze:
Inside a Rails app with Puma web server
The breakpoint is inside a timeout call, like
From the breakpoint, executes something that calls
Timeout.timeoutunderneathTo Reproduce
I've documented reproduction steps in this repo.
Expected behavior
The debugger doesn't freeze.
Additional context
It may not be the root cause, but
Timeout's thread being stopped by the debugger plays a major role here.If we somehow modify this method to skip pausing the
Timeoutthread, likeThen the issue doesn't occur.