Version: 2.1.31

I'm seeing this problem too. During my last upgrade it just hung on
every package that calls install-docs, which calls update-menus which
again calls update-menus. The last update-menus then goes <defunct>
just like with mario.
But at package number X it did not go defunct, but still hung there
so I decided to strace:

root      9548  7344  0 21:51 pts/2    00:00:00 dpkg --configure -a
root      9772  9548  0 21:51 pts/2    00:00:00 /bin/sh 
/var/lib/dpkg/info/lintian.postinst configure 1.23.24
root      9774  9772  0 21:51 pts/2    00:00:00 /usr/bin/perl 
/usr/sbin/install-docs -i /usr/share/doc-base/lintian
root      9775  9774  0 21:51 pts/2    00:00:00 /usr/bin/update-menus
root      9776  9775  0 21:51 pts/2    00:00:00 /usr/bin/update-menus

$ sudo strace -p 9775
Process 9775 attached - interrupt to quit
futex(0xb7e79330, FUTEX_WAIT, 1, NULL

$ sudo strace -p 9776
Process 9776 attached - interrupt to quit
restart_syscall(<... resuming interrupted call ...>) = 0
open("/var/lib/dpkg/lock", O_RDWR|O_CREAT|O_TRUNC, 0660) = 0
fcntl64(0, F_GETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0, pid=9548}) 
= 0
close(0)                                = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
nanosleep({2, 0}, {2, 0})               = 0
open("/var/lib/dpkg/lock", O_RDWR|O_CREAT|O_TRUNC, 0660) = 0
fcntl64(0, F_GETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0, pid=9548}) 
= 0
close(0)                                = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
nanosleep({2, 0}, {2, 0})               = 0
open("/var/lib/dpkg/lock", O_RDWR|O_CREAT|O_TRUNC, 0660) = 0
fcntl64(0, F_GETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0, pid=9548}) 
= 0

Apparently the second one now waits on dpkg to unlock.

$ sudo lsof  /var/lib/dpkg/lock
COMMAND  PID USER   FD   TYPE DEVICE SIZE   NODE NAME
dpkg    9548 root    3uW  REG  253,1    0 217164 /var/lib/dpkg/lock

That is the parent dpkg that called the postinst!

This is very fishy indeed.

I do not have time to plunge in update-menus source right now. But I hope this
will give you some hints on where to look.

grts Tim

Ps. I just analyzed a case where the second did <defunct> the first instance
was still in the FUTEX_WAIT state, as expected.

Ps2. When I call the first instance of update-menus, AFAICS install-docs always 
prints 
  warning: error occured during execution of /usr/bin/update-menus at 
/usr/sbin/install-docs line 324.
That is around some code relating dwww, which I don't have installed, dunno if 
that helps



Attachment: signature.asc
Description: PGP signature

Reply via email to