Some more analysis here - https://pastebin.com/3suxjqEX

It seems like iLen is somehow -1, still entering the while loop
though, with while(-1)? Could this bug be due to a blank pRes string?

Regards,
Nikhil.

On Fri, 9 Dec 2022 at 15:44, Nikhil Kshirsagar <nkshirsa...@gmail.com> wrote:
>
> Hello,
>
> may I please check with the list about an rsyslogd segmentation fault
> seen on the following OS: Ubuntu 16.04.5 running Kernel:
> 4.15.0-55-generic, the rsyslog package version is 8.16.0-1ubuntu3. The
> stack trace looks like,
>
> warning: Could not load shared library symbols for
> /lib/x86_64-linux-gnu/libnss_sss.so.2.
> Do you need "set solib-search-path" or "set sysroot"?
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
> Core was generated by `/usr/sbin/rsyslogd -n'.
> Program terminated with signal SIGSEGV, Segmentation fault.
>
> warning: Unexpected size of section `.reg-xstate/90732' in core file.
> #0  MsgGetProp (pMsg=pMsg@entry=0x7fb4f800a350,
> pTpe=pTpe@entry=0xd7f100, pProp=pProp@entry=0xd7f120,
> pPropLen=pPropLen@entry=0x7fb4fecec96c,
> pbMustBeFreed=pbMustBeFreed@entry=0x7fb4fecec96a,
>     ttNow=ttNow@entry=0x7fb4fececa40) at msg.c:3843
> 3843 msg.c: No such file or directory.
> [Current thread is 1 (Thread 0x7fb4feced700 (LWP 90732))]
> (gdb) bt
> #0  MsgGetProp (pMsg=pMsg@entry=0x7fb4f800a350,
> pTpe=pTpe@entry=0xd7f100, pProp=pProp@entry=0xd7f120,
> pPropLen=pPropLen@entry=0x7fb4fecec96c,
> pbMustBeFreed=pbMustBeFreed@entry=0x7fb4fecec96a,
>     ttNow=ttNow@entry=0x7fb4fececa40) at msg.c:3843
> #1  0x00000000004409e4 in tplToString (pTpl=0xd7f090,
> pMsg=pMsg@entry=0x7fb4f800a350, iparam=iparam@entry=0x7fb4f4010e80,
> ttNow=ttNow@entry=0x7fb4fececa40) at ../template.c:195
> #2  0x000000000043c53f in prepareDoActionParams (pWti=0xd6e390,
> ttNow=0x7fb4fececa40, pMsg=0x7fb4f800a350, pAction=0xd7d850) at
> ../action.c:936
> #3  processMsgMain (pAction=pAction@entry=0xd7d850,
> pWti=pWti@entry=0xd6e390, pMsg=pMsg@entry=0x7fb4f800a350,
> ttNow=ttNow@entry=0x7fb4fececa40) at ../action.c:1302
> #4  0x000000000043cab4 in doSubmitToActionQ (pAction=0xd7d850,
> pWti=0xd6e390, pMsg=0x7fb4f800a350) at ../action.c:1472
> #5  0x0000000000435d2d in execAct (stmt=0xd7f1c0, pWti=0xd6e390,
> pMsg=0x7fb4f800a350) at ruleset.c:202
> #6  scriptExec (root=<optimized out>, pMsg=pMsg@entry=0x7fb4f800a350,
> pWti=pWti@entry=0xd6e390) at ruleset.c:455
> #7  0x0000000000435d9b in execPRIFILT (pWti=<optimized out>,
> pMsg=<optimized out>, stmt=<optimized out>) at ruleset.c:315
> #8  scriptExec (root=<optimized out>, pMsg=pMsg@entry=0x7fb4f800a350,
> pWti=pWti@entry=0xd6e390) at ruleset.c:473
> #9  0x00000000004363b4 in processBatch (pBatch=0xd6e3c0,
> pWti=0xd6e390) at ruleset.c:509
> #10 0x0000000000444f1c in msgConsumer (notNeeded=<optimized out>,
> pBatch=0xd6e3c0, pWti=0xd6e390) at rsyslogd.c:579
> #11 0x0000000000431e53 in ConsumerReg (pThis=0xd743b0, pWti=0xd6e390)
> at queue.c:1898
> #12 0x000000000042eb9e in wtiWorker (pThis=pThis@entry=0xd6e390) at wti.c:334
> #13 0x000000000042dbac in wtpWorker (arg=0xd6e390) at wtp.c:389
> #14 0x00007fb50272c6ba in start_thread (arg=0x7fb4feced700) at
> pthread_create.c:333
> #15 0x00007fb501a4241d in iopl () at ../sysdeps/unix/syscall-template.S:84
> #16 0x0000000000000000 in ?? ()
> (gdb)
>
>
> I've put up the information I can analyse through gdb here -
> https://pastebin.com/CQeHiMU8
>
> Please could anyone on the list help me understand if this is a known
> issue and already fixed in later versions, I would be very grateful
> for inputs. I am going through the devel runtime/msg.c code to see
> potential segfaults and I see several been fixed since this version
> but none that obviously are the fix to this issue, so I was not sure
> about that.
>
> Regards,
> nikhil.
_______________________________________________
rsyslog mailing list
https://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.

Reply via email to