About a year ago I had a problem with udev crashing during startup on
my powerpc box. Somehow I managed to muddle on with this problem,
probably by not rebooting the box. 🙂 Last summer I had to reoot it
again so I did a bit more research and discovered that udev was trying
to looking up the nvram group, not finding it in /etc/group and then
trying ldap, which, of course, failed because we have no networking yet.
Adding the group fixed the bug and filed a bug
against udev saying that udev should add any groups it used. Carrying
out further debugging revealed that the crash was during nss_wins. The
general order of events were:
- udev looks up a user or group.
- Group doesn’t exist in compat.
- Lookup in ldap.
- Ldap attempts to resolve the name of the ldap server or client.
(server is 127.0.0.1 so confused about this point.) - Network and/or dns server isn’t up so dns fails fails.
- Attempts to look up host in wins.
- udevstart crashes.
I didn’t have time to debug this any further and proceeded to forget
the problem, but last night my fileserver started having the same
problem. Removing ldap from passwd, group and shadow resolved the udev
problem, but then I didn’t have any users. Late last night I booted
without ldap and then changed nsswitch.conf to add ldap, and went to
bed.
This morning I had an epiphany in the shower. Not only did I remember
what the bug was, but also a sensible workaround. The problem wasn’t
with the passwd et al lines, but the hosts line. I did have
hosts: files dns mdns wins
The solution is to return if dns isn’t available and changed the line
to:
hosts: files dns [UNAVAIL=return] mdns wins
Now all I need to do is to debug nss_wins and get to the bottom of
the crash. It might be worth filing a bug against nss_ldap for trying to
do a lookup against an ip address.