Hey all,
I'm working on the riemann module, and I've hit a problem.
I'm trying to use MsgGetProp to fetch data from the incoming message, in
the same way as ommongodb, but I'm getting a segfault during the obj_type
check.
BEGINdoAction_NoStrings
CODESTARTdoAction
uchar* propVal;
msgPropDescr_t propinfo;
short unsigned fieldfree;
rs_size_t fieldlen;
pthread_mutex_lock(&mutDoAct);
propinfo.id = PROP_HOSTNAME;
dbgprintf("ho ho. reproduce\n");
// explodes here.
propVal = MsgGetProp(pMsgData, NULL, &propinfo, &fieldlen, &fieldfree,
NULL);
dbgprintf("got it\n");
finalize_it:
pthread_mutex_unlock(&mutDoAct);
ENDdoAction
Narrowing it down further:
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `rsyslogd -dn -f test-conf/rsyslog-segfault.conf'.
Program terminated with signal 11, Segmentation fault.
#0 0x000000000043b263 in GetString (pThis=0x69d3ac <Debug>,
ppsz=0x7fdf7ef3b898, plen=0x7fdf7ef3b894) at prop.c:108
108 ISOBJ_TYPE_assert(pThis, prop);
(gdb) backtrace
#0 0x000000000043b263 in GetString (pThis=0x69d3ac <Debug>,
ppsz=0x7fdf7ef3b898, plen=0x7fdf7ef3b894) at prop.c:108
#1 0x000000000041a454 in getHOSTNAME (pM=0x7fdf7ef3b9f0) at msg.c:2489
#2 0x000000000041c7b8 in MsgGetProp (pMsg=pMsg@entry=0x7fdf7ef3b9f0,
pTpe=pTpe@entry=0x0, pProp=pProp@entry=0x7fdf7ef3b9b0,
pPropLen=pPropLen@entry=0x7fdf7ef3b9ac,
pbMustBeFreed=pbMustBeFreed@entry=0x7fdf7ef3b9aa,
ttNow=ttNow@entry=0x0)
at msg.c:3408
#3 0x00007fdf828c97f9 in doAction (pMsgData=0x7fdf7ef3b9f0,
pWrkrData=0x7fdf70002080) at omriemann.c:179
#4 0x0000000000440c54 in actionCallDoAction (pWti=0x8644d0,
iparams=<optimized out>, pThis=0x861d30) at ../action.c:1131
Any idea how I can start debugging this? It seems like the prop_t that's
setup by resolvedns is not properly initialized?
-- Bob.
_______________________________________________
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.