More info from today, where again the update is stalled due to the next
update
# xargs -0n 1 -a /proc/401446/environ echo
DPKG_FRONTEND_LOCKED=true
APT_LISTCHANGES_FRONTEND=none
LANGUAGE=de_DE.UTF-8
PACKAGEKIT_CALLER_UID=2260
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
LANG=de_DE.UTF-8
DEBIAN_FRONTEND=noninteractive
PWD=/tmp
APT_LISTBUGS_FRONTEND=none
The message is from
# dpkg -L needrestart | xargs grep -sn --color Return
/usr/share/perl5/NeedRestart/UI/stdio.pm:42: $self->wprint(\*STDOUT, '', '',
__x("Pending kernel upgrade!\n\nRunning kernel version:\n {kversion}\n\nDiagnostics:\n
{message}\n\nRestarting the system to load the new kernel will not be handled
automatically, so you should consider rebooting. [Return]\n",
which is the only available UI package:
env -i DPKG_FRONTEND_LOCKED=true APT_LISTCHANGES_FRONTEND=none LANGUAGE=C.UTF-8
PACKAGEKIT_CALLER_UID=2260
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
LANG=de_DE.UTF-8 DEBIAN_FRONTEND=noninteractive PWD=/tmp
APT_LISTBUGS_FRONTEND=none /usr/sbin/needrestart -u \?
Available UI packages:
NeedRestart::UI::stdio
Looking further into /usr/share/perl5/NeedRestart/UI/stdio.pm:
sub _announce {
...
<STDIN> if (-t *STDIN && -t *STDOUT);
}
Combine that with
# lsof -p 401446 -a -d 0-2
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
needresta 401446 root 0u CHR 136,3 0t0 6 /dev/pts/3
needresta 401446 root 1u CHR 136,3 0t0 6 /dev/pts/3
needresta 401446 root 2u CHR 136,3 0t0 6 /dev/pts/3
STDIN and STDOUT are both '/dev/pts/3' which is a pseudo TTY, so the
test evaluates to true and the code tries to read from that PTY; as the
message is not displayed anywhere visible and there is no way to
interact with needrestart from Discover the process hangs.
Philipp