Marcin,

another shot. I now concentrate on why the sleep in your config seems to return 
immediately. To do so, I have added some additional instrumentation. Please 
apply this patch:

diff --git a/runtime/srutils.c b/runtime/srutils.c
index a473c83..2cc58ad 100644
--- a/runtime/srutils.c
+++ b/runtime/srutils.c
@@ -486,7 +486,9 @@ srSleep(int iSeconds, int iuSeconds)
        BEGINfunc
        tvSelectTimeout.tv_sec = iSeconds;
        tvSelectTimeout.tv_usec = iuSeconds; /* micro seconds */
+dbgprintf("srSleep: enter, sec=%d, usec=%d\n", (int)tvSelectTimeout.tv_sec, (in
        select(0, NULL, NULL, NULL, &tvSelectTimeout);
+dbgprintf("srSleep: end,   sec=%d, usec=%d (was sec=%d, usec=%d)\n", (int)tvSel
        ENDfunc
 }

This should go on top of your already-patched version. Please give it a try and 
provide me the debug log. 

Thanks,
Rainer

> -----Original Message-----
> From: [email protected] [mailto:rsyslog-
> [email protected]] On Behalf Of Marcin Miroslaw
> Sent: Monday, June 04, 2012 1:59 PM
> To: [email protected]
> Subject: Re: [rsyslog] Adding message when rsyslogd terminates
> 
> W dniu 04.06.2012 13:08, Rainer Gerhards pisze:
> > Sorry, need more debug info. Can you add the dbgprintf below:
> >      */
> >     if(((Debug == DEBUG_FULL || NoFork) && bErrMsgToStderr) ||
> iConfigVerify) {
> >             if(LOG_PRI(pri) == LOG_ERR)
> >                     fprintf(stderr, "rsyslogd: %s\n", msg);
> >     }
> >
> >     if(bHaveMainQueue == 0) { /* not yet in queued mode */
> > dbgprintf("iminternalAddMsg() is callled\n");
> >             iminternalAddMsg(pMsg);
> >     } else {
> >                /* we have the queue, so we can simply provide the
> >              * message to the queue engine.
> >              */
> >             submitMsg(pMsg);
> >
> > It's after line 577 in the already patched code.
> 
> No problem. I've added another dbgprintf inside else statement "ELSE ,
> iminternalAddMsg() wasn't callled" - just in case.
> Unfortunatelly i'm applying patches manually but i'm trying to do
> carefully so i believe all are applied (5.8.11+fix from previous thread
> + srSleep(2,50) + two dbgprintf )
> Maybe i should run it under gdb?
_______________________________________________
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

Reply via email to