libpam-systemd postinstall stuck on upgrade

Bug #1308262 reported by Casey Marshall
34
This bug affects 6 people
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Fix Released
Undecided
Unassigned
Trusty
Incomplete
Undecided
Unassigned

Bug Description

Just did an "apt-get update && apt-get dist-upgrade" on my trusty laptop. It's been stuck in the libpam-systemd postinst for 15-20 minutes:

Recent output from dist-upgrade:

Unpacking xpra (0.12.3+dfsg-1ubuntu1) over (0.12.2+dfsg-1ubuntu1) ...
Processing triggers for man-db (2.6.7.1-1) ...
Processing triggers for ureadahead (0.100.0-16) ...
ureadahead will be reprofiled on next reboot
Processing triggers for gnome-menus (3.10.1-0ubuntu2) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu1) ...
Processing triggers for mime-support (3.54ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.13-1) ...
Setting up libcgmanager0:i386 (0.24-0ubuntu5) ...
Setting up libcgmanager0:amd64 (0.24-0ubuntu5) ...
Setting up libudev1:amd64 (204-5ubuntu20) ...
Setting up libudev1:i386 (204-5ubuntu20) ...
Setting up udev (204-5ubuntu20) ...
udev stop/waiting
udev start/running, process 30898
Removing 'diversion of /bin/udevadm to /bin/udevadm.upgrade by fake-udev'
update-initramfs: deferring update (trigger activated)
Setting up libsystemd-daemon0:amd64 (204-5ubuntu20) ...
Setting up systemd-services (204-5ubuntu20) ...
Setting up libpam-systemd:amd64 (204-5ubuntu20) ...
Installing new version of config file /etc/init/systemd-logind.conf ...
[stuck here]

Relevant processes running:

     | | | | |-bash---sudo---apt-get---dpkg---libpam-systemd:---invoke-rc.d---start

root 28517 17005 0 16:14 pts/26 00:00:00 sudo apt-get dist-upgrade
root 28579 28517 3 16:14 pts/26 00:00:56 apt-get dist-upgrade
root 30803 28579 0 16:15 pts/28 00:00:00 /usr/bin/dpkg --status-fd 69 --configure libcgmanager0:i386 libcgmanager0:amd64 libudev1:amd64 libudev1:i386 udev:amd64 libsystemd-daemon0:amd64 systemd-services:amd64 libpam-systemd:amd64 libsystemd-login0:amd64 chromium-codecs-ffmpeg-extra:amd64 chromium-browser:amd64 chromium-browser-l10n:all libgudev-1.0-0:amd64 cgmanager:amd64 liblxc1:amd64 python3-lxc:amd64 lxc:amd64 lxc-templates:amd64 libva1:amd64 libva-x11-1:amd64 libsystemd-journal0:amd64 ubuntu-minimal:amd64 gir1.2-gudev-1.0:amd64 libxenstore3.0:amd64 libxen-4.4:amd64 python-qt4:amd64 python-qt4-dbus:amd64 xpra:amd64
root 30928 30803 0 16:15 pts/28 00:00:00 /bin/sh /var/lib/dpkg/info/libpam-systemd:amd64.postinst configure 204-5ubuntu19
root 30942 30928 0 16:15 pts/28 00:00:00 /bin/sh /usr/sbin/invoke-rc.d systemd-logind start
root 30984 30942 0 16:15 pts/28 00:00:00 start systemd-logind

System info:

Description: Ubuntu 14.04 LTS
Release: 14.04

libpam-systemd:
  Installed: 204-5ubuntu20
  Candidate: 204-5ubuntu20
  Version table:
 *** 204-5ubuntu20 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status

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

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

Changed in systemd (Ubuntu):
status: New → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

This is fixed in utopic, the upstart script went away completely in favor of D-BUS activation.

Changed in systemd (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Michael Heuberger (michael.heuberger) wrote :

I have this issue, not sure if it's related:

Setting up libpam-systemd:amd64 (204-5ubuntu20.4) ...
start: Job failed to start
invoke-rc.d: initscript systemd-logind, action "start" failed.
dpkg: error processing package libpam-systemd:amd64 (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 libpam-systemd:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Steve Conklin (sconklin) wrote :

It may be fixed in Utopic but it's still causing hangs during updates on Trusty

Revision history for this message
Steve Conklin (sconklin) wrote :

For anyone else who hits this bug on Trusty, here's how to resolve it:

Kill the update that's in process
$ sudo rm /var/lib/dpkg/lock
$ sudo dpkg --configure -a

Revision history for this message
Martin Pitt (pitti) wrote :

The most prominent cause of breakage in trusty was bug 1382510, which is fixed in trusty-updates now. Do people still encounter this with 204-5ubuntu20.8? If so, we need to debug what else breaks in the init script (adding some "set -x", etc.)

Changed in systemd (Ubuntu Trusty):
status: New → Incomplete
Revision history for this message
bam (mybigspam) wrote :

Got this on Ubuntu 20.04

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.