* Bill Allombert <[email protected]> [20090323 18:27]: > On Mon, Mar 23, 2009 at 04:32:20PM +0100, Michael Prokop wrote:
> > Using automatic installation via FAI I see a hanging "update-menus
> > --trigger" call causing the build to fail:
> > root 22433 0.0 0.2 2696 1312 pts/0 S+ 14:57 0:00 /bin/sh
> > /var/lib/dpkg/info/menu.postinst triggered /usr/share/menu
> > root 22434 97.6 0.2 3144 1236 pts/0 R+ 14:57 2:24
> > update-menus --trigger
> > strace-ing the PID outside the chroot gives me tons of EBADF which
> > might be the reason for the 100% cpu load and the hanging process:
> > [...]
> > read(4293087900, 0xf7f18000, 8192) = -1 EBADF (Bad file descriptor)
> > read(4293087900, 0xf7f18000, 8192) = -1 EBADF (Bad file descriptor)
> > read(4293087900, 0xf7f18000, 8192) = -1 EBADF (Bad file descriptor)
> > read(4293087900, 0xf7f18000, 8192) = -1 EBADF (Bad file descriptor)
> > [...]
> > Killing the update-menus process and manually invoking update-menus
> > inside the chroot displays:
> > # update-menus -v
> > update-menus[12725]: Dpkg is not locking dpkg status area, good.
> > update-menus[12725]: Reading installed packages list...
> > acpi-support
> > acpi-support-base
> > acpid
> > adduser
> > [...]
> > -> it displays the whole package list and then it just hangs (same
> > problem as running via FAI).
> This is interesting because 'update-menus -v' should not display the
> package list.
Yeah, that's what I'm used to. :)
> So there seems to be a problem with the call to dpkg-query:
> string inst_states="installed\\|triggers-awaited\\|triggers-pending";
> string pkgs = "dpkg-query --show --showformat=\"\\${status} \\${provides}
> \\${package}\\n\" | sed -n -e \"/" + inst_states
> + " /{s/^.*\\("+inst_states+"\\) *//; s/[, ][, ]*/\\n/g; p}\"";
> pkgs = "exec /bin/bash -o pipefail -c '" + pkgs + "'";
> FILE *status = popen(pkgs.c_str(), "r");
> > Funnily it works when invoked through strace:
> > # strace -o /tmp/log -ffff update-menus -v
> > update-menus[11649]: Dpkg is not locking dpkg status area, good.
> > update-menus[11649]: Reading installed packages list...
> > update-menus[11649]: Reading translation rules in
> > /etc/menu-methods/translate_menus.
> > update-menus[11649]: Reading menu-entry files in /etc/menu/.
> > update-menus[11649]: 0 menu entries found (0 total).
> > update-menus[11649]: Reading menu-entry files in /usr/lib/menu/.
> > update-menus[11649]: 0 menu entries found (0 total).
> > update-menus[11649]: Reading menu-entry files in /usr/share/menu/.
> > update-menus[11649]: 38 menu entries found (38 total).
> > update-menus[11649]: Reading menu-entry files in /usr/share/menu/default/.
> > update-menus[11649]: 0 menu entries found (38 total).
> > update-menus[11649]: Running menu-methods in /etc/menu-methods/.
> > update-menus[11649]: Running method: /etc/menu-methods/fluxbox
> > #
> > Do you have any idea what's going on here?
> I wonder if your system somehow set signal handling to non-default
> value and that interfer with update-menus.
Basically a kvm system with Debian's defaults. Used to work just
fine until a few days ago.
> Maybe this bug is related to bug 511698 (in experimental).
Ah ok.
> > Please let me know if you need any further information, I've a
> > chroot available where I can easily reproduce/work on the problem.
> 1) does 'update-menus --stdout' work ?
No, hanging as well.
> 2) does 'update-menus --stdout | install-menu -v /etc/menu-methods/fluxbox'
No, hanging too. Output:
# update-menus --stdout | install-menu -v /etc/menu-methods/fluxbox
install-menu: [supported]: name=X11
install-menu: [supported]: name=WM
install-menu: [supported]: name=TEXT
install-menu: [supported]: name=FLUXBOX
Unknown error, message=section
install-menu: /etc/menu-methods/fluxbox: aborting
-> then it hangs. No idea what's the "Unknown error,
message=section" though - might this be a configuration problem?
> 3) what file do you have in /etc/menu-methods ?
# ls -la /etc/menu-methods
total 32
drwxr-xr-x 2 root root 4096 2009-03-23 16:08 ./
drwxr-xr-x 88 root root 4096 2009-03-23 16:22 ../
-rwxr-xr-x 1 root root 1176 2009-03-18 21:06 fluxbox*
-rw-r--r-- 1 root root 254 2008-10-24 23:13 lang.h
-rw-r--r-- 1 root root 31 2005-09-11 21:42 menu.config
-rw-r--r-- 1 root root 2910 2007-10-12 09:22 menu.h
-rw-r--r-- 1 root root 391 2005-09-11 23:14 README
-rw-r--r-- 1 root root 2232 2008-02-29 19:15 translate_menus
# dpkg -S /etc/menu-methods/*
fluxbox: /etc/menu-methods/fluxbox
menu: /etc/menu-methods/lang.h
menu: /etc/menu-methods/menu.config
menu: /etc/menu-methods/menu.h
menu: /etc/menu-methods/README
menu: /etc/menu-methods/translate_menus
Removing the fluxbox package doesn't seem to change anything.
Would it help if I'd provide you the affected chroot as tar.gz?
thx && regards,
-mika-
signature.asc
Description: Digital signature

