You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inside docker (docker image ruby:3.3.6-slim-bookworm@sha256:7a89be75c6768a888f70c90f4626366de90909c4e4d62729775ea3b64672547c to be exact)
Process started like: bundle exec rdbg -O -n --session-name='web' -c -- bin/rails server -b 0.0.0.0 -p 3000
RUBY_DEBUG_SOCK_DIR=/app/tmp (Rails root being /app inside container, /app/tmp is a volume mounted into container so socket can be attached to from outside container)
Describe the bug
Quite often during the course of debugging the debugger process seems to becomes in a paused state but unable to display the current thread or breakpoint. Rails requests hang even if disconnecting from the remote debugger (VSCode connecting via a socket).
After that point the main process becomes unresponsive and the only way to continue is to restart the parent process (which in our case means restarting the docker container).
To Reproduce
We have seen this arise sporadically. The following is one way we've been able to reproduce it but we have seen it occur even when avoiding the below:
When paused at a breakpoint, calling another method manually (or in a watch) which has its own breakpoints set will cause execution to run to and pause at the nested breakpoint, but continuing from there will break the debugger.
classFoodefaputs"hello"# BP 1 <= active1 + 1enddefb42# BP 2endendFoo.new.a
Given the following file with breakpoints set above, when stopped at BP 1, calling b will re-break at BP 2, but continuing from there seems to break the debugger and leave some thread in a hung state.
Again, this is just one cause but we have been able to reproduce it at times without any manual execution of methods with BPs. However, we do not have a reproduction case for this.
Expected behavior
The debugger doesn't hang
Additional context
When this is encountered, I disconnected VSCode's debugger and manually attached to the same debugger instance via rdbg -A socket. When doing so the debugger output shows:
Ah the other piece of context here is that the web app is using Puma. I saw #1027 (comment) mentions some rough interactions there, so we I am experimenting with setting min_threads, max_threads = 1, 1 in Puma to see if it decreases the likelihood of these kinds of hangs.
Your environment
ruby -v
: 3.3.6rdbg -v
: 1.9.2ruby:3.3.6-slim-bookworm@sha256:7a89be75c6768a888f70c90f4626366de90909c4e4d62729775ea3b64672547c
to be exact)bundle exec rdbg -O -n --session-name='web' -c -- bin/rails server -b 0.0.0.0 -p 3000
RUBY_DEBUG_SOCK_DIR=/app/tmp
(Rails root being/app
inside container,/app/tmp
is a volume mounted into container so socket can be attached to from outside container)Describe the bug
Quite often during the course of debugging the debugger process seems to becomes in a paused state but unable to display the current thread or breakpoint. Rails requests hang even if disconnecting from the remote debugger (VSCode connecting via a socket).
After that point the main process becomes unresponsive and the only way to continue is to restart the parent process (which in our case means restarting the docker container).
To Reproduce
We have seen this arise sporadically. The following is one way we've been able to reproduce it but we have seen it occur even when avoiding the below:
When paused at a breakpoint, calling another method manually (or in a watch) which has its own breakpoints set will cause execution to run to and pause at the nested breakpoint, but continuing from there will break the debugger.
Given the following file with breakpoints set above, when stopped at
BP 1
, callingb
will re-break atBP 2
, but continuing from there seems to break the debugger and leave some thread in a hung state.Again, this is just one cause but we have been able to reproduce it at times without any manual execution of methods with BPs. However, we do not have a reproduction case for this.
Expected behavior
The debugger doesn't hang
Additional context
When this is encountered, I disconnected VSCode's debugger and manually attached to the same debugger instance via
rdbg -A socket
. When doing so the debugger output shows:The application logs show:
The text was updated successfully, but these errors were encountered: