summaryrefslogtreecommitdiffstats
path: root/runtime/wti.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'v6-stable'Rainer Gerhards2012-08-251-2/+2
|\ | | | | | | | | | | | | | | Conflicts: ChangeLog configure.ac runtime/ruleset.c tools/syslogd.c
| * changed TRUE/FALSE to RSTRUE/RSFALSERainer Gerhards2012-08-221-2/+2
| | | | | | | | This is done to prevent name claches with libraries.
| * Merge branch 'v5-stable-newstats' into v5-develRainer Gerhards2012-03-121-0/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: ChangeLog action.c configure.ac doc/imuxsock.html doc/manual.html runtime/queue.c
| * \ Merge branch 'v5-stable-newstats' into v5-develRainer Gerhards2012-01-161-16/+14
| |\ \ | | | | | | | | | | | | | | | | Conflicts: plugins/imtcp/imtcp.c
* | | | added --enable-debugless configure option for very high demanding environmentsRainer Gerhards2012-05-291-8/+8
| | | | | | | | | | | | | | | | | | | | This actually at compile time disables a lot of debug code, resulting in some speedup (but serious loss of debugging capabilities)
* | | | Merge branch 'v6-stable'Rainer Gerhards2012-03-121-0/+2
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | Conflicts: runtime/queue.c
| * | | bugfix: stopped DA queue was never processed after a restartRainer Gerhards2012-03-121-0/+2
| | |/ | |/| | | | | | | ...due to a regression from statistics module.
* | | Merge branch 'v5-stable' into masterRainer Gerhards2012-01-181-16/+14
|\| | | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: ChangeLog action.h configure.ac doc/manual.html plugins/immark/immark.c plugins/impstats/impstats.c plugins/imptcp/imptcp.c plugins/imtcp/imtcp.c runtime/cfsysline.c runtime/cfsysline.h runtime/conf.c runtime/ctok.c runtime/ctok.h runtime/ctok_token.c runtime/ctok_token.h runtime/dnscache.h runtime/expr.c runtime/expr.h runtime/rule.c runtime/rule.h runtime/ruleset.h runtime/sysvar.c runtime/vm.h runtime/vmop.c runtime/vmop.h runtime/vmprg.c runtime/vmprg.h runtime/vmstk.c runtime/vmstk.h tools/omusrmsg.c
| * Merge branch 'v4-stable' into v5-stableRainer Gerhards2012-01-161-16/+14
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: runtime/debug.h runtime/obj.c runtime/parser.h runtime/wti.h
| | * license changesRainer Gerhards2012-01-161-16/+14
| | |
* | | better handling of queue i/o errors in disk queues.Rainer Gerhards2011-05-031-1/+4
|/ / | | | | | | | | | | | | | | This is kind of a bugfix, but a very intrusive one, thus it goes into the devel version first. Right now, "file not found" is handled and leads to the new emergency mode, in which disk action is stopped and the queue run in direct mode. An error message is emited if this happens.
* | milestone(BUGGY): batch now pushed down to actionRainer Gerhards2010-06-151-2/+2
| | | | | | | | | | | | | | 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.
* | fixed race conditions during queue shutdown (DA case, disks active)Rainer Gerhards2010-05-181-7/+5
| |
* | added new cancel-reduced action thread termination methodRainer Gerhards2010-05-171-0/+32
| | | | | | | | | | | | | | | | We now manage to cancel threads that block inside a retry loop to terminate without the need to cancel the thread. Avoiding cancellation helps keep the system complexity minimal and thus provides for better stability. This also solves some issues with improper shutdown when inside an action retry loop.
* | small cleanupRainer Gerhards2010-05-101-5/+0
| |
* | adapted new atomic instruction emulation to v5 engineRainer Gerhards2010-04-271-7/+8
| | | | | | | | code did not compile after merge from v4
* | Merge branch 'v4-devel' into masterRainer Gerhards2010-04-271-0/+3
|\| | | | | | | | | | | | | | | | | | | | | | | 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-5/+6
| | | | | | | | | | | | 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.
| * calls to prctl() need to be based on configure results (cross-platform issue)Rainer Gerhards2009-07-161-1/+0
| | | | | | | | | | This is for another prctl() call, not present in the beta version (looks like it would make sense to stick these into a utility function)
| * improvements/fixes in queue termination timeout handlingRainer Gerhards2009-06-251-2/+4
| | | | | | | | | | | | | | | | - bugfix: subtle (and usually irrelevant) issue in timout processing timeout could be one second too early if nanoseconds wrapped - set a more sensible timeout for shutdow, now 1.5 seconds to complete processing (this also removes those cases where the shutdown message was not written because the termination happened before it)
* | replaced data type "bool" by "sbool" because this created some portability ↵Rainer Gerhards2010-02-021-2/+2
| | | | | | | | issues
* | some cleanupRainer Gerhards2009-10-271-3/+1
| |
* | fixed race condition during queue shutdownRainer Gerhards2009-10-271-4/+9
| | | | | | | | | | | | | | | | 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.
* | addressed some race issues during queue shutdownRainer Gerhards2009-10-261-0/+2
| | | | | | | | | | | | | | 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.
* | enhanced test environment (including testbench)Rainer Gerhards2009-10-221-1/+1
| | | | | | | | | | | | | | | | 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.
* | new queue engine - initial commit (probably not 100% working!)Rainer Gerhards2009-10-141-31/+3
| | | | | | | | | | | | | | | | | | | | 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-0/+15
| | | | | | | | ... non-working version!
* | bugfix and testbench improvementsRainer Gerhards2009-10-071-3/+12
| | | | | | | | | | | | | | | | - 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: potential race condition when queue worker threads were terminatedRainer Gerhards2009-10-061-1/+10
| |
* | simplified startup of queue DA modeRainer Gerhards2009-07-201-2/+0
| |
* | solved potential race condition and some cleanupRainer Gerhards2009-07-201-0/+2
| | | | | | | | | | | | | | code review brought up some few places where we may have run into a race. They have most probably been introduced during the recent set of changes. But I do not look at older versions because of the changed architecture, one can not simply backport this patch.
* | bugfix: minor static memory leak while reading configurationRainer Gerhards2009-07-201-5/+2
| | | | | | | | | | This did NOT leak based on message volume. Also, did some cleanup during the commit.
* | enhanced worker thread pool by atomic opsRainer Gerhards2009-07-201-5/+7
| | | | | | | | | | ... greater performance and was able to remove a potential troublespot in a cancel cleanup handler.
* | architecture change: queue now always has at least one worker threadRainer Gerhards2009-07-201-1/+13
| | | | | | | | | | | | ...if not running in direct mode. Previous versions could run without any active workers. This simplifies the code at a very small expense. See v5 compatibility note document for more in-depth discussion.
* | removed mutex locksRainer Gerhards2009-07-171-1/+1
| | | | | | | | | | ... by utilizing that we need to modify a state variable only in a sequential way during shutdown.
* | further code simplificationRainer Gerhards2009-07-171-101/+24
| | | | | | | | | | | | | | | | | | ... could even remove one mutex by using a better algorithm. I think I also spotted some situation in which a hang could have happened. As I can't fix it in v4 and less without moving to the new engine, I make no effort in testing this out. Hangs occur during shutdown, only (if at all). The code changes should also result in some mild performance improvement. Some bug potential, but overall the bug potential should have been greatly reduced.
* | more code simplification, should also bring some performance enhancementRainer Gerhards2009-07-171-12/+10
| | | | | | | | reducing the number of thread cancellation state changes
* | some code simplificationRainer Gerhards2009-07-161-8/+6
| |
* | Merge branch 'detached' into masterRainer Gerhards2009-07-151-108/+11
|\ \ | | | | | | | | | | | | Conflicts: tests/nettester.c
| * | further reduction in code size/complexity due to design changeRainer Gerhards2009-07-081-5/+0
| | |
| * | simplified worker thread handlingRainer Gerhards2009-07-081-103/+11
| | | | | | | | | | | | | | | based on now working with detached threads. This is probably the biggest patch in this series and with large bug potential.
* | | some more (very mild) cleanupRainer Gerhards2009-07-151-1/+0
|/ /
* | optimizing queue thread handlingRainer Gerhards2009-07-081-2/+2
| | | | | | | | | | | | ... first commit in a series of more. Makes worker threads detached. Needs more testing (will be done soon) and if it works as expected, we can further reduce code.
* | improvements/fixes in queue termination timeout handlingRainer Gerhards2009-06-251-2/+6
| | | | | | | | | | | | | | | | - bugfix: subtle (and usually irrelevant) issue in timout processing timeout could be one second too early if nanoseconds wrapped - set a more sensible timeout for shutdow, now 1.5 seconds to complete processing (this also removes those cases where the shutdown message was not written because the termination happened before it)
* | Merge branch 'master' into v5-develRainer Gerhards2009-06-251-2/+5
|\| | | | | | | | | | | Conflicts: runtime/atomic.h runtime/wti.c
| * some memory accesses are now explicitely atomicRainer Gerhards2009-06-251-9/+17
| | | | | | | | | | ... as far as I think this mostly is to keep the thread debuggers happy
* | added a few atomic operationsRainer Gerhards2009-06-251-10/+14
| | | | | | | | | | mostly to get thread debugger errors clean (plus, of course, it makes things more deterministic)
* | bugfix: mutex was sometimes released when not being heldRainer Gerhards2009-06-241-4/+8
| |
* | Merge branch 'omfile' into tmpRainer Gerhards2009-06-221-13/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was a complex manual merge, especially in action.c. So if there occur some problems, this would be a good point to start troubleshooting. I run a couple of tests before commiting and they all went well. Conflicts: action.c action.h runtime/queue.c runtime/queue.h runtime/wti.c runtime/wti.h
| * removed pthread_testcancel() as it is no longer necessaryRainer Gerhards2009-06-191-22/+0
| | | | | | | | | | | | | | we usually stay long enough inside the actions, so there should be no problem with reaching a cancellation point. Actually, if we really need to cancel, the thread is in an output action (otherwise it would have willingly terminated).