代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/rsyslog 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 1807410d18519520ed813dd4b9d2b2d34e583415 Mon Sep 17 00:00:00 2001
From: Rainer Gerhards <rgerhards@adiscon.com>
Date: Sun, 30 Oct 2022 18:43:26 +0100
Subject: [PATCH] [backport] bugfix: prevent pot. segfault when switchung to
queue emergency mode
When switching to Disk queue emergency mode, we destructed the in-memory
queue object. Practice has shown that this MAY cause races during
destruction which themselfs can lead to segfault. For that reason, we
now keep the disk queueu object. This will keep some ressources,
including disk space, allocated. But we prefer that over a segfault.
After all, it only happens after a serious queue error when we are
already at the edge of hard problems.
see also: https://github.com/rsyslog/rsyslog/issues/4963
---
Conflict:NA
Type:bugfix
Reference:https://github.com/rsyslog/rsyslog/commit/eaac48d0d23afe0146454cd9f5004ddcb47cc81b
---
---
runtime/queue.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/runtime/queue.c b/runtime/queue.c
index b3fdd5101..856b4df25 100644
--- a/runtime/queue.c
+++ b/runtime/queue.c
@@ -794,8 +794,12 @@ static rsRetVal qDelLinkedList(qqueue_t *pThis)
/* The following function is used to "save" ourself from being killed by
* a fatally failed disk queue. A fatal failure is, for example, if no
* data can be read or written. In that case, the disk support is disabled,
- * with all on-disk structures kept as-is as much as possible. Instead, the
- * queue is switched to direct mode, so that at least
+ * with all on-disk structures kept as-is as much as possible. However,
+ * we do not really stop or destruct the in-memory disk queue object.
+ * Practice has shown that this may cause races during destruction which
+ * themselfs can lead to segfault. So we prefer to was some ressources by
+ * keeping the queue active.
+ * Instead, the queue is switched to direct mode, so that at least
* some processing can happen. Of course, this may still have lots of
* undesired side-effects, but is probably better than aborting the
* syslogd. Note that this function *must* succeed in one way or another, as
@@ -808,7 +812,6 @@ queueSwitchToEmergencyMode(qqueue_t *pThis, rsRetVal initiatingError)
{
pThis->iQueueSize = 0;
pThis->nLogDeq = 0;
- qDestructDisk(pThis); /* free disk structures */
pThis->qType = QUEUETYPE_DIRECT;
pThis->qConstruct = qConstructDirect;
--
2.12.3
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。