debug: thread didn't start in 5.0 seconds (in state: :starting) (Listen::Error::NotStarted)
Hi, I saw the entry in Rails changelog so I wanted to try debug out in our app replacing pry. I’m on ruby 3.0.2, Puma 5.4.0, and Rails 6.1.4.1, so all the latest versions. I’m getting this error when starting rails server:
❯ rails s
DEBUGGER: Session start (pid: 25524)
=> Booting Puma
=> Rails 6.1.4.1 application starting in development
=> Run `bin/rails server --help` for more startup options
[25524] Puma starting in cluster mode...
[25524] * Puma version: 5.4.0 (ruby 3.0.2-p107) ("Super Flight")
[25524] * Min threads: 5
[25524] * Max threads: 5
[25524] * Environment: development
[25524] * Master PID: 25524
[25524] * Workers: 2
[25524] * Restarts: (✔) hot (✖) phased
[25524] * Preloading application
[25524] * Listening on http://127.0.0.1:3000
[25524] * Listening on http://[::1]:3000
[25524] Use Ctrl-C to stop
[25524] ! Promoting existing objects to old generation...
[25524] ! Compacting...
[25524] ! Friendly fork preparation complete.
DEBUGGER: Detaching after fork from parent process 25524
[25524] - Worker 1 (PID: 25560) booted in 0.02s, phase: 0
/Users/miharekar/.gem/ruby/3.0.2/gems/listen-3.7.0/lib/listen/event/loop.rb:57:in `start': thread didn't start in 5.0 seconds (in state: :starting) (Listen::Error::NotStarted)
from /Users/miharekar/.gem/ruby/3.0.2/gems/listen-3.7.0/lib/listen/listener.rb:75:in `block in <class:Listener>'
from /Users/miharekar/.gem/ruby/3.0.2/gems/listen-3.7.0/lib/listen/fsm.rb:124:in `instance_eval'
from /Users/miharekar/.gem/ruby/3.0.2/gems/listen-3.7.0/lib/listen/fsm.rb:124:in `call'
from /Users/miharekar/.gem/ruby/3.0.2/gems/listen-3.7.0/lib/listen/fsm.rb:105:in `transition_with_callbacks!'
from /Users/miharekar/.gem/ruby/3.0.2/gems/listen-3.7.0/lib/listen/fsm.rb:72:in `transition'
from /Users/miharekar/.gem/ruby/3.0.2/gems/listen-3.7.0/lib/listen/listener.rb:93:in `start'
from /Users/miharekar/.gem/ruby/3.0.2/gems/activesupport-6.1.4.1/lib/active_support/evented_file_update_checker.rb:109:in `start'
from /Users/miharekar/.gem/ruby/3.0.2/gems/activesupport-6.1.4.1/lib/active_support/evented_file_update_checker.rb:89:in `block in initialize'
from /Users/miharekar/.gem/ruby/3.0.2/gems/activesupport-6.1.4.1/lib/active_support/fork_tracker.rb:38:in `each'
from /Users/miharekar/.gem/ruby/3.0.2/gems/activesupport-6.1.4.1/lib/active_support/fork_tracker.rb:38:in `check!'
from /Users/miharekar/.gem/ruby/3.0.2/gems/activesupport-6.1.4.1/lib/active_support/fork_tracker.rb:9:in `block in fork'
from /Users/miharekar/.gem/ruby/3.0.2/gems/activesupport-6.1.4.1/lib/active_support/fork_tracker.rb:8:in `fork'
from /Users/miharekar/.gem/ruby/3.0.2/gems/activesupport-6.1.4.1/lib/active_support/fork_tracker.rb:8:in `fork'
from /Users/miharekar/.gem/ruby/3.0.2/gems/activesupport-6.1.4.1/lib/active_support/fork_tracker.rb:27:in `fork'
from /Users/miharekar/.gem/ruby/3.0.2/bundler/gems/debug-9cdbfbf868eb/lib/debug/session.rb:1661:in `fork'
from /Users/miharekar/.gem/ruby/3.0.2/gems/activesupport-6.1.4.1/lib/active_support/fork_tracker.rb:8:in `fork'
from /Users/miharekar/.gem/ruby/3.0.2/gems/activesupport-6.1.4.1/lib/active_support/fork_tracker.rb:27:in `fork'
from /Users/miharekar/.gem/ruby/3.0.2/gems/puma-5.4.0/lib/puma/cluster.rb:97:in `spawn_worker'
from /Users/miharekar/.gem/ruby/3.0.2/gems/puma-5.4.0/lib/puma/cluster.rb:79:in `block in spawn_workers'
from /Users/miharekar/.gem/ruby/3.0.2/gems/puma-5.4.0/lib/puma/cluster.rb:72:in `times'
from /Users/miharekar/.gem/ruby/3.0.2/gems/puma-5.4.0/lib/puma/cluster.rb:72:in `spawn_workers'
from /Users/miharekar/.gem/ruby/3.0.2/gems/puma-5.4.0/lib/puma/cluster.rb:407:in `run'
from /Users/miharekar/.gem/ruby/3.0.2/gems/puma-5.4.0/lib/puma/launcher.rb:181:in `run'
from /Users/miharekar/.gem/ruby/3.0.2/gems/puma-5.4.0/lib/rack/handler/puma.rb:72:in `run'
from /Users/miharekar/.gem/ruby/3.0.2/gems/rack-2.2.3/lib/rack/server.rb:327:in `start'
from /Users/miharekar/.gem/ruby/3.0.2/gems/railties-6.1.4.1/lib/rails/commands/server/server_command.rb:39:in `start'
from /Users/miharekar/.gem/ruby/3.0.2/gems/railties-6.1.4.1/lib/rails/commands/server/server_command.rb:144:in `block in perform'
from <internal:kernel>:90:in `tap'
from /Users/miharekar/.gem/ruby/3.0.2/gems/railties-6.1.4.1/lib/rails/commands/server/server_command.rb:135:in `perform'
from /Users/miharekar/.gem/ruby/3.0.2/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
from /Users/miharekar/.gem/ruby/3.0.2/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
from /Users/miharekar/.gem/ruby/3.0.2/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
from /Users/miharekar/.gem/ruby/3.0.2/gems/railties-6.1.4.1/lib/rails/command/base.rb:69:in `perform'
from /Users/miharekar/.gem/ruby/3.0.2/gems/railties-6.1.4.1/lib/rails/command.rb:48:in `invoke'
from /Users/miharekar/.gem/ruby/3.0.2/gems/railties-6.1.4.1/lib/rails/commands.rb:18:in `<main>'
from /Users/miharekar/.gem/ruby/3.0.2/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
from /Users/miharekar/.gem/ruby/3.0.2/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
from /Users/miharekar/.gem/ruby/3.0.2/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /Users/miharekar/.gem/ruby/3.0.2/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
from /Users/miharekar/.gem/ruby/3.0.2/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
from bin/rails:4:in `<main>'
[25524] - Worker 0 (PID: 25566) booted in 0.02s, phase: 0
I cleared bootsnaps cache, tried loading latest version of this gem directly from GitHub, but nothing seems to make it work. Of course, binding.b are just ignored since the thread didn’t start correctly.
Any ideas?
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 18 (2 by maintainers)
Commits related to this issue
- Debug is not ready yet 😔 https://github.com/ruby/debug/issues/273 — committed to peteromallet/Advisable by deleted user 3 years ago
- wrap `_fork` from Ruby 3.1 Ruby 3.1 calls `_fork` from `Kernel#fork` and `Process.fork` (and so on) so we only need to wrap `_fork`. This patch is required to wrap `fork` features as a nearest wrappe... — committed to ruby/debug by ko1 2 years ago
- wrap `_fork` from Ruby 3.1 Ruby 3.1 calls `_fork` from `Kernel#fork` and `Process.fork` (and so on) so we only need to wrap `_fork`. This patch is required to wrap `fork` features as a nearest wrappe... — committed to ruby/debug by ko1 2 years ago
- wrap `_fork` from Ruby 3.1 Ruby 3.1 calls `_fork` from `Kernel#fork` and `Process.fork` (and so on) so we only need to wrap `_fork`. This patch is required to wrap `fork` features as a nearest wrappe... — committed to ruby/debug by ko1 2 years ago
Thank you so much. I’ll check it later.
I found the reason and fix it soon.
Ah, I got it