[Dnsmasq-discuss] segfault - Re: No dnsmasq after starting openVPN?!

Simon Kelley simon at thekelleys.org.uk
Sun Jun 6 20:21:12 BST 2010


Arno Wald wrote:
> On 06.06.2010 12:06, Arno Wald wrote:
>> I did not enter anything but just started openvpn. The dnsmasq process
>> did not disappear. In gdb I entered "c" and after this "bt" and "q":
> 
> I did the same with a self compiled dnsmasq package following this guide
> http://jameswestby.net/tips/tips/compiling-debian-package-for-debug.html
> 
> and the result is this:
> 
> (gdb) c
> Continuing.
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x08067156 in netlink_multicast () at netlink.c:249
> 249           for (h = (struct nlmsghdr *)iov.iov_base; NLMSG_OK(h, 
> (size_t)len); h = NLMSG_NEXT(h, len))
> (gdb) bt
> #0  0x08067156 in netlink_multicast () at netlink.c:249
> #1  0x0805cea5 in main (argc=9, argv=0xbfff3554) at dnsmasq.c:662
> 
> 
> Does this help?
> 

Sure does. Many thanks for getting this far. I'm pretty certain the
problem is that netlink_multicast() calls nl_routechange() which than
calls poll_resolv(), and changes in poll_resolv mean that it can
indirectly call iface_enumerate. Once that lot has returned, the
contents of the iov has changed, and the NLMSG_NEXT(h, len) call returns
junk.

The only problem with this explanation is that the change to
poll_resolv() happened in 2.52. Do you know what version you were
running when this last worked?

Please could you try commenting out the call to poll_resolv() at
netlink.c line 284, and see if that fixes things?


Cheers,

Simon.



More information about the Dnsmasq-discuss mailing list