0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-12 05:37:26 +08:00
discourse/bin
Loïc Guitaut 11f1054d0d
DEV: Fix pitchfork stalling on shutdown when using bin/ember-cli -u (#38916)
When pressing Ctrl+C with `bin/ember-cli -u`, the server could appear
stuck for up to 60 seconds and stop responding to further Ctrl+C
attempts, requiring `kill -9` to terminate.

This was most commonly triggered after switching git branches, which
could leave workers stuck in native code (autoloading, V8 compilation,
etc.), making the slow shutdown path much more noticeable.

The root cause was a signal race: when Ctrl+C sends SIGINT to the
process group, ember-cli's monitoring thread would also send SIGTERM to
the pitchfork supervisor after detecting ember died. This TERM arrived
at the pitchfork monitor while it was already performing a hard shutdown
(from INT), causing it to abort the hard shutdown and fall back to a
slow graceful shutdown with a 60-second timeout. Combined with both
bin/ember-cli and bin/pitchfork unconditionally swallowing all
subsequent SIGINTs, the user had no way to interrupt.

Fixes:
- bin/ember-cli: track whether SIGINT was received and skip sending TERM
to the server in that case (it already got INT from the terminal)
- bin/ember-cli, bin/pitchfork, bin/unicorn: add signal escalation so
repeated Ctrl+C can force-kill children as a last resort
2026-03-27 13:48:58 +01:00
..
docker DEV: Move puma to test-only dependency (#38652) 2026-03-18 05:23:12 +08:00
annotaterb DEV: fix linter and linting config (#36815) 2025-12-22 07:23:19 +11:00
bundle DEV: fix linter and linting config (#36815) 2025-12-22 07:23:19 +11:00
dev DEV: Add basic bin/dev script for launching in development (#23254) 2023-08-25 12:07:16 +08:00
ember-cli DEV: Fix pitchfork stalling on shutdown when using bin/ember-cli -u (#38916) 2026-03-27 13:48:58 +01:00
lint PERF: let lefthook run linter commands in parallel (#38649) 2026-03-17 11:27:08 +08:00
notify_file_change FIX: notify_file_change was outputting a command to vim 2020-12-10 10:03:57 -05:00
pitchfork DEV: Fix pitchfork stalling on shutdown when using bin/ember-cli -u (#38916) 2026-03-27 13:48:58 +01:00
qunit DEV: Ensure plugins are loaded correctly when building in bin/qunit (#38719) 2026-03-19 13:32:11 +00:00
rails DEV: Enable Pitchfork by default (#37679) 2026-02-11 11:52:39 +01:00
rake DEV: fix linter and linting config (#36815) 2025-12-22 07:23:19 +11:00
rspec DEV: Add client settled checks for system tests (#35230) 2025-10-10 11:03:18 +08:00
rubocop DEV: fix linter and linting config (#36815) 2025-12-22 07:23:19 +11:00
system_rspec DEV: Minimal first pass of rails system test setup (#16311) 2022-09-28 11:48:16 +10:00
turbo_rspec DEV: Enforce deprecation-free tests for preinstalled plugins/themes (#36445) 2025-12-16 17:48:29 -03:00
unicorn DEV: Fix pitchfork stalling on shutdown when using bin/ember-cli -u (#38916) 2026-03-27 13:48:58 +01:00