Snapd postinst script hangs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Triaged
|
High
|
Unassigned | ||
dpkg (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
systemd (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
On a machine which has been tracking upgrades for a while, I am unable to install new versions of snapd. The install process stalls indefinitely. Processes running suggest this is a hang in the postinst:
~$ ps ax | grep dpkg
2388 pts/1 Ss+ 0:00 /usr/bin/dpkg --status-fd 25 --configure --pending
2389 pts/1 S+ 0:00 /bin/sh /var/lib/
2875 pts/2 S+ 0:00 grep --color=auto dpkg
~$ pstree 2388
dpkg───
~$ ps ax | grep snapd
732 ? Ssl 0:00 /usr/lib/
2389 pts/1 S+ 0:00 /bin/sh /var/lib/
2452 pts/1 S+ 0:00 /bin/systemctl start snapd.autoimpor
2880 pts/2 S+ 0:00 grep --color=auto snapd
Changed in snapd: | |
importance: | Undecided → Critical |
status: | New → Triaged |
Changed in dpkg (Ubuntu): | |
status: | Confirmed → Invalid |
At the moment the main suspect is the systemd-tty-ask (which would block with a password prompt), although it might be a long shot. I've just tried with the latest focal desktop image, there were lots of debs to upgrade (including snapd) but I couldn't reproduce it. The postinst is relatively simple, it just starts all mount units of snaps with a systemctl wrapper.
Could you please:
- paste `pstree -u` output for the pid of systemctl process (the one under 2388's tree)
- paste the output of 'ls -l /proc/<systemctl pid>/fd/0'
- attach /var/log/auth.log
Thank you!