# dhcp server crashes after a while

## -leliel-

Hi,

my dhcp server crashes once or twice a day with the following message:

Nov  7 12:38:29 [kernel] grsec: signal 11 sent to (dhcpd:15836) UID(10009) EUID(10009), parent (init:1) UID(0) EUID(0)

there are also hundreds of messages like this in the syslog:

Nov  7 11:38:29 [dhcpd] Wrote 0 deleted host decls to leases file.

Nov  7 11:38:29 [dhcpd] Wrote 0 new dynamic host decls to leases file.

Nov  7 11:38:29 [dhcpd] Wrote 0 deleted host decls to leases file.

Nov  7 11:38:29 [dhcpd] Wrote 0 new dynamic host decls to leases file.

Nov  7 11:38:29 [dhcpd] Wrote 0 deleted host decls to leases file.

Nov  7 11:38:29 [dhcpd] Wrote 0 new dynamic host decls to leases file.

Nov  7 11:38:29 [dhcpd] Wrote 0 deleted host decls to leases file.

Nov  7 11:38:29 [dhcpd] Wrote 0 new dynamic host decls to leases file.

Nov  7 11:38:29 [dhcpd] Wrote 0 deleted host decls to leases file.

Nov  7 11:38:29 [dhcpd] Wrote 0 new dynamic host decls to leases file.

Nov  7 11:38:29 [dhcpd] Wrote 0 deleted host decls to leases file.

Nov  7 11:38:29 [dhcpd] Wrote 0 new dynamic host decls to leases file.

any idea what could happened to the server? worked fine last week and I've really changed nothing on the configs.

dhcpd --version is isc-dhcpd-V3.0pl2

thanks a lot

----------

## evanduser

This release runs as user dhcp, group dhcp.  If you upgraded from previous release the owner of /var/lib/dhcp needs to be set to chown dhcp.dhcp  :Smile: 

----------

## -leliel-

thanks, but that doesn't fix the problem.  :Sad: 

chmod is 770, user and group are dhcp, server itself is chroot'ed.

any ideas?

----------

## joehni

It's a known bug and fixed in the latest release.

https://bugs.gentoo.org/show_bug.cgi?id=31840

I just wonder, why they masked it ...

----------

## joehni

Grrr. They already removed the fixed version again, since they could not reproduce it after a remerge of -r2.

----------

## braindead0

Mine just seems to die after a bit, nothing odd in the logs that I can see.  If I try to restart, when stopping it reports !!

go figure

----------

## tam

I just have encountered the same problem:

```
root@serv4 ~ # dhcpd --verison

Internet Software Consortium DHCP Server V3.0pl2

```

After a while, dhcp server dies. It's very annoying, because I have ~50 samba users connected.

Any solution for this?

----------

## ke.batty

The workaround listed:

https://bugs.gentoo.org/attachment.cgi?id=20206&action=view

works for me, had 5 days up time so far

----------

## woodm

 *Quote:*   

> Mine just seems to die after a bit, nothing odd in the logs that I can see. If I try to restart, when stopping it reports !! 
> 
> go figure

 

Could this be from metalog caching it's output?  Just a guess.  There is a way to force it to dump and not cache, but I have NO experience with it.

For the record, I'm having a similar problem, but mine seems to be related to the leases renewing:

from /var/log/kernel/current:

```

Dec  7 22:51:44 [kernel] grsec: denied hardlink of /var/lib/dhcp/dhcpd.leases (owned by 0.0) to /var/lib/dhcp/dhcpd.leases~ for (dhcpd:17813) UID(1005) EUID(100 

5), parent (init:1) UID(0) EUID(0) 

Dec  7 22:52:08 [kernel] grsec: attempted resource overstep by requesting 8388608 for RLIMIT_STACK against limit 8388608 by (dhcpd:17813) UID(1005) EUID(1005),  parent (init:1) UID(0) EUID(0) 

Dec  7 22:52:08 [kernel] grsec: attempted resource overstep by requesting 8392704 for RLIMIT_STACK against limit 8388608 by (dhcpd:17813) UID(1005) EUID(1005),  parent (init:1) UID(0) EUID(0)

```

----------

## Petyr

I'm having the exact same problem it seems, the wierd thing is my dhcp.leases file was owned by dhcp:dhcp the entire time, though I had to force the leases file to be owned by dhcp the first time around. I dunno, the damn thing just silently exits and/or crashes.

Petyr

----------

## ARC2300

Doing the fix listed makes it stay up.

Or, if you're too lazy to write a new line, just go to /etc/init.d/dhcp and delete where it says "-user dhcp -group dhcp" and it should work just fine.

----------

## HoGiHung

I'm having a bit of a time getting it to work also.  I've downloaded the new dhcp script as posted above.  Below is a snipet from my syslog:

Dec 23 11:04:18 kiragentoo dhcpd: For info, please visit http://www.isc.org/products/DHCP

Dec 23 11:04:18 kiragentoo dhcpd: Wrote 0 leases to leases file.

Dec 23 11:04:18 kiragentoo dhcpd: socket: Protocol not available - make sure

Dec 23 11:04:18 kiragentoo dhcpd: CONFIG_PACKET (Packet socket) and CONFIG_FILTER

Dec 23 11:04:18 kiragentoo dhcpd: (Socket Filtering) are enabled in your kernel

Dec 23 11:04:18 kiragentoo dhcpd: configuration!

Dec 23 11:04:18 kiragentoo dhcpd: 

Anyone able to assist?

Ho...

----------

## Psi15

similar problem over here...

for testing puposes I had the dhcpcd server running for a while with the -d option, and after several hours it crashes with a 'segmentation fault' error - no interesting log entries at all, only debug output...

will try the workaround tonight - maybe it's getting better  :Smile: 

----------

