package udev 208-8ubuntu8.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 102

Bug #1406735 reported by C. Jeffery Small
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sysvinit (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

A few weeks ago I installed Ubuntu 10.10 server with the addition of the xubuntu-desktop packages. Everything started out alright until i tried to install sendmail in place of postfix. That installaton failed, reporting a similar error:

"subprocess installed post-installation script returned error exit status 102"

From there, things went from bad to worse. I was now unable to finish the install of sendmail nor could I remove it fully and reinstall postfix. Spamassassin seemed to be one critical package that hept reporting errors. As I tried to install or remove packages using synaptic, the system most of the time refused to act due to dascading errors and partially removed packages that could not be removed, even by force.

Today I threw up my hands and did a complete fresh install of the system. Everything went well for the basic packages until I ran software updater. A few packages were scheduled to be updated, including udev and it has now faild in the exact same manner.

Could someone look at this and provide a quick reply as to what can be done to rectify this situation. I am afraid to install or remove any other software for fear of corrupting the system further and I currently do not have a usable system.

Let me know if additional information is required. Thanks.

ProblemType: Package
DistroRelease: Ubuntu 14.10
Package: udev 208-8ubuntu8.1
ProcVersionSignature: Ubuntu 3.16.0-28.38-generic 3.16.7-ckt1
Uname: Linux 3.16.0-28-generic x86_64
ApportVersion: 2.14.7-0ubuntu8
Architecture: amd64
CustomUdevRuleFiles: .70-persistent-net.rules
Date: Wed Dec 31 01:40:11 2014
DuplicateSignature: package:udev:208-8ubuntu8.1:subprocess installed post-installation script returned error exit status 102
ErrorMessage: subprocess installed post-installation script returned error exit status 102
InstallationDate: Installed on 2014-12-31 (0 days ago)
InstallationMedia: Ubuntu-Server 14.10 "Utopic Unicorn" - Release amd64 (20141022.2)
MachineType: ASUSTeK COMPUTER INC. Z9PE-D8 WS
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.16.0-28-generic root=UUID=d7121d57-8cf9-42a5-b7c3-75f414ce3e09 ro nomdmonddf nomdmonisw
SourcePackage: systemd
Title: package udev 208-8ubuntu8.1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 102
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 05/06/2014
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 5503
dmi.board.asset.tag: To be filled by O.E.M.
dmi.board.name: Z9PE-D8 WS
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: 1.0x
dmi.chassis.asset.tag: To Be Filled By O.E.M.
dmi.chassis.type: 17
dmi.chassis.vendor: To Be Filled By O.E.M.
dmi.chassis.version: To Be Filled By O.E.M.
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr5503:bd05/06/2014:svnASUSTeKCOMPUTERINC.:pnZ9PE-D8WS:pvr1.0x:rvnASUSTeKCOMPUTERINC.:rnZ9PE-D8WS:rvr1.0x:cvnToBeFilledByO.E.M.:ct17:cvrToBeFilledByO.E.M.:
dmi.product.name: Z9PE-D8 WS
dmi.product.version: 1.0x
dmi.sys.vendor: ASUSTeK COMPUTER INC.

Revision history for this message
C. Jeffery Small (loyhz2ay-jeff-h670zbts) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Martin Pitt (pitti) wrote :

Can you please run

  sudo sh -ex /var/lib/dpkg/info/udev.postinst configure

and copy&paste the output here? At first sight it looks like it errors out at "invoke-rc.d udev restart". If it does, can you confirm that

  sudo invoke-rc.d udev restart; echo $?

says "102" in the last line? Please copy&paste the full output here as well.

Do you have a policy-rc.d by any chance?

Changed in systemd (Ubuntu):
status: New → Incomplete
Revision history for this message
C. Jeffery Small (loyhz2ay-jeff-h670zbts) wrote :

As a test, I tried installing the Chrome browser packages. Here is what is reported by synaptic:

E: udev: subprocess installed post-installation script returned error exit status 102
E: systemd: dependency problems - leaving unconfigured
E: libpam-systemd: 41.3793:dependency problems - leaving unconfigured

History indicates that this problem will continue to grow as additional packages are infected down the road.
------------------------

Martin: Here is the output that you requested:
------------------------
# sh -ex /var/lib/dpkg/info/udev.postinst configure
+ set -e
+ update_hwdb
+ udevadm hwdb --update
+ chrooted
+ stat -c %d/%i /
+ stat -Lc %d/%i /proc/1/root
+ [ 2304/2 = 2304/2 ]
+ return 1
+ in_debootstrap
+ [ -d /debootstrap/ ]
+ return 1
+ invoke-rc.d udev restart
invoke-rc.d: not a symlink: /etc/rcS.d/S03udev@
invoke-rc.d: dangling symlink: /etc/rcS.d/S03udev@
------------------------
# cd /etc/rcS.d ; ls -l S03udev
lrwxrwxrwx 1 root root 14 Dec 30 21:58 S03udev -> ../init.d/udev

# ls -lL S03udev
-rwxr-xr-x 1 root root 6583 Oct 7 03:16 S03udev

# ls -l ../init.d/udev
-rwxr-xr-x 1 root root 6583 Oct 7 03:16 ../init.d/udev
------------------------
# invoke-rc.d udev restart; echo $?
udev stop/waiting
udev start/running, process 11619
0
------------------------
There is no policy-rc.d file or directory on this system. locate(1) shows only the following:

# locate policy-rc.d
/usr/share/doc/sysv-rc/README.policy-rc.d.gz
-------------------------

I hope this info helps. Please let me know if I can provide anything else. Regards.

Revision history for this message
C. Jeffery Small (loyhz2ay-jeff-h670zbts) wrote :

Follow up:

I was curious to see what the exit status of the udev.postinst command was, so I ran it again and here is what happened this time!

 -------------------------
# sh -ex /var/lib/dpkg/info/udev.postinst configure ; echo $?
+ set -e
+ update_hwdb
+ udevadm hwdb --update
+ chrooted
+ stat -c %d/%i /
+ stat -Lc %d/%i /proc/1/root
+ [ 2304/2 = 2304/2 ]
+ return 1
+ in_debootstrap
+ [ -d /debootstrap/ ]
+ return 1
+ invoke-rc.d udev restart
udev stop/waiting
udev start/running, process 11860
+ update-initramfs -u
update-initramfs: Generating /boot/initrd.img-3.16.0-28-generic
W: mdadm: the array /dev/md/dymaxion:x with UUID c052a4db:6908e47c:8f2cac48:2b6c1305
W: mdadm: is currently active, but it is not listed in mdadm.conf. if
W: mdadm: it is needed for boot, then YOUR SYSTEM IS NOW UNBOOTABLE!
W: mdadm: please inspect the output of /usr/share/mdadm/mkconf, compare
W: mdadm: it to /etc/mdadm/mdadm.conf, and make the necessary changes.
+ [ -x /etc/init.d/udev ]
+ update-rc.d udev defaults
+ [ -x /etc/init.d/udev-finish ]
+ update-rc.d udev-finish defaults
+ [ -x /etc/init.d/udevtrigger ]
+ [ -x /etc/init.d/udevmonitor ]
+ [ -x /etc/init.d/udev-fallback-graphics ]
+ [ -x /etc/init.d/lvm2 ]
+ update-rc.d lvm2 defaults
+ dpkg-maintscript-helper rm_conffile /etc/init.d/udev-mtab 204-1~ -- configure
dpkg-maintscript-helper: error: couldn't identify the package
1
 -------------------------

So what's up with that? I did nothing to the system between invocations other than run the "invoke-rc.d udev restart; echo $?" command.

Now, I appear to have another problem in that mdadm has now been excluded from the boot file. The root filesystem is indeed mirrored, so I must rebuild this with mdadm. This is a procedure that i am unfamiliar with. I will research it. However, if you can suggest the proper steps to take, that would be appreciated. Thanks.

Revision history for this message
C. Jeffery Small (loyhz2ay-jeff-h670zbts) wrote :

PPS:

OK, I misunderstood the messages regarding mdadm. It is complaning about an array that is NOT related to booting, but gets mounted through fstab. At first I though that it was implying that the /etc/mdadm/mdadm.conf file was corrupted and that support for mdadm had been eliminated from /boot/initrd.img-3.16.0-28-generic. The root and swap arrays are properly defined, so all is well. I'll add the additional array to mdadm.conf for completeness.

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

Thanks for the further debug output. In your first response I don't really understand the invoke-rc.d complaint about the symlink.

> dpkg-maintscript-helper: error: couldn't identify the package

Ah, I forgot about that. Try running it like that:

# env DPKG_MAINTSCRIPT_PACKAGE=udev DPKG_MAINTSCRIPT_NAME=postinst sh -ex /var/lib/dpkg/info/udev.postinst configure ; echo $?

So I don't understand why invoke-rc.d works fine when you call it directly, but complains about the rcS.d/ link (which looks fine) when being called through the postinst. So maybe above command will shed some light on this. If it still doesn't, you can also try to modify /var/lib/dpkg/info/udev.postinst to add an additional "set -x" as the second line, and run

  sudo dpkg-reconfigure udev

Revision history for this message
C. Jeffery Small (loyhz2ay-jeff-h670zbts) wrote :

Martin:

The previous invocation of /var/lib/dpkg/info/udev.postinst configure seems to have cleared the problem so I didn't rerun this command. However, I was installing other packages and while installing evolution, ran into my old nemisis: spamassassin which failed in a similar manner, creating dependency problems dor sa-compile. So I tried your suggestion on that package and got this result:

# env DPKG_MAINTSCRIPT_PACKAGE=spamassassin DPKG_MAINTSCRIPT_NAME=postinst sh -ex /var/lib/dpkg/info/spamassassin.postinst configure ; echo $?
+ set -e
+ [ configure = triggered ]
+ [ configure = configure ]
+ getent passwd debian-spamd
+ mkdir -p /var/lib/spamassassin
+ stat -c %U /var/lib/spamassassin
+ OWNER=debian-spamd
+ stat -c %G /var/lib/spamassassin
+ GROUP=debian-spamd
+ dpkg-statoverride --list /var/lib/spamassassin/sa-update-keys
+ [ debian-spamd:debian-spamd != debian-spamd:debian-spamd ]
+ test -d /var/lib/spamassassin/sa-update-keys
+ su - debian-spamd -c sa-update --gpghomedir /var/lib/spamassassin/sa-update-keys --import /usr/share/spamassassin/GPG.KEY
+ deb-systemd-helper debian-installed spamassassin.service
+ deb-systemd-helper unmask spamassassin.service
+ deb-systemd-helper --quiet was-enabled spamassassin.service
+ deb-systemd-helper update-state spamassassin.service
+ [ -x /etc/init.d/spamassassin ]
+ update-rc.d spamassassin defaults 19 21
+ [ -x /etc/init.d/spamassassin ]
+ invoke-rc.d spamassassin start
SpamAssassin Mail Filter Daemon: disabled, see /etc/default/spamassassin
0

OK, that looks promising. When I returned to synaptic and installed another unrelated package, it then proceded to configure both spamassassin and sa-compile! There must be a flag somewhere that doesn't get updated when the manual command is run, so the package manager still thinks it needs to be performed.

In any event, I have apparently managed to get the udev and spamassassin packages into a stable state and new packages are installing as expected once again. Please let me know if you would like any additional information. And thank you greatly for your guick and very useful help.

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

While that's good for your system :-) I'm afraid I still understand what went wrong initially in the first place. Calling the postinsts manually should be very close to what actually happens during apt-get. It seems reasonably clear that it was invoke-rc.d complaining about symlinks, so it seems at that time there was something wrong about them which a subsequent invocation of the postinst fixed. So we don't have any evidence about what went wrong any more :-/

If you manage to get this situation again (on a different system perhaps), could you please immediately capture "ls -l /etc/rcS.d/*udev*"? Thanks!

affects: systemd (Ubuntu) → sysvinit (Ubuntu)
Changed in sysvinit (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
C. Jeffery Small (loyhz2ay-jeff-h670zbts) wrote :

Martin:

I did a lot of additional investigating into the link issue and I believe I have discovered the problem which was on my end. For many years I have have has a bunch of aliases for /bin/ls defined. For example:

alias l="/bin/ls -al"
alias lx="/bin/ls -FC"
alias lt="/bin/ls -AFCt"

As aliases, these have never caused any problem. However, while moving to this new system, these aliases were converted into a shell script with a bunch of links. Unfortunately, one of the links was created as ls rather than lx and this caused calls to ls to append the "type" characters -- in the case of sympolic links, an '@' character.

Looking back at the original messages from above:

+ invoke-rc.d udev restart
invoke-rc.d: not a symlink: /etc/rcS.d/S03udev@
invoke-rc.d: dangling symlink: /etc/rcS.d/S03udev@

I see that the '@' is listed as part of the name. I missed this originally because I am so used to seeing that designator in my listings, but I am pretty sure that the script was taking this as part of the actual filename and could locate no links by those names.

This failure of invoke-rc.d probably kept the postinst script from running. So that solves one problem.

Since manually running the postinst script worked, it probably would have run successfully had the ls error not occurred. The udef package is therefore, probably alright as is.

Sorry to have been the source of the problem and wasted your time on this, but your input was very helpful in getting it resolved. I've had some issues with other package installations which I do not think were caused by the same ls error, as that new script was only active for a few days. I will monitor future updates and see if any pattern emerges, but for now all is well.

Thanks for all of your help.
--
Jeff Small

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

Ooh, that would do it indeed! Please don't overwrite standard tools like ls, aliases should be good enough for shell use?

Revision history for this message
C. Jeffery Small (loyhz2ay-jeff-h670zbts) wrote :

"Please don't overwrite standard tools like ls"

No kidding! It was not something that I did intentionally -- just that day's brain-fart. :-(

Revision history for this message
ruedihofer (ruedihofer) wrote :

I have a similar problem when updating my System. It says in aptitude for ppp the following, but it might be caused by any of the other packets at the end. Someone with an idea?

I'm running these foreign repos:
deb http://dl.google.com/linux/earth/deb/ stable main
deb http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu/ utopic main
deb http://ppa.launchpad.net/kubuntu-ppa/ppa/ubuntu/ utopic main
deb http://ppa.launchpad.net/videolan/stable-daily/ubuntu/ utopic main

The Log with aptitude:

Setting up udev (208-8ubuntu8.1) ...
udev stop/waiting
udev start/running, process 4972
update-initramfs: deferring update (trigger activated)
insserv: warning: script 'x11vnc' missing LSB tags and overrides
insserv: Script vncserver is broken: incomplete LSB comment.
insserv: missing `Provides:' entry: please add.
insserv: missing `Required-Start:' entry: please add even if empty.
insserv: missing `Required-Stop:' entry: please add even if empty.
insserv: missing `Default-Start:' entry: please add even if empty.
insserv: missing `Default-Stop:' entry: please add even if empty.
insserv: Default-Start undefined, assuming empty start runlevel(s) for script `vncserver'
insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script `vncserver'
insserv: There is a loop between service minidlna and x11vnc if stopped
insserv: loop involving service x11vnc at depth 2
insserv: loop involving service minidlna at depth 1
insserv: Stopping x11vnc depends on minidlna and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: error processing package udev (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of systemd:
 systemd depends on udev; however:
  Package udev is not configured yet.

dpkg: error processing package systemd (--configure):No apport report written because the error message indicates its a followup error from a previous failure.

 dependency problems - leaving unconfigured
...
Errors were encountered while processing:
 ppp
 ntp
 openvpn
 cgmanager
 udev
 xserver-xorg-core
 systemd
 libpam-systemd:amd64
Press Return to continue.

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

ruedihofer, you are seeing bug 1385817 -- in short, /etc/init.d/x11vnc has a missing or invalid LSB header.

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.