Date: Thu, 8 Jan 2009 11:09:08 GMT From: Artis Caune <Artis.Caune@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/130294: [patch] dns/nsd: fix race when stopping nsd Message-ID: <200901081109.n08B98ww066895@www.freebsd.org> Resent-Message-ID: <200901081110.n08BA12g098277@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 130294 >Category: ports >Synopsis: [patch] dns/nsd: fix race when stopping nsd >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jan 08 11:10:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Artis Caune >Release: stable/7 >Organization: >Environment: FreeBSD builder 7.1-STABLE FreeBSD 7.1-STABLE #0 r186761: Mon Jan 5 11:46:44 EET 2009 root@builder:/usr/obj/usr/src/sys/GENERIC amd64 >Description: when nsd is acting as secondary for zones, and there are transfers not patched, there will be SIG race when stopping nsd. It reload database and ignore TERM signal. btw, do we really need patch zones when stopping nsd? This must be done daily from cron. Jan 8 13:03:13 a nsd[51004]: signal received, reloading... Jan 8 13:03:13 a nsd[51004]: signal received, shutting down... Jan 8 13:03:15 a nsd[51048]: memory recyclebin holds 265960 bytes Jan 8 13:03:15 a nsd[51048]: problems sending soa begin from reload 51048 to xfrd: Broken pipe Jan 8 13:03:15 a nsd[51048]: problems sending soa info from reload 51048 to xfrd: Broken pipe Jan 8 13:03:15 a nsd[51048]: problems sending soa info from reload 51048 to xfrd: Broken pipe Jan 8 13:03:15 a nsd[51048]: problems sending soa info from reload 51048 to xfrd: Broken pipe Jan 8 13:03:15 a nsd[51048]: problems sending soa info from reload 51048 to xfrd: Broken pipe Jan 8 13:03:15 a nsd[51048]: problems sending soa end from reload 51048 to xfrd: Broken pipe >How-To-Repeat: # /usr/local/etc/rc.d/nsd stop Merging nsd zone transfer changes to zone files. reading database reading updates to database writing changed zones writing zone lv to file /var/db/nsd/lv.zone.signed zone dnssectests.lv had not changed. done zonec: reading zone "lv". zonec: processed 365154 RRs in "lv". zonec: reading zone "dnssectests.lv". zonec: processed 31 RRs in "dnssectests.lv". zonec: done with 0 errors. Stopping nsd. # ps axu |grep nsd bind 51048 0.0 15.1 81984 76788 ?? I 1:03PM 0:01.53 /usr/local/sbin/nsd bind 51071 0.0 15.1 82112 76912 ?? I 1:03PM 0:00.00 /usr/local/sbin/nsd root 51073 0.0 0.2 5928 992 p0 R+ 1:03PM 0:00.00 grep nsd >Fix: Patch attached with submission follows: --- files/nsd.in.orig 2008-11-21 22:34:49.000000000 +0200 +++ files/nsd.in 2009-01-08 12:56:06.079621983 +0200 @@ -31,6 +31,8 @@ echo "Merging nsd zone transfer changes to zone files." %%PREFIX%%/sbin/nsdc patch + sleep 5 + echo "Stopping nsd." %%PREFIX%%/sbin/nsdc stop } >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901081109.n08B98ww066895>