canonical / canonical/multipass

Daemon hangs when changing a setting from the GUI

Open
#5,232 0 comments 0 reactions 0 assignees View on GitHub
needs triage
Dominant language
C++
Stars
9.2k
Forks
828
Avg merge
3d 2h
Merged PRs (30d)
43

Description

**Describe the bug**

Changing a persisted daemon setting is supposed to cause the daemon to quit, but it often hangs (always in my attempts from a Windows VM). Before it can complete, it waits for info/zones gRPCs to be serviced, which never happens because the event loop has already finished. RPC handlers queue their work on the main thread, which is the one blocked waiting for them when handing Qt's aboutToQuit signal. In-flight RPCs never finish.

Describe what your problem is.

**To Reproduce**

Repeat until the deadlock is hit:

1. Open the GUI
2. Change a persistent daemon setting (e.g. driver)
3. Observe the daemon fails to quit and restart
* new actions in the GUI or connection attempts from the CLI fail

**Expected behavior**
The daemon would quit and get restarted.

**Additional context**
Hit when testing #5210.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the GUI's persistent-setting change through daemon shutdown and Qt's aboutToQuit handling, then follow the info/zones gRPC handlers queued on the main thread. Reproduce the deadlock repeatedly, especially from a Windows VM; done means the daemon quits and restarts reliably without leaving in-flight RPCs blocked.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, grpc
Domain
api, backend, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.