FS#73684 - [dnsmasq] Broken SIGHUP handling in 2.86, regression from 2.85

Attached to Project: Arch Linux
Opened by Charles Turner (cturner) - Tuesday, 08 February 2022, 10:43 GMT
Last edited by Toolybird (Toolybird) - Monday, 04 September 2023, 01:27 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Christian Hesse (eworm)
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Additional info:
* package version(s)

Regression in 2.86-1
Works fine in 2.85-1

* config and/or log files etc.

All tested using the CLI,

dnsmasq --log-facility=- --keep-in-foreground --port=0 --pid-file=/mnt/tmp/boots/dnsmasq.pid --dhcp-hostsfile=/mnt/tmp/boots/hosts.dhcp --dhcp-optsfile=/mnt/tmp/boots/options.dhcp --dhcp-leasefile=/mnt/tmp/boots/dnsmasq.leases --dhcp-match=set:efi-x86_64,option:client-arch,7 --dhcp-boot=tag:efi-x86_64,syslinux.efi --dhcp-boot=lpxelinux.0 --dhcp-range=10.42.0.10,10.42.0.100 --dhcp-script=/bin/echo --enable-tftp=private --tftp-root=/mnt/tmp/boots/tftp --log-queries=extra --conf-file=/dev/null --interface=private

* link to upstream bug report, if any

https://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2022q1/016133.html

Steps to reproduce:

Start dnsmasq as above (taking care to setup the file paths needed for the server)

Get the leader daemon's PID (the one owned by `nobody')

Notice you can `kill -s SIGHUP <pid>` as many times as you like before the service has responded to BOOTP/DHCP requests. It correctly rereads some configuration files.

Perform a network boot on the private interface.

Repeat the `kill -s SIGHUP <pid>`, the daemon will SIGABRT. It enters a syscall and fails to correctly handle the interrupt, crashing in this case.
This task depends upon

Closed by  Toolybird (Toolybird)
Monday, 04 September 2023, 01:27 GMT
Reason for closing:  Fixed
Additional comments about closing:  We're on dnsmasq 2.89-1 now so assuming fixed. If still an issue, please follow up with upstream.
Comment by Charles Turner (cturner) - Tuesday, 08 February 2022, 18:07 GMT
I bisected this to,

commit 10d8b5f001a34ff46b3a72575f3af64b065f8637
Author: Petr Menšík <pemensik@redhat.com>
Date: Wed Apr 14 21:08:31 2021 +0100

Reduce code duplication, reuse existing functions

dhcp_config_free and dhcp_opt_free already implement the same
algorithm.
Reuse them. Adds forgotten hostname cleanup to config free.


If it hits you, revert that and things work again.
Comment by Christian Hesse (eworm) - Tuesday, 08 February 2022, 20:24 GMT
Let me know when there's an upstream fix...

Loading...