INN 2.5, inn-CURRENT-20090103 Issues

William Kronert wkronert at sunstroke.sdsu.edu
Wed Feb 18 09:45:03 UTC 2009


Hello Julien,

I wanted to follow up on this assertion 
patch.  The patch has been in place for a month 
now and I haven't received any assertion failures 
since it has been in place.  The patch is working 
very well, it appears to have solved the 
problem.  The patch that I am using from Julien 
is listed below.   Everything has been working 
very well with this current branch of INN 2.5 that I am using.  Thanks much.

Bill

At 05:46 AM 1/18/2009, Julien ÉLIE wrote:
>Hi William,
>
>>Interesting, I just got another assertion 
>>failure BUT this time at a different line.  The 
>>one's I was getting before were at line 1171 
>>and I haven't seen anymore of those since 
>>Julien created the patch.  Now for the first time I got one at line 842.
>
>It is *again* triggered by the same function:  hostSendArticle().
>Well, let's check whether the connexion is null before calling
>other functions.
>
>
>>Jan 18 02:13:47 gondor innfeed[17396]: 
>>assertion -- cxn != NULL -- failed in file connection.c line 842
>>
>>So In Host.c: $Id: host.c 8243 2008-12-21 11:50:47Z iulius $
>
>The assertion is in connection.c, not host.c.
>However, the corresponding function is called by host.c.
>
>
>>This assertion seems like a rare occurrence so 
>>testing any patches might take some time.
>
>No problem.
>As far as I see in the rest of the code, connections is a NULL-terminated
>array.  Therefore, host->connections[idx] can be NULL and it is never
>checked here.  Strange...  I hope I am not missing something.
>
>Anyway, here is a patch:
>
>Index: host.c
>===================================================================
>--- host.c      (révision 8292)
>+++ host.c      (copie de travail)
>@@ -1717,7 +1717,7 @@
>         unsigned int x_queue = host->params->maxChecks + 1 ;
>
>         for (idx = 0 ; x_queue > 0 && idx < host->maxConnections ; idx++)
>-          if ((cxn = host->connections[idx]) != host->notThisCxn) {
>+          if ((cxn = host->connections[idx]) != 
>host->notThisCxn && cxn != NULL) {
>             if (!host->cxnActive [idx]) {
>               if (!host->cxnSleeping [idx]) {
>                 if (cxnTakeArticle (cxn, extraRef)) {
>@@ -1752,7 +1752,7 @@
>           {
>             if (host->cxnActive [idx] &&
>                 (cxn = host->connections[idx]) != host->notThisCxn &&
>-                cxnTakeArticle (cxn, extraRef)) {
>+                cxn != NULL && cxnTakeArticle (cxn, extraRef)) {
>               unsigned int queue = 
> host->params->maxChecks - cxnQueueSpace (cxn) - 1;
>               if (queue == 0) host->gNoQueue++ ;
>               else            host->gCxnQueue += queue ;
>@@ -1763,7 +1763,7 @@
>         /* Wasn't taken so try to give it to 
> one of the waiting connections. */
>         for (idx = 0 ; idx < host->maxConnections ; idx++)
>           if (!host->cxnActive [idx] && !host->cxnSleeping [idx] &&
>-              (cxn = host->connections[idx]) != host->notThisCxn)
>+              (cxn = host->connections[idx]) != 
>host->notThisCxn && cxn != NULL)
>             {
>               if (cxnTakeArticle (cxn, extraRef)) {
>                 unsigned int queue = 
> host->params->maxChecks - cxnQueueSpace (cxn) - 1;





More information about the inn-workers mailing list