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
We noticed a thread deadlock issue with Ruby debug after our net/http version changed from 0.2.0 to 0.3.0.
When you are in the breakpoint after making any http request and you attempt to fetch your debug history (e.g. you arrow key up a few times), it crashes.
This error occurs in Ruby 3.1.3 which is using net-http (0.3.0). It does not occur in Ruby 3.1.2 (or earlier) which is using net-http (0.2.0).
Reproduction script (using net-http 0.3.0 or higher):
["DEBUGGER Exception: .rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/debug-1.7.1/lib/debug/thread_client.rb:1233",
#<fatal: No live threads left. Deadlock?
3 threads, 3 sleeps current:0x000000014a83b950 main thread:0x000000015a6048e0
* #<Thread:0x0000000100ec4d10 sleep_forever>
rb_thread_t:0x000000015a6048e0 native:0x00000001faaf9b40 int:0
* #<Thread:0x000000010107e4a8@DEBUGGER__::SESSION@server .rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/debug-1.7.1/lib/debug/session.rb:177 sleep_forever>
rb_thread_t:0x000000014a83b950 native:0x000000016f393000 int:0
* #<Thread:0x0000000104d64548@Timeout stdlib thread .rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/timeout-0.3.1/lib/timeout.rb:101 sleep_forever>
rb_thread_t:0x000000014a9f1ce0 native:0x000000016f59f000 int:0
>,
[".rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/debug-1.7.1/lib/debug/thread_client.rb:874:in `pop'",
".rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/debug-1.7.1/lib/debug/thread_client.rb:874:in `wait_next_action_'",
".rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/debug-1.7.1/lib/debug/thread_client.rb:856:in `wait_next_action'",
".rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/debug-1.7.1/lib/debug/thread_client.rb:320:in `suspend'",
".rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/debug-1.7.1/lib/debug/thread_client.rb:251:in `on_breakpoint'",
".rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/debug-1.7.1/lib/debug/breakpoint.rb:69:in `suspend'",
".rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/debug-1.7.1/lib/debug/breakpoint.rb:178:in `block in setup'",
".rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/debug-1.7.1/lib/debug/session.rb:2586:in `debugger'",
"test.rb:6:in `<main>'"]]
.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/debug-1.7.1/lib/debug/thread_client.rb:874:in `pop': No live threads left. Deadlock? (fatal)
3 threads, 3 sleeps current:0x000000014a83b950 main thread:0x000000015a6048e0
* #<Thread:0x0000000100ec4d10 sleep_forever>
rb_thread_t:0x000000015a6048e0 native:0x00000001faaf9b40 int:0
* #<Thread:0x000000010107e4a8@DEBUGGER__::SESSION@server .rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/debug-1.7.1/lib/debug/session.rb:177 sleep_forever>
rb_thread_t:0x000000014a83b950 native:0x000000016f393000 int:0
* #<Thread:0x0000000104d64548@Timeout stdlib thread .rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/timeout-0.3.1/lib/timeout.rb:101 sleep_forever>
rb_thread_t:0x000000014a9f1ce0 native:0x000000016f59f000 int:0
from .rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/debug-1.7.1/lib/debug/thread_client.rb:874:in `wait_next_action_'
from .rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/debug-1.7.1/lib/debug/thread_client.rb:856:in `wait_next_action'
from .rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/debug-1.7.1/lib/debug/thread_client.rb:320:in `suspend'
from .rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/debug-1.7.1/lib/debug/thread_client.rb:251:in `on_breakpoint'
from .rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/debug-1.7.1/lib/debug/breakpoint.rb:69:in `suspend'
from .rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/debug-1.7.1/lib/debug/breakpoint.rb:178:in `block in setup'
from .rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/debug-1.7.1/lib/debug/session.rb:2586:in `debugger'
from test.rb:6:in `<main>'
The text was updated successfully, but these errors were encountered:
Chaseshak
changed the title
Deadlock after issuing Net::HTTP request and using Ruby Debug
Deadlock after issuing Net::HTTP.get request and using a Ruby Debug breakpoint after the request
May 3, 2023
We noticed a thread deadlock issue with Ruby debug after our net/http version changed from
0.2.0
to0.3.0
.When you are in the breakpoint after making any http request and you attempt to fetch your debug history (e.g. you arrow key up a few times), it crashes.
This error occurs in Ruby 3.1.3 which is using
net-http (0.3.0)
. It does not occur in Ruby 3.1.2 (or earlier) which is usingnet-http (0.2.0)
.Reproduction script (using net-http 0.3.0 or higher):
Stack trace:
The text was updated successfully, but these errors were encountered: