upgrading ubuntu 14.04 -> 16.04 deadlocks in libc6's preinst
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
glibc (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
I was upgrading a VPS from Ubuntu 14.04 to 16.04. The VPS is actually an OpenVZ container because this is a very cheap VPS provider. As such, it runs a rather old kernel (uname -r returns "2.6.32-
> This version of the GNU libc requires kernel version 3.2 or later. Older versions might work but are not officially supported. Please consider upgrading your kernel.
After that the preinst script displayed
Checking for services that may need to be restarted...
Checking init scripts...
/var/
and froze.
(I filed bug 1624835 about /sbin/runlevel being missing).
strace showed that the preinst script was blocked in read(0, ...).
lsof showed that 0 was a pipe, the other end of which was open in the debconf frontend process.
strace showed that the frontend process was blocked in wait4(<
Now I'm not a debconf expert, but it seems to me that the preinst script was trying to display two prompts (the outdated kernel warning and the select what services you want to restart one), but it incorrectly used the debconf API to tell the frontend it wasn't going to be displaying any further prompts after the first one (i.e. called db_stop).
I was able to continue the upgrade by killing the preinst script. (I had to do that twice: once for libc6:amd64 and once for libc6:i386.)
Status changed to 'Confirmed' because the bug affects multiple users.