syslog-ng: workaround segfault for ppc64le
PATCH 1/1 syslog-ng: workaround segfault for ppc64le
For now syslog-ng segfaults on ppc64le. The problem could be reproduced by simply adding syslog-ng to IMAGE_INSTALL and then building and starting an image for qemuppc64.
The underlying root cause is hard to find. This workaround helps improve the situation a little bit so that users can at least use syslog-ng on ppc64le targets.
Note that this workaround should be dropped once the upstream issue gets a real fix: https://github.com/syslog-ng/syslog-ng/issues/4285
--- ...rkaround-powerpc64le-segfaults-error.patch | 45 +++++++++++++++++++ .../syslog-ng/syslog-ng_3.38.1.bb | 1 + 2 files changed, 46 insertions(+) create mode 100644 meta-oe/recipes-support/syslog-ng/files/0001-plugin.c-workaround-powerpc64le-segfaults-error.patch
meta-oe/recipes-support/syslog-ng/files/0001-plugin.c-workaround-powerpc64le-segfaults-error.patch new file +45 -0
@@ -0,0 +1,45 @@ +From 616446afab61ab98b28c81605e2efd4a689f37d1 Mon Sep 17 00:00:00 2001 +From: Chen Qi <[email protected]> +Date: Fri, 20 Jan 2023 14:59:14 +0800 +Subject: [PATCH] plugin.c: workaround powerpc64le segfaults error + +syslog-ng segfaults on powerpc64le, workaround this error. +See https://github.com/syslog-ng/syslog-ng/issues/4285 for more details. +This patch should be dropped once the above issue gets a real fix. + +Upstream-Status: Inappropriate [OE Specific] + +Signed-off-by: Chen Qi <[email protected]> +--- + lib/plugin.c | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +diff --git a/lib/plugin.c b/lib/plugin.c +index fbbfb92..3a03617 100644 +--- a/lib/plugin.c ++++ b/lib/plugin.c +@@ -528,10 +528,7 @@ plugin_discover_candidate_modules(PluginContext *context) + } + } + g_free(module_name); +- if (mod) +- g_module_close(mod); +- else +- mod = NULL; ++ mod = NULL; + } + } + g_dir_close(dir); +@@ -663,8 +660,7 @@ plugin_list_modules(FILE *out, gboolean verbose) + first = FALSE; + } + g_free(module_name); +- if (mod) +- g_module_close(mod); ++ mod = NULL; + } + } + g_dir_close(dir); +-- +2.17.1 +
meta-oe/recipes-support/syslog-ng/syslog-ng_3.38.1.bb +1 -0
@@ -23,6 +23,7 @@ SRC_URI = "https://github.com/balabit/syslog-ng/releases/download/${BP}/${BP}.ta file://syslog-ng-tmp.conf \ file://syslog-ng.service-the-syslog-ng-service.patch \ " +SRC_URI:append:powerpc64le = " file://0001-plugin.c-workaround-powerpc64le-segfaults-error.patch" SRC_URI[sha256sum] = "5491f686d0b829b69b2e0fc0d66a62f51991aafaee005475bfa38fab399441f7"
Signature · 1 line
2.17.1
Please ignore this one. V2 will be sent with an extra issue link.
Regards,
Qi
-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Chen Qi
Sent: Tuesday, January 31, 2023 5:41 PM
To: [email protected]
Subject: [oe][meta-oe][PATCH] syslog-ng: workaround segfault for ppc64le
For now syslog-ng segfaults on ppc64le. The problem could be reproduced by simply adding syslog-ng to IMAGE_INSTALL and then building and starting an image for qemuppc64.
The underlying root cause is hard to find. This workaround helps improve the situation a little bit so that users can at least use syslog-ng on ppc64le targets.
Note that this workaround should be dropped once the upstream issue gets a real fix: https://github.com/syslog-ng/syslog-ng/issues/4285
--- ...rkaround-powerpc64le-segfaults-error.patch | 45 +++++++++++++++++++ .../syslog-ng/syslog-ng_3.38.1.bb | 1 + 2 files changed, 46 insertions(+) create mode 100644 meta-oe/recipes-support/syslog-ng/files/0001-plugin.c-workaround-powerpc64le-segfaults-error.patch
meta-oe/recipes-support/syslog-ng/files/0001-plugin.c-workaround-p new file +0 -0
+++ owerpc64le-segfaults-error.patch
@@ -0,0 +1,45 @@
+From 616446afab61ab98b28c81605e2efd4a689f37d1 Mon Sep 17 00:00:00 2001 +From: Chen Qi <[email protected]>
+Date: Fri, 20 Jan 2023 14:59:14 +0800
+Subject: [PATCH] plugin.c: workaround powerpc64le segfaults error +
+syslog-ng segfaults on powerpc64le, workaround this error. +See https://github.com/syslog-ng/syslog-ng/issues/4285 for more details. +This patch should be dropped once the above issue gets a real fix. +
+Upstream-Status: Inappropriate [OE Specific]
+
+Signed-off-by: Chen Qi <[email protected]>
+--- + lib/plugin.c | 8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+
+diff --git a/lib/plugin.c b/lib/plugin.c index fbbfb92..3a03617 100644 +--- a/lib/plugin.c
++++ b/lib/plugin.c
+@@ -528,10 +528,7 @@ plugin_discover_candidate_modules(PluginContext *context)
+ }
+ }
+ g_free(module_name);
+- if (mod) +- g_module_close(mod); +- else +- mod = NULL; ++ mod = NULL; + } + } + g_dir_close(dir);
+@@ -663,8 +660,7 @@ plugin_list_modules(FILE *out, gboolean verbose)
+ first = FALSE;
+ }
+ g_free(module_name);
+- if (mod) +- g_module_close(mod); ++ mod = NULL; + } + } + g_dir_close(dir); +--
+2.17.1
+
meta-oe/recipes-support/syslog-ng/syslog-ng_3.38.1.bb +1 -1
@@ -23,6 +23,7 @@ SRC_URI = "https://github.com/balabit/syslog-ng/releases/download/${BP}/${BP}.ta file://syslog-ng-tmp.conf \ file://syslog-ng.service-the-syslog-ng-service.patch \ " +SRC_URI:append:powerpc64le = " file://0001-plugin.c-workaround-powerpc64le-segfaults-error.patch" SRC_URI[sha256sum] = "5491f686d0b829b69b2e0fc0d66a62f51991aafaee005475bfa38fab399441f7" --
2.17.1