diff options
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | obj.c | 4 | ||||
-rw-r--r-- | queue.c | 1 | ||||
-rw-r--r-- | stream.c | 2 |
4 files changed, 14 insertions, 3 deletions
@@ -10,6 +10,16 @@ Version 3.11.6 (rgerhards), 2008-02-?? - bugfix: rsyslogd segfaulted on second SIGHUP tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=38 - improved stability of queuee engine +- bugfix: queue disk file were not properly persisted when + immediately after closing an output file rsyslog was stopped + or huped (the new output file open must NOT have happend at + that point) - this lead to a sparse and invalid queue file + which could cause several problems to the engine (unpredictable + results). This situation should have happened only in very + rare cases. tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=40 +- bugfix: imfile could abort under extreme stress conditions + (when it was terminated before it could open all of its + to be monitored files) - applied patch from varmojfekoj to fix an issue with compatibility mode and default module directories (many thanks!): I've also noticed a bug in the compatibility code; the problem is that @@ -460,8 +460,9 @@ static rsRetVal objDeserializeHeader(uchar *pszRecType, objID_t *poID, int* poVe /* and now we skip over the rest until the delemiting \n */ NEXTC; - while(c != '\n') + while(c != '\n') { NEXTC; + } *poID = (objID_t) ioID; *poVers = oVers; @@ -659,6 +660,7 @@ rsRetVal objDeserialize(void *ppObj, objID_t objTypeExpected, strm_t *pStrm, rsR iRetLocal = objDeserializeHeader((uchar*) "Obj", &oID, &oVers, pStrm); if(iRetLocal != RS_RET_OK) { dbgprintf("objDeserialize error %d during header processing - trying to recover\n", iRetLocal); +abort(); CHKiRet(objDeserializeTryRecover(pStrm)); } } while(iRetLocal != RS_RET_OK); @@ -1576,7 +1576,6 @@ queueRegOnWrkrShutdown(queue_t *pThis) wtpAdviseMaxWorkers(pThis->pqParent->pWtpDA, 1); /* reactivate DA worker (always 1) */ } -finalize_it: RETiRet; } @@ -137,6 +137,7 @@ static rsRetVal strmCloseFile(strm_t *pThis) unlink((char*) pThis->pszCurrFName); // TODO: check returncode } + pThis->iCurrOffs = 0; /* we are back at begin of file */ if(pThis->pszCurrFName != NULL) { free(pThis->pszCurrFName); /* no longer needed in any case (just for open) */ pThis->pszCurrFName = NULL; @@ -199,7 +200,6 @@ strmHandleEOFMonitor(strm_t *pThis) ABORT_FINALIZE(RS_RET_IO_ERROR); if(stat((char*) pThis->pszCurrFName, &statName) == -1) ABORT_FINALIZE(RS_RET_IO_ERROR); -//dbgoprint((obj_t*)pThis, "curr ino %d, new ino %d, curr offset %lld, new size %ld\n", statOpen.st_ino, statName.st_ino, pThis->iCurrOffs, statName.st_size); if(statOpen.st_ino == statName.st_ino && pThis->iCurrOffs == statName.st_size) { ABORT_FINALIZE(RS_RET_EOF); } else { |