Article View: news.software.nntp
Article #6807Re: ANNOUNCE: ISC innfeed 0.7 (beta) another patch
From: Steve Bauer
Date: Tue, 23 Apr 1996 00:00
Date: Tue, 23 Apr 1996 00:00
198 lines
7385 bytes
7385 bytes
Joseph T. Klein (jtk@inap.net) wrote:
: In article <4lbkgl$h01@news.sdsmt.edu>,
: Steve Bauer <sbauer@krypton.sdsmt.edu> wrote:
: >I think I have found the problem that is causing the assert at line 555 in
: >host.c. It is caused by the site having started spooling before the
: >connection is setup. Thus the site has a host->statsId set since the
: >spooling code sets up a stats logging callback also.
: >
: >Here is the little patch that I used to fix this race problem:
: >*** host.c.orig Thu Apr 18 22:49:19 1996
: >--- host.c Thu Apr 18 22:53:12 1996
: >***************
: >*** 552,559 ****
: > syslog (LOG_NOTICE, REMOTE_NO_STREAMING, host->peerName);
: >
: > /* set up the callback for statistics logging. */
: >! ASSERT (host->statsId == 0) ;
: >! host->statsId = prepareSleep (hostStatsTimeoutCbk, statsPeriod, host) ;
: >
: > host->remoteStreams = doesStreaming ;
: >
: >--- 552,563 ----
: > syslog (LOG_NOTICE, REMOTE_NO_STREAMING, host->peerName);
: >
: > /* set up the callback for statistics logging. */
: >! /* If we have started spooling then there was a timeout set for stats
: >! Collection already*/
: >! if(host->spoolTime == 0) {
: >! ASSERT (host->statsId == 0) ;
: >! host->statsId = prepareSleep (hostStatsTimeoutCbk, statsPeriod, host) ;
: >! }
: >
: > host->remoteStreams = doesStreaming ;
:
: I'm running 0.7.1 with Clayton O'Neils's patch and this patch ... seems to
: run OK. It is spiiting up from some type of memory leak now and then.
:
: Compiled with gcc -O2 -m486 on BSDOS 2.0.1
:
: OK now how do I change my innlog.awk to get a nice report?
: I must have been blind! I could not see the script in the tar file.
: --
: jtk@nap.net
:
:
Here is another patch for innfeed. This one patches the connection.c file
to fix the problem where it was exiting do to an assertion at line 2800
which is where i is not equal to cxn->articleQTotal. Since I have patched
my innfeed with this, I have not had these errors anymore. This patch
also adds a little more debugging information in the function validate
connection.
Steve Bauer
SDSM&T
501 E. Saint Joseph Street
Rapid City, SD 57701-3995
*** connection.c.orig Tue Apr 23 07:06:32 1996
--- connection.c Tue Apr 23 07:04:24 1996
***************
*** 1268,1284 ****
ASSERT (cxn->myEp != NULL) ;
checkBuffer = buildCheckBuffer (cxn) ; /* may be null if none to issue */
!
! writeArray = buildTakethisBuffers (cxn,checkBuffer) ; /* may be null */
!
! /* If not null, then writeArray will have checkBuffer (if it wasn't NULL)
! in the first spot and the takethis buffers after that. */
! if (writeArray)
{
- prepareWrite (cxn->myEp, writeArray, checkWriteDone, cxn) ;
- rval = true ;
-
/* Now shift the articles to their new queues. */
for (p = cxn->checkRespHead ; p != NULL && p->next != NULL ; p = p->next)
/* nada--finding end of queue*/ ;
--- 1268,1283 ----
ASSERT (cxn->myEp != NULL) ;
checkBuffer = buildCheckBuffer (cxn) ; /* may be null if none to issue */
!
! if(checkBuffer != NULL)
{
/* Now shift the articles to their new queues. */
+ /* This has to be done before buildTakethisBuffers so that
+ if one is missing it is added to the right queue instead of
+ being added to the list of articles that are waiting for a
+ check to return.
+ Steve Bauer
+ */
for (p = cxn->checkRespHead ; p != NULL && p->next != NULL ; p = p->next)
/* nada--finding end of queue*/ ;
***************
*** 1287,1293 ****
else
p->next = cxn->checkHead ;
cxn->checkHead = NULL ;
!
for (p = cxn->takeRespHead ; p != NULL && p->next != NULL ; p = p->next)
/* nada--finding end of queue */ ;
--- 1286,1302 ----
else
p->next = cxn->checkHead ;
cxn->checkHead = NULL ;
! }
!
! writeArray = buildTakethisBuffers (cxn,checkBuffer) ; /* may be null */
!
! /* If not null, then writeArray will have checkBuffer (if it wasn't NULL)
! in the first spot and the takethis buffers after that. */
! if (writeArray != NULL)
! {
! prepareWrite (cxn->myEp, writeArray, checkWriteDone, cxn) ;
! rval = true ;
! /* Now shift the articles to their new queues. */
for (p = cxn->takeRespHead ; p != NULL && p->next != NULL ; p = p->next)
/* nada--finding end of queue */ ;
***************
*** 1466,1472 ****
cxn->checksIssued++ ;
hostArticleOffered (cxn->myHost,cxn) ;
}
!
p = p->next ;
}
}
--- 1475,1482 ----
cxn->checksIssued++ ;
hostArticleOffered (cxn->myHost,cxn) ;
}
! /* Need to move q along or we will delete the whole list*/
! q = p;
p = p->next ;
}
}
***************
*** 2781,2802 ****
{
u_int i ;
ArtHolder p ;
!
i = 0 ;
/* count up the articles the Connection has and make sure that matches. */
for (p = cxn->takeHead ; p != NULL ; p = p->next)
i++ ;
for (p = cxn->takeRespHead ; p != NULL ; p = p->next)
i++ ;
for (p = cxn->checkHead ; p != NULL ; p = p->next)
i++ ;
for (p = cxn->checkRespHead ; p != NULL ; p = p->next)
i++ ;
!
ASSERT (i == cxn->articleQTotal) ;
if (cxn->timeCon != 0) /* connection wasn't reset */
--- 2791,2820 ----
{
u_int i ;
ArtHolder p ;
! int old=0;
i = 0 ;
/* count up the articles the Connection has and make sure that matches. */
for (p = cxn->takeHead ; p != NULL ; p = p->next)
i++ ;
+ dprintf(1,"takeHead = %d\n",i);
+ old=i;
for (p = cxn->takeRespHead ; p != NULL ; p = p->next)
i++ ;
+ dprintf(1,"takeRespHead = %d \n",i-old);
+ old=i;
for (p = cxn->checkHead ; p != NULL ; p = p->next)
i++ ;
+ dprintf(1,"checkHead = %d\n",i-old);
+ old=i;
+
for (p = cxn->checkRespHead ; p != NULL ; p = p->next)
i++ ;
! dprintf(1,"checkRespHead = %d\n",i-old);
! dprintf(1,"%s: i=%d QTotal=%d\n",hostPeerName(cxn->myHost),i,cxn->articleQTotal);
ASSERT (i == cxn->articleQTotal) ;
if (cxn->timeCon != 0) /* connection wasn't reset */
Technical Details
Message-ID:
<4lil8m$bfd@news.sdsmt.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:
<4kn70a$eiq@gw.home.vix.com> <4l5i1l$n2g@brasil.moneng.mei.com> <4l5sl2$k26@huron.eel.ufl.edu> <4lbkgl$h01@news.sdsmt.edu> <4levh7$lhs@news.nap.net>Show Full Headers
Complete Article Headers
Message-ID: <4lil8m$bfd@news.sdsmt.edu> Subject: Re: ANNOUNCE: ISC innfeed 0.7 (beta) another patch Date: Tue, 23 Apr 1996 00:00:00 +0000 From: sbauer@krypton.sdsmt.edu (Steve Bauer) References: <4kn70a$eiq@gw.home.vix.com> <4l5i1l$n2g@brasil.moneng.mei.com> <4l5sl2$k26@huron.eel.ufl.edu> <4lbkgl$h01@news.sdsmt.edu> <4levh7$lhs@news.nap.net> 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: 150985432 Distribution: world Organization: South Dakota School of Mines and Technology Newsgroups: news.software.nntp