upgrading ubuntu 14.04 -> 16.04 deadlocks in libc6's preinst

Bug #1624837 reported by Marius Gedminas
10
This bug affects 2 people
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-042stab116.2"). The libc6 preinst script, quite correctly, decided to warn me about it:

> 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/lib/dpkg/tmp.ci/preinst: 355: /var/lib/dpkg/tmp.ci/preinst: runlevel: not found

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(<pid-of-the-preinst-script>).

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.)

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in glibc (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.