DHCPD Crashes Unless Lease Database is Blank

Dustin C. Hatch admiralnemo at gmail.com
Thu Nov 7 00:22:38 UTC 2013


Hello!

I'm experiencing a rather strange problem with my installation of
DHCPD on my Mirabox[1]. It seems that if there are any leases recorded
in the database, the daemon starts up correctly, but immediately exits
without error. If I run it in the foreground, however, it runs just
fine. I have tried starting the daemon manually from the command line,
as well as through the service manager (OpenRC). I am running a
Gentoo-based system, cross-compiled using a crossdev[2]-generated
toolchain for armv7a-hardfloat-linux-gnueabi. The kernel is mainline
3.11.6. I am not running SELinux or anything else fancy.

I think the best way to describe the situation is to paste a shell 
transcript:

hamal ~ # pgrep -fa dhcpd
4582 /usr/sbin/dhcpd -tf /tmp/dhcpd.trace -cf /etc/dhcp/dhcpd.conf -q
-pf /var/run/dhcp/dhcpd.pid -lf /var/lib/dhcp/dhcpd.leases -user dhcp
-group dhcp eth1
hamal ~ # rc-service dhcpd stop
  * Stopping dhcpd ...
              [ ok ]
hamal ~ # pgrep -fa dhcpd
hamal ~ # rc-service dhcpd start
  * Starting dhcpd ...
              [ ok ]
hamal ~ # pgrep -fa dhcpd
hamal ~ # rc-service dhcpd stop
  * Stopping dhcpd ...
  * start-stop-daemon: no matching processes found
              [ ok ]
hamal ~ # /usr/sbin/dhcpd -tf /tmp/dhcpd.trace -cf
/etc/dhcp/dhcpd.conf -pf /var/run/dhcp/dhcpd.pid -lf
/var/lib/dhcp/dhcpd.leases -user dhcp -group dhcp eth1
Internet Systems Consortium DHCP Server 4.2.5-P1 Gentoo-r0
Copyright 2004-2013 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
WARNING: Overwriting trace file "/tmp/dhcpd.trace"
Wrote 0 deleted host decls to leases file.
Wrote 0 new dynamic host decls to leases file.
Wrote 7 leases to leases file.
Listening on LPF/eth1/f0:ad:4e:01:e3:4c/172.31.0.0/27
Sending on   LPF/eth1/f0:ad:4e:01:e3:4c/172.31.0.0/27
Sending on   Socket/fallback/fallback-net
hamal ~ # pgrep -fa dhcpd
hamal ~ # cp -a /var/lib/dhcp/dhcpd.leases{,.bak}
hamal ~ # > /var/lib/dhcp/dhcpd.leases
hamal ~ # /usr/sbin/dhcpd -tf /tmp/dhcpd.trace -cf
/etc/dhcp/dhcpd.conf -pf /var/run/dhcp/dhcpd.pid -lf
/var/lib/dhcp/dhcpd.leases -user dhcp -group dhcp eth1
Internet Systems Consortium DHCP Server 4.2.5-P1 Gentoo-r0
Copyright 2004-2013 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
WARNING: Overwriting trace file "/tmp/dhcpd.trace"
Wrote 0 deleted host decls to leases file.
Wrote 0 new dynamic host decls to leases file.
Wrote 0 leases to leases file.
Listening on LPF/eth1/f0:ad:4e:01:e3:4c/172.31.0.0/27
Sending on   LPF/eth1/f0:ad:4e:01:e3:4c/172.31.0.0/27
Sending on   Socket/fallback/fallback-net
hamal ~ # pgrep -fa dhcpd
4665 /usr/sbin/dhcpd -tf /tmp/dhcpd.trace -cf /etc/dhcp/dhcpd.conf -pf
/var/run/dhcp/dhcpd.pid -lf /var/lib/dhcp/dhcpd.leases -user dhcp
-group dhcp eth1

I have attached two trace files, one from a failed startup (.bad) and
one from a successful startup (.good). I have also attached a copy of
my leases file and my dhcpd.conf. Please let me know if I can provide
any additional information.

If anyone has any ideas about how I can troubleshoot this problem
further, please let me know. Thanks in advance.

[1] http://www.globalscaletechnologies.com/p-58-mirabox-development-kit.aspx
[2] http://www.gentoo.org/proj/en/base/embedded/cross-development.xml

Regards,

Dustin C. Hatch
http://dustin.hatch.name/

-------------- next part --------------
# vim: set ft=dhcpd :

option domain-name "pyrocufflink.jazz";
option domain-name-servers 172.31.0.10;

authoritative;

ddns-updates on;
ddns-update-style interim;
update-static-leases on;
ignore client-updates;

subnet 172.31.0.0 netmask 255.255.255.224 {
    range 172.31.0.2 172.31.0.30;
    default-lease-time 43200;
    max-lease-time 86400;
    option routers 172.31.0.1;

    #on commit {
    #    set thehostname = pick-first-value(option host-name, host-decl-name, config-option host-name);
    #    set thedomain = pick-first-value(option domain-name, config-option domain-name);
    #    set fqdn = concat(thehostname, ".", thedomain);
    #    set ipaddr = binary-to-ascii(10, 8, ".", leased-address);
    #    execute("/usr/local/bin/dhcpddns-update", fqdn, ipaddr);
    #}
}

zone pyrocufflink.jazz. {
    primary 172.31.0.10;
}

zone 0.31.172.in-addr.arpa. {
    primary 172.31.0.10;
}

host arcturus {
    hardware ethernet 52:54:00:bc:0f:0d;
    fixed-address 172.31.0.6;
}

host atria {
    hardware ethernet bc:ae:c5:de:f4:bc;
    fixed-address 172.31.0.7;
}

host bellatrix {
    host-identifier option dhcp-client-identifier 00:01:00:01:18:96:6b:46:52:54:00:f3:0e:c7;
    fixed-address 172.31.0.11;
}

host bellatrix2 {
    host-identifier option dhcp-client-identifier 00:01:00:01:18:96:6b:58:52:54:00:f3:0e:c7;
    fixed-address 172.31.0.12;
}

host rigel {
    hardware ethernet 52:54:00:45:16:37;
    fixed-address 172.31.0.9;
}
-------------- next part --------------
# The format of this file is documented in the dhcpd.leases(5) manual page.
# This lease file was written by isc-dhcp-4.2.5-P1 Gentoo-r0

lease 172.31.0.13 {
  starts 3 2013/11/06 23:52:05;
  ends 4 2013/11/07 11:52:05;
  tstp 4 2013/11/07 11:52:05;
  cltt 3 2013/11/06 23:52:05;
  binding state active;
  next binding state free;
  rewind binding state free;
  hardware ethernet 00:0c:29:0d:f5:eb;
  uid "\377eth0\000\001\000\001\031\2347U\000\014)\015\365\353";
  set ddns-fwd-name = "scorpius-x1.pyrocufflink.jazz";
  set ddns-txt = "312cc604f0d94d64568f1090f35a9c18f6";
  set ddns-rev-name = "13.0.31.172.in-addr.arpa.";
  client-hostname "scorpius-x1";
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dhcpd.trace.bad.xz
Type: application/x-xz
Size: 1516 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20131106/15ad7142/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dhcpd.trace.good.xz
Type: application/x-xz
Size: 884 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20131106/15ad7142/attachment-0001.bin>


More information about the dhcp-users mailing list