isc-dhcp-server crashing constantly [Ubuntu 20.04]

Bug #1872106 reported by mm
68
This bug affects 12 people
Affects Status Importance Assigned to Milestone
isc-dhcp (Ubuntu)
Confirmed
Undecided
Unassigned
Focal
Confirmed
Undecided
Unassigned

Bug Description

isc-dhcp-server crashing constantly (sometimes within seconds or minutes, sometimes within hours) with the following error messages:
Apr 10 17:45:25 xxx dhcpd[140823]: Server starting service.
Apr 10 17:45:25 xxx sh[140823]: ../../../../lib/isc/unix/socket.c:3361: INSIST(!sock->pending_send) failed, back trace
Apr 10 17:45:25 xxx sh[140823]: #0 0x7f3362f59a4a in ??
Apr 10 17:45:25 xxx sh[140823]: #1 0x7f3362f59980 in ??
Apr 10 17:45:25 xxx sh[140823]: #2 0x7f3362f957e1 in ??
Apr 10 17:45:25 xxx sh[140823]: #3 0x7f3362d3c609 in ??
Apr 10 17:45:25 xxx sh[140823]: #4 0x7f3362e78103 in ??
Apr 10 17:45:25 xxx systemd[1]: isc-dhcp-server.service: Main process exited, code=killed, status=6/ABRT
Apr 10 17:45:25 xxx systemd[1]: isc-dhcp-server.service: Failed with result 'signal'.

Revision history for this message
Andrew Welham (andreww-ubuntu) wrote :
Download full text (3.5 KiB)

I have some thing similar

I have a pair of DHCP serevrs running in a cluster on ubuntu 20.04, All worked perfectly until recently, when they started stopping with code=killed, status=6/ABRT.
This is being fixed by

https://bugs.launchpad.net/bugs/1870729

However now one stops after a few hours with the following errors. One can stay on line but not both.

Syslog shows
Apr 10 17:20:15 dhcp-primary sh[6828]: ../../../../lib/isc/unix/socket.c:3361: INSIST(!sock->pending_send) failed, back trace
Apr 10 17:20:15 dhcp-primary sh[6828]: #0 0x7fbe78702a4a in ??
Apr 10 17:20:15 dhcp-primary sh[6828]: #1 0x7fbe78702980 in ??
Apr 10 17:20:15 dhcp-primary sh[6828]: #2 0x7fbe7873e7e1 in ??
Apr 10 17:20:15 dhcp-primary sh[6828]: #3 0x7fbe784e5609 in ??
Apr 10 17:20:15 dhcp-primary sh[6828]: #4 0x7fbe78621103 in ??

nothing in kern.log

apport.log shows
ERROR: apport (pid 6850) Fri Apr 10 17:20:15 2020: called for pid 6828, signal 6, core limit 0, dump mode 2
ERROR: apport (pid 6850) Fri Apr 10 17:20:15 2020: not creating core for pid with dump mode of 2
ERROR: apport (pid 6850) Fri Apr 10 17:20:15 2020: executable: /usr/sbin/dhcpd (command line "dhcpd -user dhcpd -group dhcpd -f -4 -pf /run/dhcp-server/dhcpd.pid -cf /etc/dhcp/dhcpd.conf")
ERROR: apport (pid 6850) Fri Apr 10 17:20:15 2020: is_closing_session(): no DBUS_SESSION_BUS_ADDRESS in environment
ERROR: apport (pid 6850) Fri Apr 10 17:20:15 2020: wrote report /var/crash/_usr_sbin_dhcpd.0.crash

/var/crash/_usr_sbin_dhcpd.0.crash shows

ProblemType: Crash
Architecture: amd64
CrashCounter: 1
Date: Fri Apr 10 17:20:15 2020
DistroRelease: Ubuntu 20.04
ExecutablePath: /usr/sbin/dhcpd
ExecutableTimestamp: 1586210315
ProcCmdline: dhcpd -user dhcpd -group dhcpd -f -4 -pf /run/dhcp-server/dhcpd.pid -cf /etc/dhcp/dhcpd.conf
ProcEnviron: Error: [Errno 13] Permission denied: 'environ'
ProcMaps: Error: [Errno 13] Permission denied: 'maps'
ProcStatus:
 Name: dhcpd
 Umask: 0022
 State: D (disk sleep)
 Tgid: 6828
 Ngid: 0
 Pid: 6828
 PPid: 1
 TracerPid: 0
 Uid: 113 113 113 113
 Gid: 118 118 118 118
 FDSize: 128
 Groups:
 NStgid: 6828
 NSpid: 6828
 NSpgid: 6828
 NSsid: 6828
 VmPeak: 236244 kB
 VmSize: 170764 kB
 VmLck: 0 kB
 VmPin: 0 kB
 VmHWM: 12064 kB
 VmRSS: 12064 kB
 RssAnon: 5940 kB
 RssFile: 6124 kB
 RssShmem: 0 kB
 VmData: 30792 kB
 VmStk: 132 kB
 VmExe: 592 kB
 VmLib: 5424 kB
 VmPTE: 76 kB
 VmSwap: 0 kB
 HugetlbPages: 0 kB
 CoreDumping: 1
 THP_enabled: 1
 Threads: 4
 SigQ: 0/7609
 SigPnd: 0000000000000000
 ShdPnd: 0000000000000000
 SigBlk: 0000000000000000
 SigIgn: 0000000000001000
 SigCgt: 0000000180000000
 CapInh: 0000000000000000
 CapPrm: 0000000000000000
 CapEff: 0000000000000000
 CapBnd: 0000003fffffffff
 CapAmb: 0000000000000000
 NoNewPrivs: 0
 Seccomp: 0
 Speculation_Store_Bypass: thread vulnerable
 Cpus_allowed: 3
 Cpus_allowed_list: 0-1
 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,0000000...

Read more...

Changed in isc-dhcp (Ubuntu):
status: New → Confirmed
Revision history for this message
Andrew Welham (andreww-ubuntu) wrote :

please ignore this is fixed by https://bugs.launchpad.net/bugs/1870729, but then the above happens

Revision history for this message
mm (mtl-0) wrote :

New error log:
Apr 10 22:11:47 xxx dhcpd[3765]: Server starting service.
Apr 10 22:11:47 xxx dhcpd[3765]: failover peer dhcp-failover: peer moves from normal to communications-interrupted
Apr 10 22:11:47 xxx dhcpd[3765]: failover peer dhcp-failover: I move from startup to normal
Apr 10 22:11:47 xxx dhcpd[3765]: balancing pool 561b77e547d0 192.168.1.0/24 total 60 free 27 backup 33 lts 3 max-own (+/-)6
Apr 10 22:11:47 xxx dhcpd[3765]: balanced pool 561b77e547d0 192.168.1.0/24 total 60 free 27 backup 33 lts 3 max-misbal 9
Apr 10 22:11:47 xxx dhcpd[3765]: failover peer dhcp-failover: peer moves from communications-interrupted to normal
Apr 10 22:11:47 xxx dhcpd[3765]: failover peer dhcp-failover: Both servers normal
Apr 10 22:11:47 xxx sh[3765]: ../../../../lib/isc/unix/socket.c:4359: fatal error: select() failed: Bad file descriptor
Apr 10 22:11:47 xxx systemd[1]: isc-dhcp-server.service: Main process exited, code=killed, status=6/ABRT
Apr 10 22:11:47 xxx systemd[1]: isc-dhcp-server.service: Failed with result 'signal'.

Revision history for this message
Andrew Welham (andreww-ubuntu) wrote :

mm, see you have got tot he same stage as me after the changes removing the rw to the some directories

Revision history for this message
mm (mtl-0) wrote :

It seems to be still an apparmor problem:
[1863665.820588] audit: type=1400 audit(1588413129.073:171): apparmor="DENIED" operation="open" profile="/usr/sbin/dhcpd" name="/proc/sys/net/ipv4/ip_local_port_range" pid=38217 comm="dhcpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[1863665.820937] audit: type=1400 audit(1588413129.073:172): apparmor="DENIED" operation="open" profile="/usr/sbin/dhcpd" name="/proc/sys/net/ipv4/ip_local_port_range" pid=38217 comm="dhcpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[1863667.962021] audit: type=1400 audit(1588413131.217:173): apparmor="DENIED" operation="open" profile="/usr/sbin/dhcpd" name="/proc/sys/net/ipv4/ip_local_port_range" pid=38245 comm="dhcpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[1863667.962161] audit: type=1400 audit(1588413131.217:174): apparmor="DENIED" operation="open" profile="/usr/sbin/dhcpd" name="/proc/sys/net/ipv4/ip_local_port_range" pid=38245 comm="dhcpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[1863733.906438] audit: type=1400 audit(1588413197.163:175): apparmor="DENIED" operation="open" profile="/usr/sbin/dhcpd" name="/proc/sys/net/ipv4/ip_local_port_range" pid=38952 comm="dhcpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[1863733.906772] audit: type=1400 audit(1588413197.163:176): apparmor="DENIED" operation="open" profile="/usr/sbin/dhcpd" name="/proc/sys/net/ipv4/ip_local_port_range" pid=38952 comm="dhcpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[1863736.056880] audit: type=1400 audit(1588413199.315:177): apparmor="DENIED" operation="open" profile="/usr/sbin/dhcpd" name="/proc/sys/net/ipv4/ip_local_port_range" pid=38972 comm="dhcpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[1863736.057187] audit: type=1400 audit(1588413199.315:178): apparmor="DENIED" operation="open" profile="/usr/sbin/dhcpd" name="/proc/sys/net/ipv4/ip_local_port_range" pid=38972 comm="dhcpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0

Revision history for this message
mm (mtl-0) wrote :

My system is up to date with the newest package versions.

affects: isc-dhcp (Ubuntu) → apparmor (Ubuntu)
Revision history for this message
mm (mtl-0) wrote :

After disabling apparmor, the dhcp server keeps crashing ...

affects: apparmor (Ubuntu) → isc-dhcp (Ubuntu)
Revision history for this message
Valdemar Lemche (atterdag) wrote :
Download full text (16.9 KiB)

I have the same issue with Ubuntu 20.04 on arm64 (RaspberryPi 4 B). I have even tried to uninstall the apparmor* packages to ensure that its not an apparmor issue.

Primary DHCP configuration:
root@dexter:~# grep -E -v "^#|^$" /etc/dhcp/dhcpd-common.conf
ddns-update-style none;
option all-subnets-local true;
option domain-name "se.lemche.net";
option domain-name-servers 192.168.1.3, 192.168.1.4;
default-lease-time 600;
max-lease-time 7200;
authoritative;
subnet 192.168.1.0 netmask 255.255.255.0 {
  option subnet-mask 255.255.255.0;
  option routers 192.168.1.254;
  option domain-name "pc.se.lemche.net";
  option domain-search "pc.se.lemche.net","se.lemche.net","lemche.net";
  pool {
    failover peer "dhcp-failover";
    range 192.168.1.94 192.168.1.126;
  }
}
root@dexter:~# grep -E -v "^#|^$" /etc/dhcp/dhcpd.conf
server-name "dexter";
failover peer "dhcp-failover" {
  primary;
  address 192.168.1.3;
  port 520;
  peer address 192.168.1.4;
  peer port 520;
  max-response-delay 60;
  max-unacked-updates 10;
  load balance max seconds 3;
  mclt 3600;
  split 128;
}
include "/etc/dhcp/dhcpd-common.conf";
root@dexter:~# grep -E -v "^#|^$" /etc/default/isc-dhcp-server
OPTIONS="-4"
INTERFACESv4="inside"
INTERFACESv6=""
root@dexter:~# dpkg -l isc-dhcp-server
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-===============-================-============-===================================================
ii isc-dhcp-server 4.4.1-2.1ubuntu5 arm64 ISC DHCP server for automatic IP address assignment
root@dexter:~#

Secondary DHCP configuration:
root@didi:~# grep -E -v "^#|^$" /etc/dhcp/dhcpd-common.conf
ddns-update-style none;
option all-subnets-local true;
option domain-name "se.lemche.net";
option domain-name-servers 192.168.1.3, 192.168.1.4;
default-lease-time 600;
max-lease-time 7200;
authoritative;
subnet 192.168.1.0 netmask 255.255.255.0 {
  option subnet-mask 255.255.255.0;
  option routers 192.168.1.254;
  option domain-name "pc.se.lemche.net";
  option domain-search "pc.se.lemche.net","se.lemche.net","lemche.net";
  pool {
    failover peer "dhcp-failover";
    range 192.168.1.94 192.168.1.126;
  }
}
root@didi:~# grep -E -v "^#|^$" /etc/dhcp/dhcpd.conf
server-name "didi";
failover peer "dhcp-failover" {
  secondary;
  address 192.168.1.4;
  port 520;
  peer address 192.168.1.3;
  peer port 520;
  max-response-delay 60;
  max-unacked-updates 10;
  load balance max seconds 3;
}
include "/etc/dhcp/dhcpd-common.conf";
root@didi:~# grep -E -v "^#|^$" /etc/default/isc-dhcp-server
OPTIONS="-4"
INTERFACESv4="inside"
INTERFACESv6=""
root@didi:~# dpkg -l isc-dhcp-server
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-===============-================-============-===================================================
ii isc-dhcp-server 4.4.1-2.1ubuntu5 arm64 ...

Revision history for this message
mm (mtl-0) wrote :

My current workaround: downgrade isc-dhcp-server to 18.04 package version.

Revision history for this message
protofik (protofik) wrote :

Happens to me as well. Running Ubuntu 20.04 with package isc-dhcp-server 4.4.1-2.1ubuntu5 I am trying to setup failover pair between RaspberryPi4 and Hyper-V VM. Restarting service on both servers at the same time will cause one of them to fail.

Revision history for this message
Michael-250 (michael-250) wrote :

I'm also trying to get isc-dhcp-server running on ubuntu 20.04 with dhcp-failover. I'm using a rpi 3b+ and a kvm vm for failover. Both were running fine with raspbian (rpi) and debian 9 (kvm vm). Now both are running ubuntu 20.04 and isc-dhcp-server will constantly fail (same error as mentioned in previous comments).

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

@mm - that probably isn't the issue, but you can adjust /etc/apparmor.d/local/usr.sbin.dhcpd to have:

@{PROC}/sys/net/ipv4/ip_local_port_range r,

and then do: sudo apparmor_parser -r /etc/apparmor.d/usr.sbin.dhcpd # yes, without local/

tags: added: focal rls-ff-incoming
tags: removed: rls-ff-incoming
tags: added: id-5f47d293daee608106fb4eb5
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in isc-dhcp (Ubuntu Focal):
status: New → Confirmed
tags: added: fr-204
Revision history for this message
Brian Murray (brian-murray) wrote :

This looks like a duplicate of bug 1872118 which is purportedly fixed with a change to bind9-libs. However, I don't see the relationship between bind9-libs and isc-dhcp. Regardless, it might be worth trying to install bind9-libs and see if that resolves the issue.

Revision history for this message
Brian Murray (brian-murray) wrote :

Actually, please make sure that you the following package installed.

(focal-amd64)root@impulse:~/bind9-libs-9.11.16+dfsg# apt-cache policy libisc-export1105
libisc-export1105:
  Installed: 1:9.11.16+dfsg-3~ubuntu1
  Candidate: 1:9.11.16+dfsg-3~ubuntu1
  Version table:
 *** 1:9.11.16+dfsg-3~ubuntu1 500
        500 http://192.168.10.7/ubuntu focal-updates/main amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Karsten (kfromberlin) wrote :

Re #14 and #15:

I have installed both of the mentioned packages. But I also suffer from the crashing behaviour.

Revision history for this message
Jorge Niedbalski (niedbalski) wrote :

Hello Karsten,

Can you check comments https://bugs.launchpad.net/dhcp/+bug/1872118/comments/62
 and https://bugs.launchpad.net/dhcp/+bug/1872118/comments/63 and validate the versions?

* Also, could be possible to upload the crash report here? and the output of dpkg -l

Thanks,

Jorge

Revision history for this message
Karsten (kfromberlin) wrote :

Hi Jorge.

How to get a crash report? I simply start the service and it dies after some seconds. Nothing in the dhcpd log is indicating a crash. The process is simply gone.

The systemctl status reports:

Nov 05 12:11:14 athena dhcpd[3688630]: Server starting service.
Nov 05 12:11:18 athena dhcpd[3688630]: failover peer failover-partner: peer moves from normal to communications-interrupted
Nov 05 12:11:18 athena dhcpd[3688630]: failover peer failover-partner: I move from startup to normal
Nov 05 12:11:18 athena dhcpd[3688630]: balancing pool 55c4365037d0 ecobln.de total 385 free 149 backup 224 lts 37 max-own (+/-)37
Nov 05 12:11:18 athena dhcpd[3688630]: balanced pool 55c4365037d0 ecobln.de total 385 free 149 backup 224 lts 37 max-misbal 56
Nov 05 12:11:18 athena dhcpd[3688630]: failover peer failover-partner: peer moves from communications-interrupted to normal
Nov 05 12:11:18 athena dhcpd[3688630]: failover peer failover-partner: Both servers normal
Nov 05 12:12:19 athena sh[3688630]: ../../../../lib/isc/unix/socket.c:4359: fatal error: select() failed: Bad file descriptor
Nov 05 12:12:19 athena systemd[1]: isc-dhcp-server.service: Main process exited, code=killed, status=6/ABRT
Nov 05 12:12:19 athena systemd[1]: isc-dhcp-server.service: Failed with result 'signal'.

I attached the dpkg-output.

Best

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.