sudo-project/sudo

sudo apt autoremove runs forever

markuman opened this issue · 0 comments

After upgrading to sudo 1.9.14p3 from 1.9.9 on Ubuntu 22.04, sudo apt autoremove runs forever.

~$ sudo apt autoremove
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done

keyboard interactivity is not possible anymore.
when

~$ sudo cat /etc/sudoers.d/00-log-subcmds
Defaults log_subcmds

is configured.
When the config file is removed, sudo apt autoremove works as expected

~$ sudo mv /etc/sudoers.d/00-log-subcmds .
~$ sudo apt autoremove
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
~$ 

this is the last log line when Defaults log_subcmds is set and sudo apt autoremove hangs

Sep  4 19:26:49 somehost sudo:   someuser : TTY=pts/1 ; PWD=/home/someuser ; USER=root ; COMMAND=/snap/snapd/current/usr/bin/snap advise-snap --from-apt