hald loops forever

Dominik Epple dominik.epple at googlemail.com
Wed Mar 17 03:43:31 PDT 2010


Hi all,

under some special circumstances (see below) I find the following
behavior of hald. It loops infinitely, thus effectively halting the
boot process. Below I paste a section of the output of "strace -f -tt
-o /tmp/haldaemon.strace.out hald".

5910  11:24:19.237669 <... nanosleep resumed> {2, 0}) = 0
5910  11:24:19.237789 open("/dev/scd0", O_RDONLY|O_EXCL|O_NONBLOCK) = 4
5910  11:24:19.260256 ioctl(4, CDROM_DRIVE_STATUS, 0x7fffffff) = 2
5910  11:24:19.263073 close(4)          = 0
5910  11:24:19.264067 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
5910  11:24:19.264136 rt_sigaction(SIGCHLD, NULL, {SIG_DFL, [], 0}, 8) = 0
5910  11:24:19.264253 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
5910  11:24:19.264347 nanosleep({2, 0},  <unfinished ...>
5912  11:24:19.803661 <... nanosleep resumed> {2, 0}) = 0
5912  11:24:19.803777 open("/dev/sdc", O_RDONLY) = -1 ENOMEDIUM (No
medium found)
5912  11:24:19.815238 close(4294967295) = -1 EBADF (Bad file descriptor)
5912  11:24:19.815604 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
5912  11:24:19.815676 rt_sigaction(SIGCHLD, NULL, {SIG_DFL, [], 0}, 8) = 0
5912  11:24:19.815740 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
5912  11:24:19.815796 nanosleep({2, 0},  <unfinished ...>
5910  11:24:21.264674 <... nanosleep resumed> {2, 0}) = 0
5910  11:24:21.264795 open("/dev/scd0", O_RDONLY|O_EXCL|O_NONBLOCK) = 4
5910  11:24:21.287293 ioctl(4, CDROM_DRIVE_STATUS, 0x7fffffff) = 2
5910  11:24:21.290156 close(4)          = 0
5910  11:24:21.291157 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
5910  11:24:21.291262 rt_sigaction(SIGCHLD, NULL, {SIG_DFL, [], 0}, 8) = 0
5910  11:24:21.291400 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
5910  11:24:21.291600 nanosleep({2, 0},  <unfinished ...>
5912  11:24:21.816658 <... nanosleep resumed> {2, 0}) = 0
5912  11:24:21.816772 open("/dev/sdc", O_RDONLY) = -1 ENOMEDIUM (No
medium found)
5912  11:24:21.828300 close(4294967295) = -1 EBADF (Bad file descriptor)
5912  11:24:21.828604 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
5912  11:24:21.828726 rt_sigaction(SIGCHLD, NULL, {SIG_DFL, [], 0}, 8) = 0
5912  11:24:21.828804 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
5912  11:24:21.828876 nanosleep({2, 0},  <unfinished ...>
5910  11:24:23.292666 <... nanosleep resumed> {2, 0}) = 0
5910  11:24:23.292784 open("/dev/scd0", O_RDONLY|O_EXCL|O_NONBLOCK) = 4
5910  11:24:23.315292 ioctl(4, CDROM_DRIVE_STATUS, 0x7fffffff) = 2
5910  11:24:23.318234 close(4)          = 0
5910  11:24:23.319126 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
5910  11:24:23.319194 rt_sigaction(SIGCHLD, NULL, {SIG_DFL, [], 0}, 8) = 0
5910  11:24:23.319257 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
5910  11:24:23.319314 nanosleep({2, 0},  <unfinished ...>
5912  11:24:23.829663 <... nanosleep resumed> {2, 0}) = 0
5912  11:24:23.829778 open("/dev/sdc", O_RDONLY) = -1 ENOMEDIUM (No
medium found)
5912  11:24:23.841205 close(4294967295) = -1 EBADF (Bad file descriptor)
5912  11:24:23.841342 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
5912  11:24:23.841413 rt_sigaction(SIGCHLD, NULL, {SIG_DFL, [], 0}, 8) = 0
5912  11:24:23.841622 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
5912  11:24:23.841680 nanosleep({2, 0},  <unfinished ...>


The "special circumstances" are:

- The machine is configured as LDAP client
- The issue only occurs if I have no network connectivity. (This is
the reason why I want to investigate this: I want to solve the problem
that a machine hangs forever trying starting hald if the network is
unavailable during boot.)
- The machine is some server hardware where the the sdc and sdc0
devices are "virtual devices" (Virtual CDROM, Virtual Floppy) from the
management processor.

Why is hald looping forever? Whatever it does, why doesn't it give up
after some (say three) tries accessing the devices? Is there some
possibility to change this behavior?

Thanks
Dominik


More information about the hal mailing list