Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/st0012/debug-freeze-issue
https://github.com/st0012/debug-freeze-issue
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/st0012/debug-freeze-issue
- Owner: st0012
- Created: 2022-12-23T17:26:02.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-23T17:36:58.000Z (about 2 years ago)
- Last Synced: 2024-11-15T09:52:06.137Z (about 2 months ago)
- Language: Ruby
- Size: 22.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Debugger Frozen With Timeout Issue Repro
## Steps
1. Run `bundle install`
1. Run `bundle exec rails s`
1. Visit `http://localhost:3000/` in the browser
1. Once inside the breakpoint, execute the `timeout` method in the console, which should print `Timeout.timeout`
1. Type `timeout` again. But this time, `Timeout.timeout` wouldn't be printed and the debugger just freezes```
Processing by HelloController#hello as HTML
[1, 10] in ~/projects/debug-freeze-issue/app/controllers/hello_controller.rb
1| class HelloController < ApplicationController
2| def hello
3| Timeout.timeout(3600) do
=> 4| binding.b
5| end
6| end
7|
8| def timeout
9| Timeout.timeout(1) { puts "Timeout.timeout" }
10| end
=>#0 block in hello at ~/projects/debug-freeze-issue/app/controllers/hello_controller.rb:4
#1 block {|exc=#|} in timeout at ~/.gem/ruby/3.1.2/gems/timeout-0.3.1/lib/timeout.rb:189
# and 81 frames (use `bt' command for all frames)
(rdbg) timeout
Timeout.timeout
nil
(rdbg) timeout
# just freezes from here
```### Notes
- Occasionally it'd work fine (1 in 5~6 tries), but most of the time it'd freeze.
- Hit Arrrow Up a few times inside the console could also reproduce it.
- This is because that key triggers the `reline` library's call, which uses `Timeout.timeout` underneath.```
[1, 10] in ~/projects/debug-freeze-issue/app/controllers/hello_controller.rb
1| class HelloController < ApplicationController
2| def hello
3| Timeout.timeout(3600) do
=> 4| binding.b
5| end
6| end
7|
8| def timeout
9| Timeout.timeout(1) { puts "Timeout.timeout" }
10| end
=>#0 block in hello at ~/projects/debug-freeze-issue/app/controllers/hello_controller.rb:4
#1 block {|exc=#|} in timeout at ~/.gem/ruby/3.1.2/gems/timeout-0.3.1/lib/timeout.rb:189
# and 81 frames (use `bt' command for all frames)
(ruby) q!^[[A^[[A^[[A
# freezes
```