Repository navigation
.travis.yml: Test the merge/ prefixed branches on Travis CI too - #1
Merged
Merged
Conversation
Signed-off-by: Gergely Nagy <[email protected]>
Closed
bazsi
added a commit
that referenced
this pull request
Nov 17, 2015
There's a strict ordering requirement between suppress_lock and interacting with the main loop. The reason is that the main thread (running the main loop) sometimes acquires suppress_lock (at suppress timer expiration) and while blocking on suppress_lock it cannot service main_loop_calls() This patch makes it sure that ml_batched_timer_update/cancel calls are only done with the suppress lock released. If we do this, we might have a few unfortunate side effects due to races that this patch also tries to handle: Two messages race, one of these matches the recorded last message, the other doesn't. In this case, moving the update on the suppress_timer outside of the lock region might cause two different races: 1) matching message comes first, then non-matching This case the suppress_lock protected region decides that the suppress timer needs to fire (#1) and then the other decides that it needs to be cancelled. (#2) If these are processed in order, then we are the same as if the two was also protected by the mutex (which is ok) If they are reversed, e.g. we first cancels the timer and the second arms it, then we might have a timer wakeup which will find no suppressed messages to report (as the non-matching message will set last_msg_count to zero). This spurious wakeup should be handled by the expiration callback. 1) non-matching message comes first, then matching This is simply a message reordering case, e.g. we don't want any suppressions to be emitted. In this case the locked regions finds that neither messages matched the recorded one, thus both times they decide to cancel the timer, which is ok. Timer cancellation can be reordered as they will have the same effect anyway. Signed-off-by: Balazs Scheidler <[email protected]>
bazsi
added a commit
that referenced
this pull request
Nov 17, 2015
There's a strict ordering requirement between suppress_lock and interacting with the main loop. The reason is that the main thread (running the main loop) sometimes acquires suppress_lock (at suppress timer expiration) and while blocking on suppress_lock it cannot service main_loop_calls() This patch makes it sure that ml_batched_timer_update/cancel calls are only done with the suppress lock released. If we do this, we might have a few unfortunate side effects due to races that this patch also tries to handle: Two messages race, one of these matches the recorded last message, the other doesn't. In this case, moving the update on the suppress_timer outside of the lock region might cause two different races: 1) matching message comes first, then non-matching This case the suppress_lock protected region decides that the suppress timer needs to fire (#1) and then the other decides that it needs to be cancelled. (#2) If these are processed in order, then we are the same as if the two was also protected by the mutex (which is ok) If they are reversed, e.g. we first cancels the timer and the second arms it, then we might have a timer wakeup which will find no suppressed messages to report (as the non-matching message will set last_msg_count to zero). This spurious wakeup should be handled by the expiration callback. 1) non-matching message comes first, then matching This is simply a message reordering case, e.g. we don't want any suppressions to be emitted. In this case the locked regions finds that neither messages matched the recorded one, thus both times they decide to cancel the timer, which is ok. Timer cancellation can be reordered as they will have the same effect anyway. Signed-off-by: Balazs Scheidler <[email protected]>
MrAnno
referenced
this pull request
in MrAnno/syslog-ng
Feb 11, 2016
There's a strict ordering requirement between suppress_lock and interacting with the main loop. The reason is that the main thread (running the main loop) sometimes acquires suppress_lock (at suppress timer expiration) and while blocking on suppress_lock it cannot service main_loop_calls() This patch makes it sure that ml_batched_timer_update/cancel calls are only done with the suppress lock released. If we do this, we might have a few unfortunate side effects due to races that this patch also tries to handle: Two messages race, one of these matches the recorded last message, the other doesn't. In this case, moving the update on the suppress_timer outside of the lock region might cause two different races: 1) matching message comes first, then non-matching This case the suppress_lock protected region decides that the suppress timer needs to fire (#1) and then the other decides that it needs to be cancelled. (#2) If these are processed in order, then we are the same as if the two was also protected by the mutex (which is ok) If they are reversed, e.g. we first cancels the timer and the second arms it, then we might have a timer wakeup which will find no suppressed messages to report (as the non-matching message will set last_msg_count to zero). This spurious wakeup should be handled by the expiration callback. 1) non-matching message comes first, then matching This is simply a message reordering case, e.g. we don't want any suppressions to be emitted. In this case the locked regions finds that neither messages matched the recorded one, thus both times they decide to cancel the timer, which is ok. Timer cancellation can be reordered as they will have the same effect anyway. Signed-off-by: Balazs Scheidler <[email protected]>
bazsi
added a commit
that referenced
this pull request
Feb 21, 2016
syslog-ng was crashing in my development environment at startup if the systemd-journal() driver was used, in a backtrace like this: Program received signal SIGSEGV, Segmentation fault. g_module_symbol (module=0x6771b0, symbol_name=0x7ffff4942a65 "sd_journal_open", symbol=0x7ffff7f838f0 <sd_journal_open>) at /build/glib2.0-ajuDY6/glib2.0-2.46.1/./gmodule/gmodule.c:818 818 /build/glib2.0-ajuDY6/glib2.0-2.46.1/./gmodule/gmodule.c: No such file or directory. (gdb) bt #0 g_module_symbol (module=0x6771b0, symbol_name=0x7ffff4942a65 "sd_journal_open", symbol=0x7ffff7f838f0 <sd_journal_open>) at /build/glib2.0-ajuDY6/glib2.0-2.46.1/./gmodule/gmodule.c:818 #1 0x00007ffff493e6cd in load_journald_subsystem () at /home/bazsi/zwa/projects/syslog-ng-ose-3.6/source/syslog-ng/modules/systemd-journal/journald-subsystem.c:105 #2 0x00007ffff493cd0c in systemd_journal_module_init (cfg=0x63a2a0, args=0x0) at /home/bazsi/zwa/projects/syslog-ng-ose-3.6/source/syslog-ng/modules/systemd-journal/systemd-journal-plugin.c:44 #3 0x00007ffff7b4a9d3 in plugin_load_module (module_name=0x6572a0 "sdjournal", cfg=0x63a2a0, args=0x0) at /home/bazsi/zwa/projects/syslog-ng-ose-3.6/source/syslog-ng/lib/plugin.c:385 #4 0x00007ffff7b4a18c in plugin_find (cfg=0x63a2a0, plugin_type=3, plugin_name=0x675c80 "systemd-journal") at /home/bazsi/zwa/projects/syslog-ng-ose-3.6/source/syslog-ng/lib/plugin.c:155 #5 0x00007ffff7b5ee8e in main_parse (lexer=0x63f010, dummy=0x7fffffffd0c8, arg=0x0) at /home/bazsi/zwa/projects/syslog-ng-ose-3.6/source/syslog-ng/lib/cfg-grammar.y:580 #6 0x00007ffff7b2a7a5 in cfg_parser_parse (self=0x7ffff7dd4ee0 <main_parser>, lexer=0x63f010, instance=0x7fffffffd0c8, arg=0x0) at /home/bazsi/zwa/projects/syslog-ng-ose-3.6/source/syslog-ng/lib/cfg-parser.h:83 #7 0x00007ffff7b2b7f7 in cfg_run_parser (self=0x63a2a0, lexer=0x63f010, parser=0x7ffff7dd4ee0 <main_parser>, result=0x7fffffffd0c8, arg=0x0) at /home/bazsi/zwa/projects/syslog-ng-ose-3.6/source/syslog-ng/lib/cfg.c:430 #8 0x00007ffff7b2ba3a in cfg_read_config (self=0x63a2a0, fname=0x60e940 "etc/syslog-ng.conf", syntax_only=0, preprocess_into=0x0) at /home/bazsi/zwa/projects/syslog-ng-ose-3.6/source/syslog-ng/lib/cfg.c:502 #9 0x00007ffff7b45368 in main_loop_read_and_init_config () at /home/bazsi/zwa/projects/syslog-ng-ose-3.6/source/syslog-ng/lib/mainloop.c:447 #10 0x0000000000401b31 in main (argc=1, argv=0x7fffffffd238) at /home/bazsi/zwa/projects/syslog-ng-ose-3.6/source/syslog-ng/syslog-ng/main.c:261 My belief is that the root cause was that the global variables in journald-subsystem.c are named the same as the symbols in libsystemd.so, and both are symbols with global visibility. My theory was that due to the name clash, the actual pointer passed to g_module_symbol() was pointing to the actual code of the functions, instead of the pointer we wanted to store the values. I didn't completely confirm this theory, but adding "static" qualifiers to the variables resolved the issue for me. Honestly, I don't really like how journal-systemd.c is organized, but this was only a distraction for me and I was satisfied with resolving the problem for now. Signed-off-by: Balazs Scheidler <[email protected]>
bazsi
pushed a commit
that referenced
this pull request
Apr 3, 2016
README.md: add information about community, sponsors and feedback
lbudai
pushed a commit
that referenced
this pull request
Aug 9, 2016
date-parser: use timezone only on those platforms where it is available
Closed
sparlane
added a commit
to sparlane/syslog-ng
that referenced
this pull request
Apr 29, 2022
log_proto_server_reset_error blindly attempts to deref the pointer, which results in a crash when it is NULL. Since this is trying to reset errors, if the object is NULL it definitely wont have an errors to clear. Crash is seen as: Thread 1 (Thread 0x77fa5020 (LWP 405)): #0 0x0ff59618 in log_proto_server_reset_error (s=0x0) at ./lib/logproto/logproto-server.h:164 syslog-ng#1 log_reader_work_finished (s=0x10053800) at lib/logreader.c:426 syslog-ng#2 0x0fc75b98 in iv_fd_poll_and_run (st=st@entry=0x100270a0, abs=<optimized out>) at iv_fd.c:219 syslog-ng#3 0x0fc770b4 in iv_main () at iv_main_posix.c:112 syslog-ng#4 0x0ff5e060 in main_loop_run (self=0xfff629c <main_loop>) at lib/mainloop.c:657 syslog-ng#5 0x10001264 in main (argc=<optimized out>, argv=<optimized out>) at syslog-ng/main.c:316 Change-Id: I8d63a342e74527e6f056afc44a60de05803d1d6e Reviewed-by: Chris Packham <[email protected]> Signed-off-by: Anthony Lineham <[email protected]>
alltilla
added a commit
that referenced
this pull request
Feb 19, 2024
FilterX otel logrecord phase #1
HofiOne
pushed a commit
to HofiOne/syslog-ng
that referenced
this pull request
Jun 10, 2024
Stable & Nightly
HofiOne
pushed a commit
to HofiOne/syslog-ng
that referenced
this pull request
Jun 10, 2024
syslog-ng-collector
kovgeri01
pushed a commit
to kovgeri01/syslog-ng
that referenced
this pull request
Aug 13, 2024
FilterXObject class method add implementation for base types and list/dict variables syslog-ng#1
HofiOne
pushed a commit
to HofiOne/syslog-ng
that referenced
this pull request
Nov 22, 2024
Filterx parse cef/leef syslog-ng#1
This was referenced May 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Gergely Nagy [email protected]