What's new

Dnsmasq crashes, watchdog fails to restart it

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

What are your file sizes/ownership?
Code:
ls -la /jffs/addons/YazDHCP.d/
drwxrwxrwx    2 RT-AC86U root             0 Feb 22 13:58 .
drwxr-xr-x    8 RT-AC86U root             0 Feb 22 13:58 ..
-rw-rw-rw-    1 RT-AC86U root           421 Feb 22 13:58 .hostnames
-rw-rw-rw-    1 RT-AC86U root           741 Feb  6  2023 .nvram_dhcp_staticlist
-rw-rw-rw-    1 RT-AC86U root           740 Feb  6  2023 .nvram_jffs_dhcp_staticlist
-rw-rw-rw-    1 RT-AC86U root             0 Feb 22 13:58 .optionslist
-rw-rw-rw-    1 RT-AC86U root           901 Feb 22 13:58 .staticlist
-rw-rw-rw-    1 RT-AC86U root         79952 Nov 19 12:55 Advanced_DHCP_Content.asp
-rw-rw-rw-    1 RT-AC86U root           222 Nov 19 12:55 CustomUserIconsConfig
-rw-rw-rw-    1 RT-AC86U root            73 Feb 22 13:58 DHCP_Lease
-rw-rw-rw-    1 RT-AC86U root           764 Feb 22 13:58 DHCP_clients
-rw-rw-rw-    1 RT-AC86U root           714 Dec 26 19:49 DHCP_clients.bak
 
I don't know how to do that
I don't know your level of technical know-how, but the generated output would probably be overwhelming for a regular user. This will require that you have Entware installed and configured.

The short explanation is:

1) Install strace ( opkg install strace)
2) Retrieve the process ID of dnsmasq (by running ps w | grep dnsmasq)
3) Attach strace to the process with the admin user: strace -p 4613 (replace 4613 with the process ID of dnsmasq)
4) Reproduce the problem
5) See if the strace output mentions any file that was accessed before the crash

If nothing useful appears, try with the nobody process.
 
I don't know your level of technical know-how, but the generated output would probably be overwhelming for a regular user
OK - my tech level is fairly good, I used to write network management s/w for big custom comms networks, BUT I retired about 15 years ago, so I'm pretty rusty and need a bit of 'hand-holding' nowadays.

So, I installed strace, ran it as you described and pulled the WAN connection.
strace output as follows.

Code:
ps | grep dns
22443 nobody    2776 S    dnsmasq --log-async
22444 RT-AC86U  2752 S    dnsmasq --log-async


strace -p 22444
strace: Process 22444 attached
[ Process PID=22444 runs in 32 bit mode. ]
strace: WARNING: Proper structure decoding for this personality is not supported, please consider building strace with mpers support enabled.
read(16, "\2\0\0\0\7\0\0\0\6\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\\(Um"..., 112) = 112
pipe([3, 4])                            = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xf77ac1e8) = 27347
close(4)                                = 0
fcntl64(3, F_GETFL)                     = 0 (flags O_RDONLY)
fstat64(3, 0xff904198)                  = 0
read(3, "", 4096)                       = 0
close(3)                                = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 27347
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=27347, si_uid=0, si_status=0, si_utime=0, si_stime=1 /* 0.01 s */} ---
sigreturn({mask=[]})                    = 27347
read(16, "", 112)                       = 0
exit_group(0)                           = ?
+++ exited with 0 +++

Note that in this case, the watchdog restarted the dnsmasq process shortly after.
 
Please repeat it, using the process ID belonging to “nobody”.

OK, a lot more output this time, had to split it into two messages.
once again dnsmasq was restarted by watchdog.

Code:
ps | grep dns
26285 RT-AC86U  4768 S    grep dns
27989 nobody    2776 S    dnsmasq --log-async
27990 RT-AC86U  2752 S    dnsmasq --log-async


strace -p 27989
strace: Process 27989 attached
[ Process PID=27989 runs in 32 bit mode. ]
strace: WARNING: Proper structure decoding for this personality is not supported, please consider building strace with mpers support enabled.
restart_syscall(<... resuming interrupted poll ...>) = 1
clock_gettime(CLOCK_MONOTONIC, {tv_sec=778487, tv_nsec=129187709}) = 0
recvmsg(5, {msg_name=0xcffe675f0, msg_namelen=632276, msg_iov=NULL, msg_iovlen=2716944771842048, msg_control=strace: umoven_peekdata: short read (2292 < 20480) @0x9a70c: Input/output error
0x9a70c, msg_controllen=18446744069415216596, msg_flags=MSG_CTRUNC|MSG_PROBE|MSG_TRUNC|MSG_DONTWAIT|MSG_WAITALL|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, MSG_PEEK|MSG_TRUNC|MSG_DONTWAIT) = 80
recvmsg(5, {msg_name=0xcffe675f0, msg_namelen=632276, msg_iov=NULL, msg_iovlen=2716944771842048, msg_control=strace: umoven_peekdata: short read (2292 < 20480) @0x9a70c: Input/output error
0x9a70c, msg_controllen=18446744069415216596, msg_flags=MSG_CTRUNC|MSG_PROBE|MSG_TRUNC|MSG_DONTWAIT|MSG_WAITALL|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, MSG_DONTWAIT) = 80
writev(13, [{iov_base="\26\0\0\0\0\0\0\0\0\0\0\0", iov_len=12}], 1) = 12
recvmsg(5, {msg_namelen=632276}, MSG_PEEK|MSG_TRUNC|MSG_DONTWAIT) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(5, {msg_namelen=632276}, MSG_DONTWAIT) = -1 EAGAIN (Resource temporarily unavailable)
sendto(5, [{nlmsg_len=20, nlmsg_type=0x1e /* NLMSG_??? */, nlmsg_flags=NLM_F_REQUEST|NLM_F_ACK|0x300, nlmsg_seq=196, nlmsg_pid=0}, "\x00\x00\x00\x00"], 20, 0, {sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, 12) = 20
recvmsg(5, {msg_name=0xcffe67570, msg_namelen=632276, msg_iov=NULL, msg_iovlen=18439555260528721920, msg_control=0x1, msg_controllen=632588, msg_flags=MSG_PROBE|MSG_DONTWAIT|MSG_EOR|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, MSG_PEEK|MSG_TRUNC) = 60
recvmsg(5, {msg_name=0xcffe67570, msg_namelen=632276, msg_iov=NULL, msg_iovlen=18439555260528721920, msg_control=0x1, msg_controllen=632588, msg_flags=MSG_PROBE|MSG_DONTWAIT|MSG_EOR|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, 0) = 60
recvmsg(5, {msg_name=0xcffe67570, msg_namelen=632276, msg_iov=NULL, msg_iovlen=6424120023580672, msg_controllen=0, msg_flags=MSG_PROBE|MSG_DONTWAIT|MSG_EOR|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, MSG_PEEK|MSG_TRUNC) = 60
recvmsg(5, {msg_name=0xcffe67570, msg_namelen=632276, msg_iov=NULL, msg_iovlen=6424120023580672, msg_controllen=0, msg_flags=MSG_PROBE|MSG_DONTWAIT|MSG_EOR|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, 0) = 60
recvmsg(5, {msg_name=0xcffe67570, msg_namelen=632276, msg_iov=NULL, msg_iovlen=6424120023580672, msg_controllen=0, msg_flags=MSG_PROBE|MSG_DONTWAIT|MSG_EOR|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, MSG_PEEK|MSG_TRUNC) = 60
recvmsg(5, {msg_name=0xcffe67570, msg_namelen=632276, msg_iov=NULL, msg_iovlen=6424120023580672, msg_controllen=0, msg_flags=MSG_PROBE|MSG_DONTWAIT|MSG_EOR|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, 0) = 60
recvmsg(5, {msg_name=0xcffe67570, msg_namelen=632276, msg_iov=NULL, msg_iovlen=6424120023580672, msg_controllen=0, msg_flags=MSG_PROBE|MSG_DONTWAIT|MSG_EOR|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, MSG_PEEK|MSG_TRUNC) = 60
recvmsg(5, {msg_name=0xcffe67570, msg_namelen=632276, msg_iov=NULL, msg_iovlen=6424120023580672, msg_controllen=0, msg_flags=MSG_PROBE|MSG_DONTWAIT|MSG_EOR|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, 0) = 60
recvmsg(5, {msg_name=0xcffe67570, msg_namelen=632276, msg_iov=NULL, msg_iovlen=6424120023580672, msg_controllen=0, msg_flags=MSG_PROBE|MSG_DONTWAIT|MSG_EOR|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, MSG_PEEK|MSG_TRUNC) = 3664
recvmsg(5, {msg_name=0xcffe67570, msg_namelen=632276, msg_iov=NULL, msg_iovlen=6424120023580672, msg_controllen=0, msg_flags=MSG_PROBE|MSG_DONTWAIT|MSG_EOR|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, 0) = 3664
recvmsg(5, {msg_name=0xcffe67570, msg_namelen=632276, msg_iov=NULL, msg_iovlen=6439599085715456, msg_controllen=0, msg_flags=MSG_PROBE|MSG_DONTWAIT|MSG_EOR|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, MSG_PEEK|MSG_TRUNC) = 1320
recvmsg(5, {msg_name=0xcffe67570, msg_namelen=632276, msg_iov=NULL, msg_iovlen=6439599085715456, msg_controllen=0, msg_flags=MSG_PROBE|MSG_DONTWAIT|MSG_EOR|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, 0) = 1320
recvmsg(5, {msg_name=0xcffe67570, msg_namelen=632276, msg_iov=NULL, msg_iovlen=6429531682373632, msg_controllen=0, msg_flags=MSG_PROBE|MSG_DONTWAIT|MSG_EOR|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, MSG_PEEK|MSG_TRUNC) = 20
recvmsg(5, {msg_name=0xcffe67570, msg_namelen=632276, msg_iov=NULL, msg_iovlen=6429531682373632, msg_controllen=0, msg_flags=MSG_PROBE|MSG_DONTWAIT|MSG_EOR|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, 0) = 20
poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN}, {fd=6, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=9, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=17, events=POLLOUT}], 10, -1) = 2 ([{fd=12, revents=POLLIN}, {fd=17, revents=POLLOUT}])
clock_gettime(CLOCK_MONOTONIC, {tv_sec=778487, tv_nsec=135479578}) = 0
read(12, "\26\0\0\0\0\0\0\0\0\0\0\0", 12) = 12
socket(AF_INET, SOCK_DGRAM, IPPROTO_IP) = 15
sendto(5, [{nlmsg_len=20, nlmsg_type=0x16 /* NLMSG_??? */, nlmsg_flags=NLM_F_REQUEST|NLM_F_ACK|0x300, nlmsg_seq=197, nlmsg_pid=0}, "\x0a\x00\x00\x00"], 20, 0, {sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, 12) = 20
recvmsg(5, {msg_name=0xcffe67528, msg_namelen=632276, msg_iov=NULL, msg_iovlen=18439554951291076608, msg_control=0xa00000001, msg_controllen=632588, msg_flags=MSG_PROBE|MSG_DONTWAIT|MSG_EOR|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, MSG_PEEK|MSG_TRUNC) = 20
recvmsg(5, {msg_name=0xcffe67528, msg_namelen=632276, msg_iov=NULL, msg_iovlen=18439554951291076608, msg_control=0xa00000001, msg_controllen=632588, msg_flags=MSG_PROBE|MSG_DONTWAIT|MSG_EOR|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, 0) = 20
sendto(5, [{nlmsg_len=20, nlmsg_type=0x16 /* NLMSG_??? */, nlmsg_flags=NLM_F_REQUEST|NLM_F_ACK|0x300, nlmsg_seq=198, nlmsg_pid=0}, "\x02\x00\x00\x00"], 20, 0, {sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, 12) = 20
recvmsg(5, {msg_name=0xcffe67528, msg_namelen=632276, msg_iov=NULL, msg_iovlen=18439554951291076608, msg_control=0x200000001, msg_controllen=632588, msg_flags=MSG_PROBE|MSG_DONTWAIT|MSG_EOR|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, MSG_PEEK|MSG_TRUNC) = 344
recvmsg(5, {msg_name=0xcffe67528, msg_namelen=632276, msg_iov=NULL, msg_iovlen=18439554951291076608, msg_control=0x200000001, msg_controllen=632588, msg_flags=MSG_PROBE|MSG_DONTWAIT|MSG_EOR|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, 0) = 344
ioctl(15, SIOCGIFNAME, {ifr_ifindex=1, ifr_name="lo"}) = 0
ioctl(15, SIOCGIFFLAGS, {ifr_name="lo", ifr_flags=IFF_UP|IFF_LOOPBACK|IFF_RUNNING|IFF_MULTICAST}) = 0
ioctl(15, SIOCGIFNAME, {ifr_ifindex=1, ifr_name="lo"}) = 0
ioctl(15, SIOCGIFFLAGS, {ifr_name="lo", ifr_flags=IFF_UP|IFF_LOOPBACK|IFF_RUNNING|IFF_MULTICAST}) = 0
ioctl(15, SIOCGIFNAME, {ifr_ifindex=13, ifr_name="eth0"}) = 0
ioctl(15, SIOCGIFFLAGS, {ifr_name="eth0", ifr_flags=IFF_UP|IFF_BROADCAST|IFF_RUNNING|IFF_ALLMULTI|IFF_MULTICAST}) = 0
ioctl(15, SIOCGIFNAME, {ifr_ifindex=24, ifr_name="br0"}) = 0
ioctl(15, SIOCGIFFLAGS, {ifr_name="br0", ifr_flags=IFF_UP|IFF_BROADCAST|IFF_RUNNING|IFF_ALLMULTI|IFF_MULTICAST}) = 0
 
Second half of output

Code:
recvmsg(5, {msg_name=0xcffe67528, msg_namelen=632276, msg_iov=NULL, msg_iovlen=6425339794292736, msg_controllen=0, msg_flags=MSG_PROBE|MSG_DONTWAIT|MSG_EOR|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, MSG_PEEK|MSG_TRUNC) = 20
recvmsg(5, {msg_name=0xcffe67528, msg_namelen=632276, msg_iov=NULL, msg_iovlen=6425339794292736, msg_controllen=0, msg_flags=MSG_PROBE|MSG_DONTWAIT|MSG_EOR|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, 0) = 20
close(15)                               = 0
getpid()                                = 27989
close(6)                                = 0
close(7)                                = 0
write(17, "\2\0\0\0\7\0\0\0\6\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\\(Um"..., 112) = 112
poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN}, {fd=8, events=POLLIN}, {fd=9, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}], 7, -1) = 1 ([{fd=5, revents=POLLIN}])
clock_gettime(CLOCK_MONOTONIC, {tv_sec=778487, tv_nsec=249930732}) = 0
recvmsg(5, {msg_name=0xcffe675f0, msg_namelen=632276, msg_iov=NULL, msg_iovlen=2716944771842048, msg_control=strace: umoven_peekdata: short read (2292 < 20480) @0x9a70c: Input/output error
0x9a70c, msg_controllen=18446744069415216596, msg_flags=MSG_CTRUNC|MSG_PROBE|MSG_TRUNC|MSG_DONTWAIT|MSG_WAITALL|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, MSG_PEEK|MSG_TRUNC|MSG_DONTWAIT) = 88
recvmsg(5, {msg_name=0xcffe675f0, msg_namelen=632276, msg_iov=NULL, msg_iovlen=2716944771842048, msg_control=strace: umoven_peekdata: short read (2292 < 20480) @0x9a70c: Input/output error
0x9a70c, msg_controllen=18446744069415216596, msg_flags=MSG_CTRUNC|MSG_PROBE|MSG_TRUNC|MSG_DONTWAIT|MSG_WAITALL|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, MSG_DONTWAIT) = 88
writev(13, [{iov_base="\26\0\0\0\0\0\0\0\0\0\0\0", iov_len=12}], 1) = 12
recvmsg(5, {msg_namelen=632276}, MSG_PEEK|MSG_TRUNC|MSG_DONTWAIT) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(5, {msg_namelen=632276}, MSG_DONTWAIT) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN}, {fd=8, events=POLLIN}, {fd=9, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}], 7, -1) = 1 ([{fd=12, revents=POLLIN}])
clock_gettime(CLOCK_MONOTONIC, {tv_sec=778487, tv_nsec=251104170}) = 0
read(12, "\26\0\0\0\0\0\0\0\0\0\0\0", 12) = 12
socket(AF_INET, SOCK_DGRAM, IPPROTO_IP) = 6
sendto(5, [{nlmsg_len=20, nlmsg_type=0x16 /* NLMSG_??? */, nlmsg_flags=NLM_F_REQUEST|NLM_F_ACK|0x300, nlmsg_seq=199, nlmsg_pid=0}, "\x0a\x00\x00\x00"], 20, 0, {sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, 12) = 20
recvmsg(5, {msg_name=0xcffe67528, msg_namelen=632276, msg_iov=NULL, msg_iovlen=18439554951291076608, msg_control=0xa00000001, msg_controllen=632588, msg_flags=MSG_PROBE|MSG_DONTWAIT|MSG_EOR|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, MSG_PEEK|MSG_TRUNC) = 60
recvmsg(5, {msg_name=0xcffe67528, msg_namelen=632276, msg_iov=NULL, msg_iovlen=18439554951291076608, msg_control=0xa00000001, msg_controllen=632588, msg_flags=MSG_PROBE|MSG_DONTWAIT|MSG_EOR|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, 0) = 60
recvmsg(5, {msg_name=0xcffe67528, msg_namelen=632276, msg_iov=NULL, msg_iovlen=6424120023580672, msg_controllen=0, msg_flags=MSG_PROBE|MSG_DONTWAIT|MSG_EOR|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, MSG_PEEK|MSG_TRUNC) = 60
recvmsg(5, {msg_name=0xcffe67528, msg_namelen=632276, msg_iov=NULL, msg_iovlen=6424120023580672, msg_controllen=0, msg_flags=MSG_PROBE|MSG_DONTWAIT|MSG_EOR|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, 0) = 60
recvmsg(5, {msg_name=0xcffe67528, msg_namelen=632276, msg_iov=NULL, msg_iovlen=6424120023580672, msg_controllen=0, msg_flags=MSG_PROBE|MSG_DONTWAIT|MSG_EOR|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, MSG_PEEK|MSG_TRUNC) = 60
recvmsg(5, {msg_name=0xcffe67528, msg_namelen=632276, msg_iov=NULL, msg_iovlen=6424120023580672, msg_controllen=0, msg_flags=MSG_PROBE|MSG_DONTWAIT|MSG_EOR|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, 0) = 60
recvmsg(5, {msg_name=0xcffe67528, msg_namelen=632276, msg_iov=NULL, msg_iovlen=6424120023580672, msg_controllen=0, msg_flags=MSG_PROBE|MSG_DONTWAIT|MSG_EOR|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, MSG_PEEK|MSG_TRUNC) = 60
recvmsg(5, {msg_name=0xcffe67528, msg_namelen=632276, msg_iov=NULL, msg_iovlen=6424120023580672, msg_controllen=0, msg_flags=MSG_PROBE|MSG_DONTWAIT|MSG_EOR|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, 0) = 60
recvmsg(5, {msg_name=0xcffe67528, msg_namelen=632276, msg_iov=NULL, msg_iovlen=6424120023580672, msg_controllen=0, msg_flags=MSG_PROBE|MSG_DONTWAIT|MSG_EOR|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, MSG_PEEK|MSG_TRUNC) = 20
recvmsg(5, {msg_name=0xcffe67528, msg_namelen=632276, msg_iov=NULL, msg_iovlen=6424120023580672, msg_controllen=0, msg_flags=MSG_PROBE|MSG_DONTWAIT|MSG_EOR|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, 0) = 20
sendto(5, [{nlmsg_len=20, nlmsg_type=0x16 /* NLMSG_??? */, nlmsg_flags=NLM_F_REQUEST|NLM_F_ACK|0x300, nlmsg_seq=200, nlmsg_pid=0}, "\x02\x00\x00\x00"], 20, 0, {sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, 12) = 20
recvmsg(5, {msg_name=0xcffe67528, msg_namelen=632276, msg_iov=NULL, msg_iovlen=18439554951291076608, msg_control=0x200000001, msg_controllen=632588, msg_flags=MSG_PROBE|MSG_DONTWAIT|MSG_EOR|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, MSG_PEEK|MSG_TRUNC) = 256
recvmsg(5, {msg_name=0xcffe67528, msg_namelen=632276, msg_iov=NULL, msg_iovlen=18439554951291076608, msg_control=0x200000001, msg_controllen=632588, msg_flags=MSG_PROBE|MSG_DONTWAIT|MSG_EOR|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, 0) = 256
ioctl(6, SIOCGIFNAME, {ifr_ifindex=1, ifr_name="lo"}) = 0
ioctl(6, SIOCGIFFLAGS, {ifr_name="lo", ifr_flags=IFF_UP|IFF_LOOPBACK|IFF_RUNNING|IFF_MULTICAST}) = 0
ioctl(6, SIOCGIFNAME, {ifr_ifindex=1, ifr_name="lo"}) = 0
ioctl(6, SIOCGIFFLAGS, {ifr_name="lo", ifr_flags=IFF_UP|IFF_LOOPBACK|IFF_RUNNING|IFF_MULTICAST}) = 0
ioctl(6, SIOCGIFNAME, {ifr_ifindex=24, ifr_name="br0"}) = 0
ioctl(6, SIOCGIFFLAGS, {ifr_name="br0", ifr_flags=IFF_UP|IFF_BROADCAST|IFF_RUNNING|IFF_ALLMULTI|IFF_MULTICAST}) = 0
recvmsg(5, {msg_name=0xcffe67528, msg_namelen=632276, msg_iov=NULL, msg_iovlen=6424961837170688, msg_controllen=0, msg_flags=MSG_PROBE|MSG_DONTWAIT|MSG_EOR|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, MSG_PEEK|MSG_TRUNC) = 20
recvmsg(5, {msg_name=0xcffe67528, msg_namelen=632276, msg_iov=NULL, msg_iovlen=6424961837170688, msg_controllen=0, msg_flags=MSG_PROBE|MSG_DONTWAIT|MSG_EOR|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|MSG_SENDPAGE_NOTLAST}, 0) = 20
close(6)                                = 0
poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN}, {fd=8, events=POLLIN}, {fd=9, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}], 7, -1) = ? ERESTART_RESTARTBLOCK (Interrupted by signal)
--- SIGHUP {si_signo=SIGHUP, si_code=SI_USER, si_pid=26882, si_uid=0} ---
getpid()                                = 27989
writev(13, [{iov_base="\1\0\0\0\0\0\0\0\0\0\0\0", iov_len=12}], 1) = 12
sigreturn({mask=[]})                    = -1 EINTR (Interrupted system call)
poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN}, {fd=8, events=POLLIN}, {fd=9, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}], 7, -1) = 1 ([{fd=12, revents=POLLIN}])
clock_gettime(CLOCK_MONOTONIC, {tv_sec=778487, tv_nsec=265972624}) = 0
read(12, "\1\0\0\0\0\0\0\0\0\0\0\0", 12) = 12
openat(AT_FDCWD, "/etc/hosts", O_RDONLY|O_LARGEFILE) = 6
fstat64(6, 0xffe67450)                  = 0
read(6, "127.0.0.1 localhost.localdomain "..., 4096) = 592
read(6, "", 4096)                       = 0
read(6, "", 4096)                       = 0
close(6)                                = 0
getpid()                                = 27989
gettimeofday({tv_sec=523455143112050, tv_usec=1037853078767400}, NULL) = 0
getpid()                                = 27989
write(14, "<30>Feb 26 10:52:34 dnsmasq[2798"..., 62) = 62
stat64("/jffs/addons/YazDHCP.d/.hostnames", 0xffe67518) = 0
openat(AT_FDCWD, "/jffs/addons/YazDHCP.d/.hostnames", O_RDONLY|O_LARGEFILE) = 6
fstat64(6, 0xffe67450)                  = 0
read(6, "192.168.1.10 RaspiMon\n192.168.1."..., 4096) = 421
read(6, "", 4096)                       = 0
read(6, "", 4096)                       = 0
close(6)                                = 0
getpid()                                = 27989
gettimeofday({tv_sec=525950519111026, tv_usec=1037853078767400}, NULL) = 0
getpid()                                = 27989
write(14, "<30>Feb 26 10:52:34 dnsmasq[2798"..., 85) = 85
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x6e} ---
+++ killed by SIGSEGV +++
 
Thanks. I’m surprised that it ends much the same way as the syslog (logs the message, then dies). Will have to think about it. Consider joining the dnsmasq-discuss mailing list and sharing the output with the author.
 
Another idea to try is to comment out the entry pointing to the empty file:
Code:
# dhcp-optsfile=/jffs/addons/YazDHCP.d/.optionslist
 
Another way to test:
Code:
service stop_dnsmasq; dnsmasq -d --log-debug --log-async
Then perform the disconnect or SIGHUP test in another window. See if a core file is generated when it dies, or any interesting log messages show up in debug mode.
 
Another way to test:
Code:
service stop_dnsmasq; dnsmasq -d --log-debug --log-async
Then perform the disconnect or SIGHUP test in another window. See if a core file is generated when it dies, or any interesting log messages show up in debug mode.
I don't think that works, all that happens is that the watchdog restarts dnsmasq without the debug flags straight away.
 
I find this works:
Code:
killall dnsmasq; dnsmasq -d --log-debug --log-async
I wasn't able to reproduce the fault with that running.
dnsmasq didn't crash when I unplugged the WAN connection.
 
I wasn't able to reproduce the fault with that running.
dnsmasq didn't crash when I unplugged the WAN connection.
Was this with the dhcp-optsfile option removed from the config file as suggested by Dave, or with the original file?

Does using killall -SIGHUP dnsmasq still cause the crash?
 
Was this with the dhcp-optsfile option removed from the config file as suggested by Dave, or with the original file?

Does using killall -SIGHUP dnsmasq still cause the crash?

I didn't try it with the dhcp-optsfile option removed, didn't see that post.

BUT, I just ran the
Code:
killall dnsmasq; dnsmasq -d --log-debug --log-async
command and did
Code:
killall -SIGHUP dnsmasq
from another terminal and this happened.

Code:
dnsmasq-dhcp: DHCPREQUEST(br0) 192.168.1.11 dc:a6:32:6d:62:7a
dnsmasq-dhcp: DHCPACK(br0) 192.168.1.11 dc:a6:32:6d:62:7a Raspi-4B
dnsmasq: read /etc/hosts - 24 names
dnsmasq: read /jffs/addons/YazDHCP.d/.hostnames - 34 names
Segmentation fault
 
I didn't try it with the dhcp-optsfile option removed, didn't see that post.

BUT, I just ran the
Code:
killall dnsmasq; dnsmasq -d --log-debug --log-async
command and did
Code:
killall -SIGHUP dnsmasq
from another terminal and this happened.

Code:
dnsmasq-dhcp: DHCPREQUEST(br0) 192.168.1.11 dc:a6:32:6d:62:7a
dnsmasq-dhcp: DHCPACK(br0) 192.168.1.11 dc:a6:32:6d:62:7a Raspi-4B
dnsmasq: read /etc/hosts - 24 names
dnsmasq: read /jffs/addons/YazDHCP.d/.hostnames - 34 names
Segmentation fault
Is there a core file in the current directory?
 
If I recall, Asus disables core dumps for obvious reasons (no persistent storage, limited flash storage space, etc...)
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top