Repository navigation
KVM watchdog: restart the headless Deskflow server when it hangs (0.3.33) - #89
Merged
Merged
Conversation
On 2026-11-22 at 08:20 the hub's deskflow-core stopped answering: the process stayed alive, clients couldn't connect, the thumb button timed out, and SIGTERM did nothing until systemd's 90 s stop timeout. Bragi now probes the server every 20 s with `switch=-bragi-probe-`, a name no computer has, so the core thread has to answer "isn't connected" and nothing switches. `noop` wouldn't do: Qt's main thread serves the IPC socket and kept answering while the core thread hung. After three missed probes Bragi logs each thread's wait channel and SIGKILLs the unit; Restart=always starts it again. A stopped server (no socket) is left to systemd. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On 2026-11-22 at 08:20, sagehub's
deskflow-corestopped answering. The process stayed alive, but clients couldn't connect and the thumb button got "The KVM isn't reachable: timed out". SIGTERM did nothing until systemd's 90 s stop timeout. Nothing could be controlled until it was restarted by hand.kvm.probe()sendsswitch=-bragi-probe-to the core socket. No computer has that name, so the core thread has to answer "isn't connected", and nothing switches.noopwouldn't work: Qt's main thread serves the IPC socket, and it kept answering while the core thread hung.kvm.watchdogprobes every 20 s. After three misses in a row,kvm_config.kill_hung_enginelogs each thread's wait channel (the hub has no debugger) and runssystemctl --user kill --signal=SIGKILL;Restart=alwaysstarts the server again.Tests: pytest 493 passed under Linux (WSL), including the new probe and watchdog tests against a fake core socket that stops answering.
🤖 Generated with Claude Code