Article View: news.software.nntp
Article #39379Re: solaris2.6 and inn2.2
From: Russ Allbery
Date: Tue, 24 Aug 1999 00:00
Date: Tue, 24 Aug 1999 00:00
45 lines
2351 bytes
2351 bytes
Brad Knowles <brad@shub-internet.org> writes:
> Now that I think about it, the times when I've seen the most reports
> from my monitor program that restarts actived when it dies, has been
> when there have been lots of newsgroups being added/deleted from the
> active file, either by actsync or by some of my manual actions in
> response to a checkgroups.
> This on INN 2.1 running on a DEC Alpha 1000 w/ Digital Unix 4.0B.
It's not that hard to track down. GetGroupList() calls ReadInFile(),
which calls ReadInDescriptor(). It promptly does:
/* Get the size, and enough memory. */
if (fstat(fd, Sbp) < 0) {
oerrno = errno;
(void)close(fd);
errno = oerrno;
return NULL;
}
p = NEW(char, Sbp->st_size + 1);
/* Slurp, slurp. */
if (xread(fd, p, (OFFSET_T)(Sbp->st_size)) < 0) {
oerrno = errno;
DISPOSE(p);
(void)close(fd);
errno = oerrno;
return NULL;
}
So if the file grows or shrinks between the fstat() and xread(),
ReadInDescriptor() returns NULL, which causes GetGroupList() to return
FALSE, and actived promptly does an exit(1).
I haven't bothered to try to find a good way of fixing it since actived
got yanked out with Clayton's changes in 2.3 and if it comes back, it'll
be in a much-modified form. It might be worth fixing ReadInDescriptor()
at some point if anything else in INN calls it on a file that could be
changing, though.
--
Russ Allbery (rra@stanford.edu) <URL:http://www.eyrie.org/~eagle/>
Technical Details
Message-ID:
<yliu64pye5.fsf@windlord.stanford.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<7p9ae7$t3$1@news247.ctel.msk.ru> <brad-1608991750150001@brad.techos.skynet.be> <7p9d1j$10e$1@news247.ctel.msk.ru> <7pjoav$81v$1@nclient1-gui.server.ntli.net> <ylogg11udz.fsf@windlord.stanford.edu> <7puu0a$rl5$1@news.inet.tele.dk> <brad-2508990102400001@dialup446.brussels2.skynet.be>Show Full Headers
Complete Article Headers
Message-ID: <yliu64pye5.fsf@windlord.stanford.edu> Subject: Re: solaris2.6 and inn2.2 Date: Tue, 24 Aug 1999 00:00:00 +0000 From: Russ Allbery <rra@stanford.edu> References: <7p9ae7$t3$1@news247.ctel.msk.ru> <brad-1608991750150001@brad.techos.skynet.be> <7p9d1j$10e$1@news247.ctel.msk.ru> <7pjoav$81v$1@nclient1-gui.server.ntli.net> <ylogg11udz.fsf@windlord.stanford.edu> <7puu0a$rl5$1@news.inet.tele.dk> <brad-2508990102400001@dialup446.brussels2.skynet.be> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 516787826 Organization: The Eyrie Newsgroups: news.software.nntp