Opened 14 years ago
Closed 14 years ago
#121 closed defect (fixed)
innfeed crashes after a failed assertion
Reported by: | Julien ÉLIE | Owned by: | eagle |
---|---|---|---|
Priority: | high | Milestone: | 2.5.0 |
Component: | innfeed | Version: | |
Severity: | normal | Keywords: | |
Cc: |
Description
A long-standing issue in innfeed which sometimes crashes with:
2009-01-04 19:39:50 innfeed: assertion -- cxn != NULL -- failed in file connection.c line 1171 2009-01-04 20:59:43 innfeed: assertion -- cxn != NULL -- failed in file connection.c line 1171
It comes from cxnCheckstate() in connection.c, called only once in host.c. We should check whether the connection is still here. It may not have been affected during a for loop. For instance, we have:
for (idx = 0 ; idx < host->maxConnections ; idx++) if (!host->cxnActive [idx] && !host->cxnSleeping [idx] && (cxn = host->connections[idx]) != host->notThisCxn)
We could have a case where all the connections to a host are inactive and sleeping. Therefore, cxn will still be NULL
and passed to cxnCheckstate().
Suggested patch:
Index: host.c =================================================================== --- host.c (révision 8263) +++ host.c (copie de travail) @@ -1783,7 +1783,7 @@ delArticle (extraRef) ; remArticle (article,&host->processed,&host->processedTail) ; - if (!cxnCheckstate (cxn)) + if (cxn == NULL || !cxnCheckstate (cxn)) { host->artsToTape++ ; host->gArtsToTape++ ;
Note: See
TracTickets for help on using
tickets.
(In [8276]) Fix an assertion failure in innfeed.
We have cases where all the connections to a host
are inactive and sleeping. Therefore, cxn is still NULL
and passed to cxnCheckstate().
Thanks to William Kronert for the bug report.
close #121