canonical / canonical/multipass
Multipass delays system restart/shutdown by 9m15s
- Dominant language
- C++
- Stars
- 9.2k
- Forks
- 828
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 44
Description
**Describe the bug**
- Restarting is delayed until timeout elapses. The timeout seems to be significantly longer than the total sum of `multipass stop` per instance. After 9m15s elapses, the system is immediately restarted without any further delay.
- This also happens when restarting from the login manager, i.e. without ever logging in with a user.

**To Reproduce**
1. Start 2 multipass VMs.
1. Restart the host (takes a long time, per screenshot above).
1. Wait for the login screen to show up. Do not log in. Wait a few minutes.
1. Restart the host (takes a long time, per screenshot above).
**Expected behavior**
Shutting down multipass takes at most as long as the sum of `multipass stop` per instance.
**Logs**
[multipass-journalctl.log](https://github.com/canonical/multipass/files/12456557/multipass-journalctl.log)
**Additional info**
- OS: Ubuntu 22.04.3 LTS
- `multipass version`
- multipass 1.12.2
- multipassd 1.12.2
- `multipass info --all`
```
Name: primary
State: Stopped
IPv4: --
Release: --
Image hash: eba3234587c9 (Ubuntu 20.04 LTS)
CPU(s): --
Load: --
Disk usage: --
Memory usage: --
Mounts: --
Name: charm-dev-2cpu-7g
State: Stopped
IPv4: --
Release: --
Image hash: 3100a27357a0 (Ubuntu 22.04 LTS)
CPU(s): --
Load: --
Disk usage: --
Memory usage: --
Mounts: /home/him/code => /home/ubuntu/code
UID map: 1000:default
GID map: 1000:default
Name: docker
State: Suspended
IPv4: --
Release: --
Image hash: dc5b5a43c267 (Ubuntu 22.04 LTS)
CPU(s): --
Load: --
Disk usage: --
Memory usage: --
Mounts: --
Name: mpbp
State: Running
IPv4: 10.43.8.149
10.151.131.1
10.1.166.64
Release: Ubuntu 22.04.3 LTS
Image hash: d5b419272e01 (Ubuntu 22.04 LTS)
CPU(s): 2
Load: 0.40 0.61 0.50
Disk usage: 49.3GiB out of 58.1GiB
Memory usage: 3.4GiB out of 6.8GiB
Mounts: /home/him/code => /home/ubuntu/code
UID map: 1000:default
GID map: 1000:default
```
- `multipass get local.driver`: `qemu`
Contributor guide
Research direction
Start with the attached multipass-journalctl.log and reproduce the shutdown sequence using two Multipass VMs on Ubuntu 22.04 with the qemu driver. Compare the host restart delay with the time taken by multipass stop per instance; done means shutdown completes without the unexplained 9m15s timeout, including from the login manager.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, linux, ubuntu
- Domain
- infrastructure, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100