Thread View: news.software.nntp
6 messages
6 total messages
Started by Mark Hittinger
Wed, 12 Nov 1997 00:00
INN pause does HISclose() and queued checks
Author: Mark Hittinger
Date: Wed, 12 Nov 1997 00:00
Date: Wed, 12 Nov 1997 00:00
29 lines
1553 bytes
1553 bytes
Just an FYI - I got bit by this during the past week working on some new history logic. If you pause the server CCblock will call HISclose(). You may still have a series of 'checks <>' coming in from your peers. These checks will go to HIShavearticle() even though the history file is closed. I am hacking 1.4unoff4+ still so I'm not really sure if 1.5/6/7/8 have modified the handling of this condition. It doesn't look too terrible (we may just say "we don't have the articles go ahead and send them"). Then after INN eats them does it loose them? For those who have their hands in under the hood this may give you an ugly stack-stomping core dump looking at formerly opened mmap'ed mlock'ed data :-) I was playing with it this morning and on our heaviest hit host the number of checks happening after the pause/HISclose() was averaging 157. Should we respond with a defer in this case? Regards, Mark Hittinger Netcom/Dallas bugs@freebsd.netcom.com
Re: INN pause does HISclose() and queued checks
Author: coneill
Date: Wed, 12 Nov 1997 00:00
Date: Wed, 12 Nov 1997 00:00
35 lines
2134 bytes
2134 bytes
bugs@freebsd.netcom.com (Mark Hittinger) writes: > Just an FYI - I got bit by this during the past week working on some new > history logic. > > If you pause the server CCblock will call HISclose(). You may still have a > series of 'checks <>' coming in from your peers. These checks will go to > HIShavearticle() even though the history file is closed. > > I am hacking 1.4unoff4+ still so I'm not really sure if 1.5/6/7/8 have modified > the handling of this condition. It doesn't look too terrible (we may just > say "we don't have the articles go ahead and send them"). Then after INN > eats them does it loose them? I believe everything up to and including 1.7 has this problem. It's fixed in 1.8-current. > For those who have their hands in under the hood this may give you an ugly > stack-stomping core dump looking at formerly opened mmap'ed mlock'ed data :-) Tell me about it :) > I was playing with it this morning and on our heaviest hit host the number > of checks happening after the pause/HISclose() was averaging 157. > > Should we respond with a defer in this case? I think that would be the ideal scenario, but the history api doesn't really allow for that currently. Until I get the chance to fix everything that uses HIShavehistory, I just make it return with a "does not exist" if the file is closed. I figure the worst case scenario is that we'll reject a few extra articles.
Re: INN pause does HISclose() and queued checks
Author: Mark Hittinger
Date: Wed, 12 Nov 1997 00:00
Date: Wed, 12 Nov 1997 00:00
88 lines
3374 bytes
3374 bytes
coneill@blah.erols.com writes:
> Until I get the chance to fix
>everything that uses HIShavehistory, I just make it return with a
>"does not exist" if the file is closed. I figure the worst case
>scenario is that we'll reject a few extra articles.
I hate to loose 150 or so articles every time we expire :-)
We could try something like the following test patches against 1.7 although
they fit into 1.4 too. In the TAKETHIS case we'd just issue a resendid
from ARTPOST although we might wind up sending resendid to an ihave.
It looks like innxmit and *EVEN* rnews can handle that :-)
In nc.c we can handle the CHECK case fairly easy but the IHAVE case
appears to be sticky. Innxmit looks like it can handle the resendid
response to an IHAVE but my friend rnews doesn't :-) I wonder about
some of the other software out there such as nntplink, cnews, etc.
I may just be paranoid worrying about the IHAVE case because every single
one of the tests here resulted in only a bunch of CHECKs showing up.
Anyhow I had to do something right away since I'm pausing the servers
so often lately :-)
*** art.c.b4 Wed Nov 12 18:47:08 1997
--- art.c Wed Nov 12 18:52:13 1997
***************
*** 1782,1787 ****
--- 1782,1795 ----
(void)sprintf(Data.TimeReceived, "%lu", Now.time);
Data.TimeReceivedLength = strlen(Data.TimeReceived);
+ if (Mode != OMrunning)
+ {
+ (void)sprintf(buff, "%d %s",
+ NNTP_RESENDIT_VAL, Data.MessageID) ;
+ ARTreject(buff, article) ;
+ return buff ;
+ }
+
/* A duplicate? */
if (error == NULL && HIShavearticle(Data.MessageID)){
error = "Duplicate article";
*** nc.c.b4 Wed Nov 12 18:39:26 1997
--- nc.c Wed Nov 12 19:02:24 1997
***************
*** 594,599 ****
--- 594,607 ----
if (NCbadid(cp, p))
return;
+ if (Mode != OMrunning)
+ {
+ /* Will this wig out old ihave/sendme people ? */
+ (void)sprintf(cp->Sendid.Data, "%d %s", NNTP_RESENDID_VAL, p) ;
+ NCwritereply(cp, cp->Sendid.Data) ;
+ return ;
+ }
+
if (HIShavearticle(p)) {
cp->Refused++;
NCwritereply(cp, NNTP_HAVEIT);
***************
*** 1507,1512 ****
--- 1515,1527 ----
return;
}
+ if (Mode != OMrunning)
+ {
+ (void)sprintf(cp->Sendid.Data, "%d %s", NNTP_RESENDID_VAL, p) ;
+ NCwritereply(cp, cp->Sendid.Data) ;
+ return ;
+ }
+
if (HIShavearticle(p)) {
cp->Refused++;
(void)sprintf(cp->Sendid.Data, "%d %s", NNTP_ERR_GOTID_VAL, p);
------cut above me
Regards,
Mark Hittinger
Netcom/Dallas
bugs@freebsd.netcom.com
Re: INN pause does HISclose() and queued checks
Author: Don Lewis
Date: Wed, 19 Nov 1997 00:00
Date: Wed, 19 Nov 1997 00:00
15 lines
1142 bytes
1142 bytes
In article <64cotg$m8e@dfw-ixnews1.ix.netcom.com>, Mark Hittinger <bugs@freebsd.netcom.com> wrote: >Should we respond with a defer in this case? What about those feeders that retry like mad if you tell them to defer? Why not just handle this the same way as incoming articles are handled while paused (using SCHANadd)? -- Don "Truck" Lewis TDK Semiconductor Internet: Don.Lewis@tsc.tdk.com 138 New Mohawk Road Phone: +1 916 478-8284 FAX: +1 916 478-8251 Nevada City, CA 95959
Re: INN pause does HISclose() and queued checks
Author: Mark Hittinger
Date: Wed, 19 Nov 1997 00:00
Date: Wed, 19 Nov 1997 00:00
47 lines
2415 bytes
2415 bytes
>In article <64cotg$m8e@dfw-ixnews1.ix.netcom.com>, >Mark Hittinger <bugs@freebsd.netcom.com> wrote: >>Should we respond with a defer in this case? gdonl@tsc.tdk.com (Don Lewis) writes: >What about those feeders that retry like mad if you tell them to defer? >Why not just handle this the same way as incoming articles are handled >while paused (using SCHANadd)? Yeah I'm pretty bummed out about the 431 support on the feeder side. If you put in those naive' patches of mine then you won't loose the articles but your innd cpu time will go way up as it constantly responds with 431 to an unending series of articles. I break the logic to get to the SCHANadd call within NCpostit() in fact. Since I'm mostly pausing the server for short periods of time I'm living with it for a couple of expire cycles while I figure out a better trick. SCHANadd looks interesting to me but I'm scared of it :-) If we keep a remote site's feeder channel paused by PAUSE_RETRY_TIME (5*60) then they'll probably drop the connection anyhow. They will come back in, offer the article, and get stuck in that wait again. Maybe that is the right way to handle it. Putting on the kludge-it hat for a minute maybe we should call the NCwriteshutdown() routine to drop the link, and not let them back in at the "mode stream" spot. Hopefully these feeders won't spin trying to reconnect like they spin retrying 431-response articles. When the server is "GO" again and the history file is open then we can open the floodgates. I may code that approach tonight and see how it goes. Similarly we need to make our precommit patch a little smarter about this spinning feeder thing. Rats. Mark Hittinger Netcom/Dallas bugs@freebsd.netcom.com
Re: INN pause does HISclose() and queued checks
Author: Don Lewis
Date: Tue, 25 Nov 1997 00:00
Date: Tue, 25 Nov 1997 00:00
28 lines
1887 bytes
1887 bytes
In article <650077$t6r@dfw-ixnews1.ix.netcom.com>, Mark Hittinger <bugs@freebsd.netcom.com> wrote: >If we keep a remote site's feeder channel paused by PAUSE_RETRY_TIME >(5*60) then they'll probably drop the connection anyhow. They will >come back in, offer the article, and get stuck in that wait again. Yup. Kind of unfriendly to my way of thinking. It would be better to throttle instead of pausing for long periods of time. >Maybe that is the right way to handle it. > >Putting on the kludge-it hat for a minute maybe we should call the >NCwriteshutdown() routine to drop the link, and not let them back >in at the "mode stream" spot. Hopefully these feeders won't spin >trying to reconnect like they spin retrying 431-response articles. Innfeed does an exponential backoff in the situation. It turns out that it doesn't if it keeps connecting to a paused server and timing out, since the success of the "mode stream" command is enough to reset the backoff counter. -- Don "Truck" Lewis TDK Semiconductor Internet: Don.Lewis@tsc.tdk.com 138 New Mohawk Road Phone: +1 916 478-8284 FAX: +1 916 478-8251 Nevada City, CA 95959
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads