Can you please run this with valgrind and share its output on crash? -- Regards, Janmejay
PS: Please blame the typos in this mail on my phone's uncivilized soft keyboard sporting it's not-so-smart-assist technology. On Mar 19, 2015 11:10 PM, "chenlin rao" <rao.chen...@gmail.com> wrote: > Hello everyone. > > I just learnt a foreach syntax from `src/tests/json_array_looping.sh`, so I > try to parse my logdata(yes, long json array in msg) as follow: > > ``` > > $MaxMessageSize 256k > > template( name="local6JsonArray" type="string" string="%$.line%\n" ) > > Ruleset( name="forwardRuleSetJsonArray" ) > > { > > action( type="mmjsonparse" ) > > foreach ($.line in $!msg) do { > > action ( type="omfile" file="/data0/logfile" > template="local6JsonArray") > } > } > ``` > > But I always got segment fault after restarted few minutes. > > Before the rsyslogd died , I can watch some correct lines in the > "/data0/logfile". > > While running `rsyslogd -dn`, I watch the last five lines were: > > ``` > > 3295.820218609:main Q:Reg/w0 : FOREACH .line IN > > 3295.820227632:main Q:Reg/w0 : var '!msg' > > 3295.820240109:main Q:Reg/w0 : eval expr 0x7fe2044fefa0, type 'V[86]' > > 3295.821747011:main Q:Reg/w0 : rainerscript: var 200:!msg: '{"msg":[{ > "end_time":"142...longmsghere....\"verieval expr 0x7fe2044fefa0, return > datatype 'J' > ``` > > The length of such line is about 20k~30k, far away below my > $MaxMessageSize. > > So, why rsyslogd segment fault? > _______________________________________________ > 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. > _______________________________________________ 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.