[Dnsmasq-discuss] SIGHUP issue

sven falempin sven.falempin at gmail.com
Fri Feb 15 15:30:30 GMT 2013


On Fri, Feb 15, 2013 at 10:28 AM, sven falempin <sven.falempin at gmail.com>wrote:

>
>
> On Fri, Feb 15, 2013 at 9:30 AM, Simon Kelley <simon at thekelleys.org.uk>wrote:
>
>> On 13/02/13 22:17, C V wrote:
>> >
>> >
>> >
>> >
>> >> Sent: Wed, February 13, 2013 12:19:51 PM
>> >> Subject: [Dnsmasq-discuss] SIGHUP issue
>> >>
>> >
>> >> The only 1 time I have been able to reproduce  by hand is by trying it
>> on a
>> >> long-running (many days) process in a cloud  that was not being used
>> actively.
>> >>
>> >
>> >
>> > OK this part is reproducible and may not be the real problem. In this
>> case the
>> > logrotate causes dnsmasq to not write to the new dnsmasq.log file. It
>> writes to
>> > the old file (dnsmasq.log-20130213). The logs indicate that SIGHUP
>> indeed is
>> > processed.
>> >
>> > There is a bug in our logrotate config
>> > postrotate
>> >         [ ! -f /var/run/dnsmasq.pid ] || kill -USR2 `cat
>> /var/run/dnsmasq.pid`
>> >
>> > should be
>> > postrotate
>> >         [ ! -f /var/run/dnsmasq.pid ] || kill -USR2 `cat
>> > /var/run/dnsmasq/dnsmasq.pid`
>> >
>> >
>>
>> I'm confused now if there's a real problem or not. Certainly there is no
>> problem with SIGHUP that I know of.
>>
>> A question: do you ever restart dnsmasq? Is there are race between
>> restarts and SIGHUP before the pidfile contents are valid?
>>
>> Cheers,
>>
>> Simon.
>>
>>
>>
>> _______________________________________________
>> Dnsmasq-discuss mailing list
>> Dnsmasq-discuss at lists.thekelleys.org.uk
>> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>>
>
>
>
> Looks like an OS problem, nevertheless DNSmasq rely on some unitiliazed
> value at startup,
> i encourage the use of valgrind which i never saw say something wrong and
> detect many hard to find bug.
>
> --
>
> ---------------------------------------------------------------------------------------------------------------------
> () ascii ribbon campaign - against html e-mail
> /\
>


Example:

==6436==
==6436== Conditional jump or move depends on uninitialised value(s)
==6436==    at 0x805B2C1: receive_query (in /home/zvn/dnsmasq/src/dnsmasq)
==6436==    by 0x805DF5E: check_dns_listeners (in
/home/zvn/dnsmasq/src/dnsmasq)
==6436==    by 0x805FCD3: main (in /home/zvn/dnsmasq/src/dnsmasq)
in(172.1.168.192.in-addr.arpa)
dnsmasq: 172.1.168.192.in-addr.arpa passed 3
==6436==
==6436== Syscall param socketcall.sendmsg(msg.msg_control) points to
uninitialised byte(s)
==6436==    at 0x40F7F0C: sendmsg (in /lib/libc-2.7.so)
==6436==    by 0x805BCA7: reply_query (in /home/zvn/dnsmasq/src/dnsmasq)
==6436==    by 0x805E299: check_dns_listeners (in
/home/zvn/dnsmasq/src/dnsmasq)
==6436==    by 0x805FCD3: main (in /home/zvn/dnsmasq/src/dnsmasq)
==6436==  Address 0xbedc434c is on thread 1's stack

-- 
---------------------------------------------------------------------------------------------------------------------
() ascii ribbon campaign - against html e-mail
/\
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20130215/0233641d/attachment.html>


More information about the Dnsmasq-discuss mailing list