On 08/21/2017 12:03 PM, Andreas Wehrmann via rsyslog wrote:
So, I was able to make some progress in the meantime:
I turned off compiler optimizations and rsyslog doesn't crash anymore
though I have yet to figure out, what optimization breaks the program.
Nevertheless, an issue remains:
When rsyslog cannot connect to a remote host (because the port is
closed),
(one of) the worker threads goes into an endless loop clogging the
CPU, the following lines repeat over and over:
5839.355962950:main Q:Reg/w0 : omrelp.c: omrelp: shutdownImmediate
ptr now is 0x800a11e8
5839.356130840:main Q:Reg/w0 : ../action.c: doTransaction: action 0,
processing msg -1, result -2123
5839.356323210:main Q:Reg/w0 : ../action.c: actionTryResume: action
0x800a4180 state: susp, next retry (if applicable): 966135869 [now
966135839]
I traced it down to doTransaction() in action.c.
for(i = 0 ; i < wrkrInfo->p.tx.currIParam ; ++i) {
/* Note: we provide the message's base iparam -
actionProcessMessage()
* uses this as *base* address.
*/
iRet = actionProcessMessage(pThis,
&actParam(wrkrInfo->p.tx.iparams, pThis->iNumTpls, i, 0),
pWti);
if(iRet != RS_RET_DEFER_COMMIT && iRet !=
RS_RET_PREVIOUS_COMMITTED &&
iRet != RS_RET_OK)
--i; /* we need to re-submit */
DBGPRINTF("doTransaction: action %d, processing msg %d, result %d\n",
pThis->iActionNbr, i,iRet);
}
actionProcessMessage() always returns RS_RET_ACTION_FAILED (which is
-2123),
meaning i will be decremented for re-submit and the loop starts all
over again.
Best regards,
Andreas
So I ultimately traced it down to this change:
https://github.com/rsyslog/rsyslog/commit/128214fffac7dcec69b5c8dffdb8222bbd29af27
Reverting this makes everything seem to work as expected,
though it probably introduces the bug it was supposed to fix...
Regards,
Andreas
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE
THAT.