Bug 130294 - [patch] dns/nsd: fix race when stopping nsd
Summary: [patch] dns/nsd: fix race when stopping nsd
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Martin Wilke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-08 11:10 UTC by Artis Caune
Modified: 2009-01-16 00:30 UTC (History)
0 users

See Also:


Attachments
file.diff (283 bytes, patch)
2009-01-08 11:10 UTC, Artis Caune
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Artis Caune 2009-01-08 11:10:01 UTC
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

Fix: Patch attached with submission follows:
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
Comment 1 Edwin Groothuis freebsd_committer 2009-01-08 11:10:15 UTC
Maintainer of dns/nsd,

Please note that PR ports/130294 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/130294

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer 2009-01-08 11:10:17 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 Olafur Osvaldsson 2009-01-08 22:56:31 UTC
This patch may be submitted.

/Oli
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2009-01-10 20:42:26 UTC
State Changed
From-To: feedback->open

Maintainer approved.
Comment 5 Martin Wilke freebsd_committer 2009-01-10 21:09:56 UTC
Responsible Changed
From-To: freebsd-ports-bugs->miwi

I'll take it.
Comment 6 Martin Wilke freebsd_committer 2009-01-16 00:30:22 UTC
State Changed
From-To: open->closed

Committed. Thanks!