[Dnsmasq-discuss] dnsmasq and zombies
Gerrit Kühn
gerrit at pmp.uni-hannover.de
Mon Jul 2 16:01:21 BST 2007
On Mon, 02 Jul 2007 14:10:02 +0100 Simon Kelley <simon at thekelleys.org.uk>
wrote about Re: [Dnsmasq-discuss] dnsmasq and zombies:
SK> > Yes, that did the trick. Without
SK> > # dhcp-script=/bin/echo
SK> > in the configuration file, even v2.38 doesn't create zombies. Thanks
SK> > for the hint. However, should this happen?
SK> No, it shouldn't. Dnsmasq should be collecting exit codes from its dead
SK> children and does so fine in most circumstances.
SK> If your script is just /bin/echo then quite possibly something strange
SK> is going on with the child-process code.
SK> Are you in a position to do some serious debugging on this (like maybe,
SK> running dnsmasq under truss, to see waht syscalls it makes?)
Hm, I think I can do anything you are able to explain to me. ;-)
Does this help you?
theq# truss /usr/local/sbin/dnsmasq
mmap(0x0,3616,(0x3)PROT_READ|PROT_WRITE,(0x1000)MAP_ANON,-1,0x0) =
671645696 (0x
28088000)
munmap(0x28088000,0xe20) = 0 (0x0)
__sysctl(0xbfbfea08,0x2,0x28084ab8,0xbfbfea04,0x0,0x0) = 0 (0x0)
mmap(0x0,32768,(0x3)PROT_READ|PROT_WRITE,(0x1002)MAP_ANON|
MAP_PRIVATE,-1,0x0) = 671645696 (0x28088000)
issetugid() = 0 (0x0)
open("/etc/libmap.conf",0x0,0666) ERR#2 'No such file or directory'
open("/var/run/ld-elf.so.hints",0x0,00) = 3 (0x3)
read(0x3,0xbfbfe9a0,0x80) = 128 (0x80)
lseek(3,0x80,SEEK_SET) = 128 (0x80)
read(0x3,0x2808a100,0xf1) = 241 (0xf1)
close(3) = 0 (0x0)
access("/lib/libc.so.6",0) = 0 (0x0)
open("/lib/libc.so.6",0x0,00) = 3 (0x3)
fstat(3,0xbfbfe9f0) = 0 (0x0)
read(0x3,0x28083a00,0x1000) = 4096 (0x1000)
mmap(0x0,946176,(0x5)PROT_READ|PROT_EXEC,(0x20002)MAP_NOCORE|
MAP_PRIVATE,3,0x0) = 671678464 (0x28090000)
mprotect(0x2815e000,4096,(0x7)PROT_READ|PROT_WRITE|PROT_EXEC) = 0 (0x0)
mprotect(0x2815e000,4096,(0x5)PROT_READ|PROT_EXEC) = 0 (0x0)
mmap(0x2815f000,20480,(0x3)PROT_READ|PROT_WRITE,(0x12)MAP_FIXED|
MAP_PRIVATE,3,0x cf000) = 672526336 (0x2815f000)
mmap(0x28164000,77824,(0x3)PROT_READ|PROT_WRITE,(0x1012)MAP_ANON|MAP_FIXED|
MAP_P RIVATE,-1,0x0) = 672546816 (0x28164000)
close(3) = 0 (0x0)
sysarch(0xa,0xbfbfea70) = 0 (0x0)
mmap(0x0,1056,(0x3)PROT_READ|PROT_WRITE,(0x1000)MAP_ANON,-1,0x0) =
672624640 (0x
28177000)
munmap(0x28177000,0x420) = 0 (0x0)
mprotect(0x28090000,847872,(0x7)PROT_READ|PROT_WRITE|PROT_EXEC) = 0 (0x0)
mmap(0x0,22200,(0x3)PROT_READ|PROT_WRITE,(0x1000)MAP_ANON,-1,0x0) =
672624640 (0 x28177000)
munmap(0x28177000,0x56b8) = 0 (0x0)
mprotect(0x28090000,847872,(0x5)PROT_READ|PROT_EXEC) = 0 (0x0)
sigprocmask(0x1,0x28083940,0xbfbfea40) = 0 (0x0)
sigprocmask(0x3,0x28083950,0x0) = 0 (0x0)
sigaction(SIGUSR1,{ 0x8054b70 0x0|ONSTACK|RESTART|RESETHAND|NOCLDSTOP|
NODEFER|NO
CLDWAIT|SIGINFO ss_t },0x0) = 0 (0x0)
sigaction(SIGHUP,{ 0x8054b70 0x0|ONSTACK|RESTART|RESETHAND|NOCLDSTOP|
NODEFER|NOC
LDWAIT|SIGINFO ss_t },0x0) = 0 (0x0)
sigaction(SIGTERM,{ 0x8054b70 0x0|ONSTACK|RESTART|RESETHAND|NOCLDSTOP|
NODEFER|NO
CLDWAIT|SIGINFO ss_t },0x0) = 0 (0x0)
sigaction(SIGALRM,{ 0x8054b70 0x0|ONSTACK|RESTART|RESETHAND|NOCLDSTOP|
NODEFER|NO
CLDWAIT|SIGINFO ss_t },0x0) = 0 (0x0)
sigaction(SIGCHLD,{ 0x8054b70 0x0|ONSTACK|RESTART|RESETHAND|NOCLDSTOP|
NODEFER|NO
CLDWAIT|SIGINFO ss_t },0x0) = 0 (0x0)
sigaction(SIGPIPE,{ SIG_IGN 0x0|ONSTACK|RESTART|RESETHAND|NOCLDSTOP|
NODEFER|NOCL
DWAIT|SIGINFO ss_t },0x0) = 0 (0x0)
readlink("/etc/malloc.conf",0xbfbfe7a0,63) ERR#2 'No such file or
director y'
issetugid() = 0 (0x0)
mmap(0x0,4096,(0x3)PROT_READ|PROT_WRITE,(0x1002)MAP_ANON|
MAP_PRIVATE,-1,0x0) = 6 72624640 (0x28177000)
break(0x8065000) = 0 (0x0)
break(0x8066000) = 0 (0x0)
break(0x8067000) = 0 (0x0)
break(0x8068000) = 0 (0x0)
break(0x8069000) = 0 (0x0)
open("/usr/local/etc/dnsmasq.conf",0x0,0666) = 3 (0x3)
fstat(3,0xbfbfe6d0) = 0 (0x0)
break(0x806a000) = 0 (0x0)
read(0x3,0x8069000,0x1000) = 4096 (0x1000)
read(0x3,0x8069000,0x1000) = 4096 (0x1000)
break(0x806b000) = 0 (0x0)
read(0x3,0x8069000,0x1000) = 4096 (0x1000)
read(0x3,0x8069000,0x1000) = 4096 (0x1000)
read(0x3,0x8069000,0x1000) = 1621 (0x655)
read(0x3,0x8069000,0x1000) = 0 (0x0)
close(3) = 0 (0x0)
socket(0x2,0x2,0x0) = 3 (0x3)
ioctl(3,SIOCGIFCONF,0xbfbfe8d0) = 0 (0x0)
ioctl(3,SIOCGIFCONF,0xbfbfe8d0) = 0 (0x0)
ioctl(3,SIOCGIFCONF,0xbfbfe8d0) = 0 (0x0)
ioctl(3,SIOCGIFNETMASK,0x806ac80) = 0 (0x0)
ioctl(3,SIOCGIFBRDADDR,0x806ac80) = 0 (0x0)
socket(0x2,0x2,0x0) = 4 (0x4)
ioctl(4,SIOCGIFINDEX,0xbfbfe860) = 0 (0x0)
close(4) = 0 (0x0)
socket(0x2,0x2,0x0) = 4 (0x4)
__sysctl(0xbfbfe7b0,0x6,0x0,0xbfbfe7ac,0x0,0x0) = 0 (0x0)
__sysctl(0xbfbfe7b0,0x6,0x8069000,0xbfbfe7ac,0x0,0x0) = 0 (0x0)
break(0x806c000) = 0 (0x0)
ioctl(4,SIOCGIFFLAGS,0xbfbfe850) = 0 (0x0)
close(4) = 0 (0x0)
ioctl(3,SIOCGIFNETMASK,0x806ac80) = 0 (0x0)
ioctl(3,SIOCGIFBRDADDR,0x806ac80) ERR#22 'Invalid argument'
socket(0x2,0x2,0x0) = 4 (0x4)
ioctl(4,SIOCGIFINDEX,0xbfbfe860) = 0 (0x0)
close(4) = 0 (0x0)
socket(0x2,0x2,0x0) = 4 (0x4)
__sysctl(0xbfbfe7b0,0x6,0x0,0xbfbfe7ac,0x0,0x0) = 0 (0x0)
__sysctl(0xbfbfe7b0,0x6,0x8069000,0xbfbfe7ac,0x0,0x0) = 0 (0x0)
ioctl(4,SIOCGIFFLAGS,0xbfbfe850) = 0 (0x0)
close(4) = 0 (0x0)
close(3) = 0 (0x0)
socket(0x2,0x2,0x0) = 3 (0x3)
socket(0x2,0x1,0x0) = 4 (0x4)
setsockopt(0x4,0xffff,0x4,0xbfbfe8dc,0x4) = 0 (0x0)
bind(0x4,{ AF_INET 0.0.0.0:53 },16) = 0 (0x0)
listen(0x4,0x5) = 0 (0x0)
fcntl(4,F_GETFL,0xbfbfe8e0) = 2 (0x2)
fcntl(4,F_SETFL,0x6) = 0 (0x0)
fcntl(4,F_GETFD,0x6) = 0 (0x0)
fcntl(4,F_SETFD,0x1) = 0 (0x0)
setsockopt(0x3,0xffff,0x4,0xbfbfe8dc,0x4) = 0 (0x0)
fcntl(3,F_GETFL,0x1) = 2 (0x2)
fcntl(3,F_SETFL,0x6) = 0 (0x0)
fcntl(3,F_GETFD,0x6) = 0 (0x0)
fcntl(3,F_SETFD,0x1) = 0 (0x0)
setsockopt(0x3,0x0,0x7,0xbfbfe8dc,0x4) = 0 (0x0)
setsockopt(0x3,0x0,0x14,0xbfbfe8dc,0x4) = 0 (0x0)
bind(0x3,{ AF_INET 0.0.0.0:53 },16) = 0 (0x0)
break(0x8071000) = 0 (0x0)
gettimeofday({1183388142 565910},0x0) = 0 (0x0)
socket(0x2,0x2,0x11) = 5 (0x5)
fcntl(5,F_GETFL,0x1) = 2 (0x2)
fcntl(5,F_SETFL,0x6) = 0 (0x0)
fcntl(5,F_GETFD,0x6) = 0 (0x0)
fcntl(5,F_SETFD,0x1) = 0 (0x0)
setsockopt(0x5,0x0,0x14,0xbfbfe8dc,0x4) = 0 (0x0)
setsockopt(0x5,0xffff,0x20,0xbfbfe8dc,0x4) = 0 (0x0)
bind(0x5,{ AF_INET 0.0.0.0:67 },16) = 0 (0x0)
socket(0x2,0x3,0x1) = 6 (0x6)
fcntl(6,F_GETFL,0x2806a977) = 2 (0x2)
fcntl(6,F_SETFL,0x6) = 0 (0x0)
fcntl(6,F_GETFD,0x6) = 0 (0x0)
fcntl(6,F_SETFD,0x1) = 0 (0x0)
setsockopt(0x6,0xffff,0x10,0xbfbfe8a0,0x4) = 0 (0x0)
setsockopt(0x6,0xffff,0x1002,0xbfbfe8dc,0x4) = 0 (0x0)
open("/dev/bpf0",0x2,00) = 7 (0x7)
fcntl(7,F_GETFD,0x0) = 0 (0x0)
fcntl(7,F_SETFD,0x1) = 0 (0x0)
open("/var/tmp/dnsmasq.leases",0x20a,0666) = 8 (0x8)
lseek(8,0x0,SEEK_END) = 6939 (0x1b1b)
fcntl(8,F_GETFD,0x0) = 0 (0x0)
fcntl(8,F_SETFD,0x1) = 0 (0x0)
fstat(8,0xbfbfe720) = 0 (0x0)
break(0x8072000) = 0 (0x0)
lseek(8,0x0,SEEK_SET) = 0 (0x0)
read(0x8,0x8071000,0x1000) = 4096 (0x1000)
break(0x8073000) = 0 (0x0)
break(0x8074000) = 0 (0x0)
read(0x8,0x8071000,0x1000) = 2843 (0xb1b)
break(0x8075000) = 0 (0x0)
break(0x8076000) = 0 (0x0)
read(0x8,0x8071000,0x1000) = 0 (0x0)
pipe() = 9 (0x9)
fcntl(9,F_GETFL,0x28175200) = 2 (0x2)
fcntl(9,F_SETFL,0x6) = 0 (0x0)
fcntl(9,F_GETFD,0x6) = 0 (0x0)
fcntl(9,F_SETFD,0x1) = 0 (0x0)
fcntl(10,F_GETFL,0x1) = 2 (0x2)
fcntl(10,F_SETFL,0x6) = 0 (0x0)
fcntl(10,F_GETFD,0x6) = 0 (0x0)
fcntl(10,F_SETFD,0x1) = 0 (0x0)
write(10,0xbfbfe977,1) = 1 (0x1)
open("/dev/null",0x2,01) = 11 (0xb)
fork() = 41784 (0xa338)
SIGNAL 20 (SIGCHLD)
SIGNAL 20 (SIGCHLD)
sigreturn(0xbfbfe600) = 41784 (0xa338)
exit(0x0)
process exit, rval = 0
cu
Gerrit
More information about the Dnsmasq-discuss
mailing list