[Dnsmasq-discuss] dnsmasq 2.89 sometimes segfaults on SIGHUP
Dominik Derigs
dl6er at dl6er.de
Fri Jun 2 19:48:06 UTC 2023
Hey Felix,
On Fri, 2023-06-02 at 13:04 +0000, Felix.Hillingshaeuser at sony.com wrote:
> #7 0x000055555556ba44 in dhcp_netid_free (nid=0x7ffff7e70074) at option.c:1297
Oh, interesting. This rings a bell. I remember having seen some crashes
involving this function some time ago myself, however, it was to
intermittent to do any really useful debugging myself. It hasn't
happened to me for quite some time now.
On Fri, 2023-06-02 at 13:04 +0000, Felix.Hillingshaeuser at sony.com wrote:
> Ideas on why this could happen or how to further approach this are very welcome.
My suggestion to you would be running dnsmasq in valgrind to have
somebody watch memory allocation, deallocation and access. Something
like
sudo valgrind --trace-children=yes --leak-check=full --track-origins=yes
--log-file=valgrind.log -s dnsmasq
maybe. My speculation back then was some out-of-bounds memory writing
leading to memory corruption and, in turn, to issues when calling free -
which does not necessarily need to related to the pointer at hand.
valgrind generates some verbose output and you can often ignore most of
it, however, it will also reliably detect if (and if how and where)
memory corruption happens.
As said, I wasn't able to do such debugging myself as the issue stopped
happening and was happening rarely even before.
Best,
Dominik
More information about the Dnsmasq-discuss
mailing list