CMK-343

TitleCMC robuster gegen kaputte Logeintraege machen (SEGV verhindern)
ComponentMicrocore & Livestatus
Date2018-02-20
StateNew
ClassBug


Bei sixt gab es CMC-Coredumps: lag an einem Logeintrag, der abgeschnitten war und so vom CMC nicht ordentlich geparst werden konnte. Wir muessten also entweder das Parsing robuster machen, oder z.b. beim Starten des Core gucken, ob das letzte Zeichen in der history ein \n ist und ggf. eines ergaenzen. Core was generated by `/omd/sites/cmk/bin/cmc /omd/sites/cmk/var/check_mk/core/config'. Program terminated with signal 11, Segmentation fault. #0 0x00007f340ca5357f in __strlen_sse42 () from /lib64/libc.so.6 Missing separate debuginfos, use: debuginfo-install omd-2015.01.26.mk-rh65-34.x86_64 (gdb) bt #0 0x00007f340ca5357f in __strlen_sse42 () from /lib64/libc.so.6 #1 0x000000000046e6c4 in LogEntry::serviceStateToInt (s=0x0) at LogEntry.cc:409 #2 0x000000000046e339 in LogEntry::handleNotificationEntry (this=0x7f33fd34b440) at LogEntry.cc:313 #3 0x000000000046d756 in LogEntry::LogEntry (this=0x7f33fd34b440, lineno=968069, line=0x427baf8 "[1426851812] SERVICE NOTIFICATION: m3670;shadow;Check_MK;WARNI[1426852015] LOG VERSION: 2.0\n") at LogEntry.cc:73 #4 0x000000000046f4b0 in Logfile::processLogLine (this=0x427ba90, lineno=968069, logclasses=8) at Logfile.cc:185 #5 0x000000000046ed1b in Logfile::loadRange (this=0x427ba90, file=0x7f33fc713520, missing_types=8, logcache=0x4263198, since=1419320902, until=1427096903, logclasses=8) at Logfile.cc:160 #6 0x000000000046ec5e in Logfile::load (this=0x427ba90, logcache=0x4263198, since=1419320902, until=1427096903, logclasses=8) at Logfile.cc:144 #7 0x000000000046f034 in Logfile::answerQueryReverse (this=0x427ba90, query=0x7f340d85bbe0, logcache=0x4263198, since=1419320902, until=1427096903, logclasses=8) at Logfile.cc:236 #8 0x0000000000472028 in TableLog::answerQuery (this=0x4263438, query=0x7f340d85bbe0) at TableLog.cc:157 #9 0x00000000004359c1 in Store::answerGetRequest (this=, input=0x433b350, output=0x434b3c8, tablename=0x7f33fc0165dc "log") at Store.cc:154 #10 0x000000000041eadf in LivestatusThread::answerRequest (this=, input=0x433b350, output=0x434b3c8) at LivestatusThread.cc:150 #11 0x000000000041ede6 in handleClient (data=0x433b320) at LivestatusThread.cc:115 #12 run (data=0x433b320) at LivestatusThread.cc:102 #13 thread_run (data=0x433b320) at LivestatusThread.cc:49 #14 0x00007f340d45b9d1 in start_thread () from /lib64/libpthread.so.0 #15 0x00007f340ca088fd in clone () from /lib64/libc.so.6 (gdb)