packages: syslog-ng/syslog-ng.spec, syslog-ng/syslog-ng-bug-48.patch (NEW) ...

arekm arekm at pld-linux.org
Sun Aug 30 12:01:41 CEST 2009


Author: arekm                        Date: Sun Aug 30 10:01:41 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- rel 4; upstream bug 48 (aka syslog-ng hangs so all apps doing syslog() also hang) is supposed to be fixed

---- Files affected:
packages/syslog-ng:
   syslog-ng.spec (1.178 -> 1.179) , syslog-ng-bug-48.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/syslog-ng/syslog-ng.spec
diff -u packages/syslog-ng/syslog-ng.spec:1.178 packages/syslog-ng/syslog-ng.spec:1.179
--- packages/syslog-ng/syslog-ng.spec:1.178	Fri Aug 28 14:54:50 2009
+++ packages/syslog-ng/syslog-ng.spec	Sun Aug 30 12:01:35 2009
@@ -10,7 +10,7 @@
 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
@@ -26,6 +26,7 @@
 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
@@ -100,6 +101,7 @@
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
 cp -a %{SOURCE4} doc
 cp -a %{SOURCE5} contrib
 
@@ -197,6 +199,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.179  2009/08/30 10:01:35  arekm
+- rel 4; upstream bug 48 (aka syslog-ng hangs so all apps doing syslog() also hang) is supposed to be fixed
+
 Revision 1.178  2009/08/28 12:54:50  wiget
 - tzdata required for tests
 - release 3

================================================================
Index: packages/syslog-ng/syslog-ng-bug-48.patch
diff -u /dev/null packages/syslog-ng/syslog-ng-bug-48.patch:1.1
--- /dev/null	Sun Aug 30 12:01:41 2009
+++ packages/syslog-ng/syslog-ng-bug-48.patch	Sun Aug 30 12:01:35 2009
@@ -0,0 +1,43 @@
+commit 51d40371d5e2abf636220470c8257b8426fa648c
+Author: Balazs Scheidler <bazsi at 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
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/syslog-ng/syslog-ng.spec?r1=1.178&r2=1.179&f=u



More information about the pld-cvs-commit mailing list