]> git.pld-linux.org Git - packages/syslog-ng.git/commitdiff
- rel 4; upstream bug 48 (aka syslog-ng hangs so all apps doing syslog() also hang... auto/th/syslog-ng-3_0_2-4
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Sun, 30 Aug 2009 10:01:35 +0000 (10:01 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    syslog-ng-bug-48.patch -> 1.1
    syslog-ng.spec -> 1.179

syslog-ng-bug-48.patch [new file with mode: 0644]
syslog-ng.spec

diff --git a/syslog-ng-bug-48.patch b/syslog-ng-bug-48.patch
new file mode 100644 (file)
index 0000000..49ef63c
--- /dev/null
@@ -0,0 +1,43 @@
+commit 51d40371d5e2abf636220470c8257b8426fa648c
+Author: Balazs Scheidler <bazsi@balabit.hu>
+Date:   Sun Aug 30 11:41:24 2009 +0200
+
+    [afinter] don't block on the internal_msg_queue even in the threaded case (fixes: pub#48)
+    
+    A hang was reported in bugzilla ticket #48 which seems to have
+    been caused by MARK messages interfering with local messages:
+    
+      * if the MARK is due in the same poll iteration as a local message
+      * the MARK timeout is checked and the internal source is marked as having
+        input available
+      * then the local message comes in pushing the mark timeout further ahead
+        in time
+      * then the internal() dispatch callback checks the mark timeout again,
+        but at this time it is already in the future ->
+      * the dispatch callback falls back to fetching the internal message from
+        internal_msg_queue, assuming it was that which caused the dispatch
+        callback to be scheduled
+      * this blocks indefinitely.
+    
+    The solution is very simple: use g_async_queue_try_pop() instead of
+    g_async_queue_pop(), the dispatch code already takes care about a
+    NULL message value.
+    
+    Thanks for the helpful reporters to hunt down the issue.
+    
+    Reported-By: Arkadiusz Miśkiewicz, Elan Ruusamäe
+
+diff --git a/src/messages.h b/src/messages.h
+index d3148fd..305d0b3 100644
+--- a/src/messages.h
++++ b/src/messages.h
+@@ -49,7 +49,8 @@ void msg_add_option_group(GOptionContext *ctx);
+ #define MsgQueue         GAsyncQueue
+ #define msg_queue_push   g_async_queue_push
+-#define msg_queue_pop    g_async_queue_pop
++/* we're using try_pop here as we don't want to block in our dispatch callback */
++#define msg_queue_pop    g_async_queue_try_pop
+ #define msg_queue_new    g_async_queue_new
+ #define msg_queue_free   g_async_queue_unref
+ #define msg_queue_length g_async_queue_length
index 40342d4b23cdcdb61e513b8fe1fd92b491d0b1bc..e79d237b50f122adb3647d3303e4540007ddfda0 100644 (file)
@@ -9,7 +9,7 @@ Summary(pl.UTF-8):      Syslog-ng - zamiennik syskloga
 Summary(pt_BR.UTF-8):  Daemon de log nova geração
 Name:          syslog-ng
 Version:       3.0.2
-Release:       3
+Release:       4
 License:       GPL v2
 Group:         Daemons
 Source0:       http://www.balabit.com/downloads/files/syslog-ng/sources/%{version}/source/%{name}_%{version}.tar.gz
@@ -25,6 +25,7 @@ Patch1:               %{name}-datadir.patch
 Patch2:                %{name}-tz.patch
 Patch3:                %{name}-pyssl.patch
 Patch4:                bug-15.patch
+Patch5:                %{name}-bug-48.patch
 URL:           http://www.balabit.com/products/syslog_ng/
 BuildRequires: autoconf >= 2.53
 BuildRequires: automake
@@ -99,6 +100,7 @@ facility/prioridade como o syslog original.
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
 cp -a %{SOURCE4} doc
 cp -a %{SOURCE5} contrib
 
This page took 0.046138 seconds and 4 git commands to generate.