-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OCPBUGS-33883: DO NOT MERGE: validate haproxy26-2.6.13-3.rhaos4.15.el8.x86_64.rpm #597
base: release-4.15
Are you sure you want to change the base?
OCPBUGS-33883: DO NOT MERGE: validate haproxy26-2.6.13-3.rhaos4.15.el8.x86_64.rpm #597
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Patch for branch From dc4ed2c3b68c4c30952110a13dd5c7041fe8942d Mon Sep 17 00:00:00 2001
From: Andrew McDermott <[email protected]>
Date: Thu, 16 May 2024 14:21:43 +0100
Subject: OCPBUGS-32369: HAProxy consuming high cpu usage
- Resolve https://issues.redhat.com/browse/OCPBUGS-32369 (HAProxy consuming high cpu usage)
- Carry fix for https://github.com/haproxy/haproxy/issues/2537
- Fix for issue 2537 picked from https://git.haproxy.org/?p=haproxy.git;a=commit;h=4a9e3e102e192b9efd17e3241a6cc659afb7e7dc
---
...y-only-tid-0-must-not-sleep-if-got-s.patch | 44 +++++++++++++++++++
haproxy.spec | 11 ++++-
2 files changed, 54 insertions(+), 1 deletion(-)
create mode 100644 0001-BUG-MINOR-haproxy-only-tid-0-must-not-sleep-if-got-s.patch
diff --git a/0001-BUG-MINOR-haproxy-only-tid-0-must-not-sleep-if-got-s.patch b/0001-BUG-MINOR-haproxy-only-tid-0-must-not-sleep-if-got-s.patch
new file mode 100644
index 0000000..50f54cc
--- /dev/null
+++ b/0001-BUG-MINOR-haproxy-only-tid-0-must-not-sleep-if-got-s.patch
@@ -0,0 +1,44 @@
+From d256f8f3157af29875a915e87e171ec81194e88c Mon Sep 17 00:00:00 2001
+From: Valentine Krasnobaeva <[email protected]>
+Date: Mon, 6 May 2024 14:24:41 +0200
+Subject: BUG/MINOR: haproxy: only tid 0 must not sleep if got signal
+
+This patch fixes the commit eea152ee68
+("BUG/MINOR: signals/poller: ensure wakeup from signals").
+
+There is some probability that run_poll_loop() becomes inifinite, if
+TH_FL_SLEEPING is withdrawn from all threads in the second signal_queue_len
+check, when a signal has received just after the first one.
+
+In such particular case, the 'wake' variable, which is used to terminate
+thread's poll loop is never reset to 0. So, we never enter to the "stopping"
+part of the run_poll_loop() and threads, except the one with id 0 (tid 0
+handles signals), will continue to call _do_poll() eternally and will never
+sleep, as its TH_FL_SLEEPING flag was unset.
+
+This flag needs to be removed only for the tid 0, as it was done in the first
+signal_queue_len check.
+
+This fixes an issue #2537 "infinite loop when shutting down".
+
+This fix must be backported in every stable version.
+---
+ src/haproxy.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/haproxy.c b/src/haproxy.c
+index a6349d420..6ed532527 100644
+--- a/src/haproxy.c
++++ b/src/haproxy.c
+@@ -2868,7 +2868,7 @@ void run_poll_loop()
+ if (thread_has_tasks()) {
+ activity[tid].wake_tasks++;
+ _HA_ATOMIC_AND(&sleeping_thread_mask, ~tid_bit);
+- } else if (signal_queue_len) {
++ } else if (signal_queue_len && tid == 0) {
+ /* this check is required to avoid
+ * a race with wakeup on signals using wake_threads() */
+ _HA_ATOMIC_AND(&sleeping_thread_mask, ~tid_bit);
+--
+2.42.0
+
diff --git a/haproxy.spec b/haproxy.spec
index 707fa0a..597852e 100644
--- a/haproxy.spec
+++ b/haproxy.spec
@@ -10,7 +10,7 @@
Name: haproxy
Version: 2.6.13
-Release: 2.rhaos4.15%{?dist}
+Release: 3.rhaos4.15%{?dist}
Summary: Do not ship, install or use this, use %{real_name} subpackage instead
License: GPLv2+
@@ -24,6 +24,9 @@ Patch0: 0001-BUG-MINOR-fd-always-remove-late-updates-when-freeing.patch
# https://issues.redhat.com/browse/OCPBUGS-20325 (CVE-2023-40225)
Patch1: 0001-BUG-MAJOR-http-reject-any-empty-content-length-heade.patch
+# https://issues.redhat.com/browse/OCPBUGS-32369
+Patch2: 0001-BUG-MINOR-haproxy-only-tid-0-must-not-sleep-if-got-s.patch
+
BuildRequires: openssl-devel
BuildRequires: pcre-devel
BuildRequires: zlib-devel
@@ -56,6 +59,7 @@ availability environments. Indeed, it can:
%setup -q
%patch0 -p1
%patch1 -p1
+%patch2 -p1
%build
regparm_opts=
@@ -97,6 +101,11 @@ fi
%{_sbindir}/%{name}
%changelog
+* Thu May 16 2024 Andrew McDermott <[email protected]> - 2.6.13-3.rhaos4.15
+- Resolve https://issues.redhat.com/browse/OCPBUGS-32369 (HAProxy consuming high cpu usage)
+- Carry fix for https://github.com/haproxy/haproxy/issues/2537
+- Fix for issue 2537 picked from https://git.haproxy.org/?p=haproxy.git;a=commit;h=4a9e3e102e192b9efd17e3241a6cc659afb7e7dc
+
* Wed Oct 11 2023 Andrew McDermott <[email protected]> - 2.6.13-2.rhaos4.15
- Resolve https://issues.redhat.com/browse/OCPBUGS-20325 (CVE-2023-40225)
--
2.44.0 |
@frobware: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
@frobware: This pull request references Jira Issue OCPBUGS-33883, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
Patch LGTM.
|
/jira refresh |
@frobware: This pull request references Jira Issue OCPBUGS-33883, which is invalid:
Comment In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
/hold