You are not logged in.

#1 2023-03-31 22:13:14

bananabrain
Member
From: England
Registered: 2010-05-07
Posts: 78

dnsmasq dumps core on machine reboot/shutdown

Evening.

I've failed to find out what's wrong here. There are plenty of threads out there about dnsmasq crashing or failing on startup, but nothing relating to shutting the machine down. In that sense this is no show-stopper because the service comes up and runs fine, but I'd still like to find out what's going on.

Here's a `journalctl -u dnsmasq.service` output through the cycle of initial startup, machine reboot (at 20:33), then new startup...

-- Boot 5f4a13a391424c91a55202858c738d99 --
Mar 31 20:26:10 orion systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
Mar 31 20:26:10 orion dnsmasq[379]: dnsmasq: syntax check OK.
Mar 31 20:26:10 orion systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS server.
Mar 31 20:26:10 orion dnsmasq[421]: started, version 2.89 DNS disabled
Mar 31 20:26:10 orion dnsmasq[421]: compile time options: IPv6 GNU-getopt DBus no-UBus i18n IDN2 DHCP DHCPv6 no-Lua TFT>
Mar 31 20:26:10 orion dnsmasq[421]: DBus support enabled: connected to system bus
Mar 31 20:26:10 orion dnsmasq-dhcp[421]: DHCP, proxy on subnet 192.168.1.254
Mar 31 20:26:10 orion dnsmasq-tftp[421]: TFTP root is /srv/tftp secure mode
Mar 31 20:33:02 orion systemd[1]: dnsmasq.service: Main process exited, code=dumped, status=11/SEGV
Mar 31 20:33:02 orion systemd[1]: dnsmasq.service: Failed with result 'core-dump'.
Mar 31 20:33:02 orion systemd[1]: Stopped dnsmasq - A lightweight DHCP and caching DNS server.
-- Boot c36f4dbcd8cd49e6a171d758bbe88cb1 --
Mar 31 20:33:33 orion systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
Mar 31 20:33:33 orion dnsmasq[376]: dnsmasq: syntax check OK.
Mar 31 20:33:33 orion systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS server.
Mar 31 20:33:33 orion dnsmasq[418]: started, version 2.89 DNS disabled
Mar 31 20:33:33 orion dnsmasq[418]: compile time options: IPv6 GNU-getopt DBus no-UBus i18n IDN2 DHCP DHCPv6 no-Lua TFT>
Mar 31 20:33:33 orion dnsmasq[418]: DBus support enabled: connected to system bus
Mar 31 20:33:33 orion dnsmasq-dhcp[418]: DHCP, proxy on subnet 192.168.1.254
Mar 31 20:33:33 orion dnsmasq-tftp[418]: TFTP root is /srv/tftp secure mode
lines 16-44/44 (END)

The service status looks fine after startup:

ROOT@orion ~ # systemctl status dnsmasq.service
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
     Loaded: loaded (/usr/lib/systemd/system/dnsmasq.service; enabled; preset: disabled)
    Drop-In: /etc/systemd/system/dnsmasq.service.d
             └─override.conf
     Active: active (running) since Fri 2023-03-31 20:33:33 BST; 13min ago
       Docs: man:dnsmasq(8)
    Process: 376 ExecStartPre=/usr/bin/dnsmasq --test (code=exited, status=0/SUCCESS)
   Main PID: 418 (dnsmasq)
      Tasks: 1 (limit: 8692)
     Memory: 4.2M
        CPU: 23ms
     CGroup: /system.slice/dnsmasq.service
             └─418 /usr/bin/dnsmasq -k --enable-dbus --user=dnsmasq --pid-file

Mar 31 20:33:33 orion systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
Mar 31 20:33:33 orion dnsmasq[376]: dnsmasq: syntax check OK.
Mar 31 20:33:33 orion systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS server.
Mar 31 20:33:33 orion dnsmasq[418]: started, version 2.89 DNS disabled
Mar 31 20:33:33 orion dnsmasq[418]: compile time options: IPv6 GNU-getopt DBus no-UBus i18n IDN2 DHCP DHCPv6 no-Lua TFT>
Mar 31 20:33:33 orion dnsmasq[418]: DBus support enabled: connected to system bus
Mar 31 20:33:33 orion dnsmasq-dhcp[418]: DHCP, proxy on subnet 192.168.1.254
Mar 31 20:33:33 orion dnsmasq-tftp[418]: TFTP root is /srv/tftp secure mode
lines 1-22/22 (END)

And to show that the problem only occurs on machine shutdown, here's a `journalctl -u dnsmasq` output cycle after issuing "systemctl restart dnsmasq.service", which also looks ok...

-- Boot c36f4dbcd8cd49e6a171d758bbe88cb1 --
Mar 31 20:33:33 orion systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
Mar 31 20:33:33 orion dnsmasq[376]: dnsmasq: syntax check OK.
Mar 31 20:33:33 orion systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS server.
Mar 31 20:33:33 orion dnsmasq[418]: started, version 2.89 DNS disabled
Mar 31 20:33:33 orion dnsmasq[418]: compile time options: IPv6 GNU-getopt DBus no-UBus i18n IDN2 DHCP DHCPv6 no-Lua TFT>
Mar 31 20:33:33 orion dnsmasq[418]: DBus support enabled: connected to system bus
Mar 31 20:33:33 orion dnsmasq-dhcp[418]: DHCP, proxy on subnet 192.168.1.254
Mar 31 20:33:33 orion dnsmasq-tftp[418]: TFTP root is /srv/tftp secure mode
Mar 31 20:47:29 orion dnsmasq[418]: exiting on receipt of SIGTERM
Mar 31 20:47:29 orion systemd[1]: Stopping dnsmasq - A lightweight DHCP and caching DNS server...
Mar 31 20:47:29 orion systemd[1]: dnsmasq.service: Deactivated successfully.
Mar 31 20:47:29 orion systemd[1]: Stopped dnsmasq - A lightweight DHCP and caching DNS server.
Mar 31 20:47:29 orion systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
Mar 31 20:47:29 orion dnsmasq[659]: dnsmasq: syntax check OK.
Mar 31 20:47:29 orion systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS server.
Mar 31 20:47:29 orion dnsmasq[661]: started, version 2.89 DNS disabled
Mar 31 20:47:29 orion dnsmasq[661]: compile time options: IPv6 GNU-getopt DBus no-UBus i18n IDN2 DHCP DHCPv6 no-Lua TFT>
Mar 31 20:47:29 orion dnsmasq[661]: DBus support enabled: connected to system bus
Mar 31 20:47:29 orion dnsmasq-dhcp[661]: DHCP, proxy on subnet 192.168.1.254
Mar 31 20:47:29 orion dnsmasq-tftp[661]: TFTP root is /srv/tftp secure mode
lines 28-56/56 (END)

Finally here's my dnsmasq.conf - now down to just six lines to see if anything in there had been causing the problem (I get the same issues with just the first three lines)...

port=0
interface=eth0
dhcp-range=192.168.1.254,proxy
enable-tftp
tftp-root=/srv/tftp
tftp-secure

This is just for a pxe boot server, which i haven't got as far as testing yet (one step at a time..).

I'll be grateful if anyone can point me in the direction of what to look at.

Offline

#2 2023-04-01 07:01:31

seth
Member
Registered: 2012-09-03
Posts: 60,799

Online

#3 2023-04-01 07:54:00

bananabrain
Member
From: England
Registered: 2010-05-07
Posts: 78

Re: dnsmasq dumps core on machine reboot/shutdown

I did Seth, yes.

I spent two or three hours messing about with this last night, so with some dismay I've woken up this morning to find the problem disappeared.

I've changed *nothing* since watching it fail again before going to bed, except for running Syu when I woke up, so am at a loss to know what's happened. I wish I'd checked to see if the problem was still there _before_ the Syu.
I didn't take note of what the half dozen or so upgraded files were - some vulkan drivers in there I recall.

My grasp of systemd is nothing to write home about. A timing issue between stopping and starting services maybe?

Anyway, thanks for the reply and sorry for the noise.

Phil



Edit:

I just looked at the core dump stuff in your link.

"coredumpctl list"   returns   "No coredumps found."

Are core dumps disposed of quickly? Or do the journalctl returns I got above not necessarily mean there'll be a coredump there to examine?

Last edited by bananabrain (2023-04-01 08:03:10)

Offline

#4 2023-04-01 08:09:06

seth
Member
Registered: 2012-09-03
Posts: 60,799

Re: dnsmasq dumps core on machine reboot/shutdown

Are core dumps disposed of quickly?

Usually not, but if dnsmasq crashes after the filesystem has been synced or the filesystem also fails to sync, they're not written at all.

Also check

ls /var/cache/coredumps

in case you used an /etc/sysctl.d configlet to alter the pattern.
https://wiki.archlinux.org/title/Core_d … do_they_go?

Online

#5 2023-04-01 08:28:45

bananabrain
Member
From: England
Registered: 2010-05-07
Posts: 78

Re: dnsmasq dumps core on machine reboot/shutdown

/etc/systemd/coredump.conf

[Coredump]
#Storage=external
Storage=none
#Compress=yes
# On 32-bit, the default is 1G instead of 32G.
#ProcessSizeMax=32G
#ExternalSizeMax=32G
#JournalSizeMax=767M
#MaxUse=
#KeepFree=

...something else I need to rectify?  Seems a like strange default.



Edit:

I feel like I'm opening endless tins of worms...
The _default_ coredump.conf I've just dug out of the package cache looks like this:

[Coredump]
#Storage=external
#Compress=yes
# On 32-bit, the default is 1G instead of 32G.
#ProcessSizeMax=32G
#ExternalSizeMax=32G
#JournalSizeMax=767M
#MaxUse=
#KeepFree=

What changed that?  Wasn't me.

Last edited by bananabrain (2023-04-01 08:40:11)

Offline

#6 2023-04-01 09:17:03

-thc
Member
Registered: 2017-03-15
Posts: 775

Re: dnsmasq dumps core on machine reboot/shutdown

bananabrain wrote:

I didn't take note of what the half dozen or so upgraded files were - some vulkan drivers in there I recall.

You may take a look in the log:

cat /var/log/pacman.log | grep upgraded

Offline

#7 2023-04-01 09:48:22

bananabrain
Member
From: England
Registered: 2010-05-07
Posts: 78

Re: dnsmasq dumps core on machine reboot/shutdown

Thanks again for this gem.

This morning was only...

[2023-04-01T07:58:37+0100] [ALPM] upgraded libgit2 (1:1.5.1-2 -> 1:1.6.3-1)
[2023-04-01T07:58:37+0100] [ALPM] upgraded vulkan-headers (1:1.3.240-1 -> 1:1.3.246-1)
[2023-04-01T07:58:37+0100] [ALPM] upgraded vulkan-icd-loader (1.3.240-1 -> 1.3.245-1)
[2023-04-01T07:58:37+0100] [ALPM] upgraded xfsprogs (6.1.1-2 -> 6.2.0-1)

...none of which seem particularly relevant.
I just rebooted again and that orifinal problem has definitely gone.

Flummoxed...

Offline

Board footer

Powered by FluxBB