summaryrefslogtreecommitdiffstats
path: root/runtime/queue.c
Commit message (Collapse)AuthorAgeFilesLines
* removed debug code from action.c and runtime/queue.c after testingAndre Lorbach2011-08-181-4/+0
|
* bugfix: fixed incorrect state handling for Discard Action (transactions)Andre Lorbach2011-08-181-0/+13
|
* bugfix: mutex was invalidly left unlocked during action processingv5.8.2Rainer Gerhards2011-06-211-4/+8
| | | | | | | | | At least one case where this can occur is during thread shutdown, which may be initiated by lower activity. In most cases, this is quite unlikely to happen. However, if it does, data structures may be corrupted which could lead to fatal failure and segfault. I detected this via a testbench test, not a user report. But I assume that some users may have had unreproducable aborts that were cause by this bug.
* Merge branch 'v4-stable' into v5-stableRainer Gerhards2011-05-111-1/+5
|\ | | | | | | | | Conflicts: runtime/queue.c
| * bugfix: invalid processing in QUEUE_FULL conditionRainer Gerhards2011-05-111-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | If the the multi-submit interface was used and a QUEUE_FULL condition occured, the failed message was properly destructed. However, the rest of the input batch, if it existed, was not processed. So this lead to potential loss of messages and a memory leak. The potential loss of messages was IMHO minor, because they would have been dropped in most cases due to the queue remaining full, but very few lucky ones from the batch may have made it. Anyhow, this has now been changed so that the rest of the batch is properly tried to be enqueued and, if not possible, destructed.
| * some cleanup based on clang static analyzer resultsRainer Gerhards2010-12-161-3/+2
| |
* | stop adding data to DA queue when low watermark has been reachedRainer Gerhards2011-03-301-0/+4
| | | | | | | | | | potentially closes: http://bugzilla.adiscon.com/show_bug.cgi?id=241 But needs more verification.
* | Merge branch 'v5-stable' into v5-betaRainer Gerhards2011-02-251-0/+5
|\ \ | | | | | | | | | | | | Conflicts: ChangeLog
| * | bugfix: memory leak when $RepeatedMsgReduction on was usedRainer Gerhards2011-02-251-0/+5
| | | | | | | | | | | | bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=225
* | | bugfix: very long running actions could prevent shutdown under some ↵Rainer Gerhards2011-02-111-1/+1
| | | | | | | | | | | | | | | | | | circumstances This has now been solved, at least for common situations.
* | | removed no longer needed codeRainer Gerhards2011-02-111-2/+0
| | |
* | | bugfix: queue engine did not properly slow down inputs in FULL_DELAY mode...Rainer Gerhards2011-02-111-1/+12
| | | | | | | | | | | | | | | | | | ...when in disk-assisted mode. This especially affected imfile, which created unnecessarily queue files if a large set of input file data was to process.
* | | Merge branch 'v5-stable' into v5-develRainer Gerhards2010-12-171-1/+1
|\| | | | | | | | | | | | | | | | | | | | Conflicts: ChangeLog configure.ac doc/manual.html
| * | bugfix: batch processing flagged invalid message as "bad" under some ↵Rainer Gerhards2010-12-161-1/+1
| | | | | | | | | | | | | | | | | | circumstances also fixed some cosmetic nits
* | | improved statistics-gathering subsystemRainer Gerhards2010-09-131-0/+32
|/ / | | | | | | | | | | | | | | ... well, actually this is a first real implementation of this subsystem. I have added a counter registry, a way to access the countres (as readable string) and a way to define and maintem them. Also, module impstats has been updated to utilize the new system. Finally, I added some counters. I hope that this sets the baseline for useful future enhancements.
* | fixed a couple of regressionsRainer Gerhards2010-06-231-1/+6
| | | | | | | | | | | | | | | | by implementing some code that was missing so far ;) as well as finding some real bugs. I also did some general cleanup, removing debug strings and such. This code should be fairly OK to use, except when "exec only when previous action was suspended" is used -- this is NOT yet re-implemented in the tuned engine.
* | milestone(BUGGY): batch now pushed down to actionRainer Gerhards2010-06-151-2/+39
| | | | | | | | | | | | | | at least in important cases (not for non-direct action queues and some other minor things). This version is definitely buggy, but may be tried with success on a non-production system. I will continue to work on the correctness, but needed to commit now to get a baseline.
* | somewhat improved direct mode queue performanceRainer Gerhards2010-06-091-17/+38
| | | | | | | | | | ... but only for batch enqueues. This will not help much with the current code, but will play well with upcoming changes.
* | fixed race conditions during queue shutdown (DA case, disks active)Rainer Gerhards2010-05-181-2/+16
| |
* | adapted new atomic instruction emulation to v5 engineRainer Gerhards2010-04-271-5/+7
| | | | | | | | code did not compile after merge from v4
* | Merge branch 'v4-devel' into masterRainer Gerhards2010-04-271-2/+6
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: runtime/Makefile.am runtime/atomic.h runtime/queue.c runtime/queue.h runtime/wti.c runtime/wti.h runtime/wtp.c runtime/wtp.h
| * | bugfix: problems with atomic operations emulationRainer Gerhards2010-04-271-3/+7
| |/ | | | | | | | | | | replaced atomic operation emulation with new code. The previous code seemed to have some issue and also limited concurrency severely. The whole atomic operation emulation has been rewritten.
| * did some adoptions necessary to use the bugfix with v4-beta code baseRainer Gerhards2010-01-261-6/+6
| |
| * Merge branch 'queuepatch' into v4-betanewRainer Gerhards2010-01-261-10/+15
| |\ | | | | | | | | | | | | Conflicts: runtime/queue.c
| | * bugfixes for potential segfaults during queue shutdownvarmojfekoj2010-01-261-9/+14
| | | | | | | | | | | | | | | | | | (bugs require certain non-standard settings to appear) Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
* | | some light performance enhancementRainer Gerhards2009-11-121-1/+4
| | | | | | | | | | | | | | | ...by replacing time() call with much faster (at least under linux) gettimeofday() calls.
* | | moved rfc3164/5424 code to new parser modulesRainer Gerhards2009-11-041-6/+3
| | | | | | | | | | | | | | | | | | another milestone commit: the program works, the new interface is used, some more cleanup is needed and the per-ruleset config options are still missing. But we are getting closer...
* | | one step closer to dynamically loadable parsersRainer Gerhards2009-11-031-1/+0
| | | | | | | | | | | | | | | This is a milestone commit, which adds new code that breaks nothing, but also does not add any visible change. Just prep work...
* | | removed no longer needed flag variableRainer Gerhards2009-10-271-10/+6
| | |
* | | fix compile bug with last commitRainer Gerhards2009-10-271-1/+0
| | |
* | | some cleanupRainer Gerhards2009-10-271-72/+0
| | |
* | | fixed race condition during queue shutdownRainer Gerhards2009-10-271-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | Problems could happen if the queue worker needed to be cancelled and this cancellation happened inside queue-code (including wtp, wti). We have now solved this by disabling cancellation while in this code and only enabling it when working inside the user consumer. This exactly matches the use case for which cancellation may be needed.
* | | shuffled cancelability state to different spotRainer Gerhards2009-10-261-3/+8
| | | | | | | | | | | | ... but in anticipation of changing cancel processing altogether...
* | | addressed some race issues during queue shutdownRainer Gerhards2009-10-261-14/+20
| | | | | | | | | | | | | | | | | | | | | these occured in very unusual scenarios where we had a DA-queue running in parallel and very lengthy actions. Then, in some situations, the shutdown could hang. The code needs some addition lab time, but is believed to be much better than any previous version.
* | | Merge branch 'master' into queuePartialDeleteBatchesRainer Gerhards2009-10-261-1/+5
|\ \ \
| * | | bugfix: potential abort if inputname property was not setRainer Gerhards2009-10-261-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | primarily a problem of imdiag. Also added some fix for a potential situation during cancel processing. That one is not considered vital and may later be removed again.
* | | | implemented solution for cancel at shutdown/unprocessed entriesRainer Gerhards2009-10-261-35/+23
| | | | | | | | | | | | | | | | | | | | We do now enqueue those objects that are left unprocessed. This enables us to delete the full batch, what is exactly what we need to do.
* | | | Begun to work on partial batch deletes...Rainer Gerhards2009-10-221-9/+21
|/ / / | | | | | | | | | | | | | | | | | | | | | ... but this brings a lot of problems with it. The issue is that we still have a sequential store and we do not know how we could delete the one entry right in the middle of processing. I keep this branch if we intend to move on with it - but for now I look into a different solution...
* | | enhanced test environment (including testbench)Rainer Gerhards2009-10-221-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | support for enhancing probability of memory addressing failure by using non-NULL default value for malloced memory (optional, only if requested by configure option). This helps to track down some otherwise undetected issues within the testbench and is expected to be very useful in the future.
* | | Merge branch 'newqueue'Rainer Gerhards2009-10-211-397/+108
|\ \ \ | | | | | | | | | | | | | | | | | | | | Conflicts: ChangeLog runtime/queue.c
| * | | bugfix: message processing states were not set correctly in all casesRainer Gerhards2009-10-191-13/+4
| | | | | | | | | | | | | | | | | | | | | | | | however, this had no negative effect, as the message processing state was not evaluated when a batch was deleted, and that was the only case where the state could be wrong.
| * | | new queue engine - initial commit (probably not 100% working!)Rainer Gerhards2009-10-141-408/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | simplified and thus speeded up the queue engine, also fixed some potential race conditions (in very unusual shutdown conditions) along the way. The threading model has seriously changes, so there may be some regressions. NOTE: the code passed basic tests, but there is still more work and testing to be done. This commit should be treated with care.
| * | | added some debug settings plus improved shutdown sequenceRainer Gerhards2009-10-131-12/+39
| | | | | | | | | | | | | | | | ... non-working version!
* | | | bugfix: segfault when starting up with an invalid .qi file for a disk queueRainer Gerhards2009-10-201-5/+16
|/ / / | | | | | | | | | | | | Failed for both pure disk as well as DA queues. Now, we emit an error message and disable disk queueing facility.
* | | bugfix and testbench improvementsRainer Gerhards2009-10-071-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | - bugfix: solved potential (temporary) stall of messages when the queue was almost empty and few new data added (caused testbench to sometimes hang!) - fixed some race condition in testbench - added more elaborate diagnostics to parts of the testbench - solved a potential race inside the queue engine
* | | bugfix and testbench improvementRainer Gerhards2009-10-071-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | made shutdown more reliable by makeing sure that the main queue DA worker is only cancelled if this is actually unavoidable. Also moved down the deletion of rsyslogd's pid file to immediately before termination, so that absence of the file is a proper indication that rsyslogd has finished (in the past, e.g. the testbench accidently ran two intances as the pid file was deleted too early). Also some improvments to the testbench, namely to handle aborts more intelligently (but still not perfect).
* | | reduced number of debug messages a bit againRainer Gerhards2009-08-261-2/+0
| | |
* | | bugfix: discard action did not work (did not discard messages)Rainer Gerhards2009-07-301-0/+2
| | |
* | | cleanup & better debug message handlingRainer Gerhards2009-07-201-66/+65
| | | | | | | | | | | | | | | | | | the new handling will hopefully spare a few cycles, as function calls (and most importantly parameter generation!) or now only done when debug messages are actually active.
* | | corrected some conditions & one more simplificationRainer Gerhards2009-07-201-15/+3
| | |