public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jan Macku <jamacku@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/curl] curl-v8.23.0-3: Fix potential 100% CPU usage in curl_multi_socket()
Date: Tue, 03 Nov 2026 12:39:57 GMT	[thread overview]
Message-ID: <179370959753.1.4069950019622666276.rpms-curl-e9c3b51e959a@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/curl
Branch : curl-v8.23.0-3
Commit : e9c3b51e959a6fe1e52f14bced40803812524784
Author : Jan Macku <jamacku@redhat.com>
Date   : 2026-05-18T15:09:33+02:00
Stats  : +44/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/curl/c/e9c3b51e959a6fe1e52f14bced40803812524784?branch=curl-v8.23.0-3

Log:
Fix potential 100% CPU usage in curl_multi_socket()

---
diff --git a/0001-curl-8.20.0-event-fix-wakeup-consumption.patch b/0001-curl-8.20.0-event-fix-wakeup-consumption.patch
new file mode 100644
index 0000000..b09d4a0
--- /dev/null
+++ b/0001-curl-8.20.0-event-fix-wakeup-consumption.patch
@@ -0,0 +1,37 @@
+From 89abc89a30819a402a427d86f5b6e61aaceedd6e Mon Sep 17 00:00:00 2001
+From: Stefan Eissing <stefan@eissing.org>
+Date: Mon, 11 May 2026 14:56:04 +0200
+Subject: [PATCH] event: fix wakeup consumption
+
+The events on a multi wakeup socketpair were only consumed via
+curl_multi_poll()/curl_multi_wait() but not in event based processing on
+a curl_multi_socket() call. That led to busy loops as reported in
+
+Fixes #21547
+Reported-by: Earnestly on github
+Closes #21549
+
+(cherry picked from commit 2a2104f3cff44bb28bb570a093be52bbeeed8f23)
+---
+ lib/multi.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/lib/multi.c b/lib/multi.c
+index 7520253d70..a0012d8faf 100644
+--- a/lib/multi.c
++++ b/lib/multi.c
+@@ -2479,6 +2479,11 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
+   Curl_uint32_bset_remove(&multi->dirty, data->mid);
+ 
+   if(data == multi->admin) {
++#ifdef ENABLE_WAKEUP
++    /* Consume any pending wakeup signals before processing.
++     * This is necessary for event based processing. See #21547 */
++    (void)Curl_wakeup_consume(multi->wakeup_pair, TRUE);
++#endif
+ #ifdef USE_RESOLV_THREADED
+     Curl_async_thrdd_multi_process(multi);
+ #endif
+-- 
+2.54.0
+

diff --git a/curl.spec b/curl.spec
index dffbab2..39b71e4 100644
--- a/curl.spec
+++ b/curl.spec
@@ -13,7 +13,7 @@
 Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
 Name: curl
 Version: 8.20.0
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: curl
 Source0: https://curl.se/download/%{name}-%{version_no_tilde}.tar.xz
 Source1: https://curl.se/download/%{name}-%{version_no_tilde}.tar.xz.asc
@@ -22,6 +22,9 @@ Source1: https://curl.se/download/%{name}-%{version_no_tilde}.tar.xz.asc
 # which points to the GPG key as of April 7th 2016 of https://daniel.haxx.se/mykey.asc
 Source2: mykey.asc
 
+# Fix potential 100% CPU usage in curl_multi_socket()
+Patch001: 0001-curl-8.20.0-event-fix-wakeup-consumption.patch
+
 # patch making libcurl multilib ready
 Patch101: 0101-curl-7.32.0-multilib.patch
 
@@ -468,6 +471,9 @@ rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/wcurl.1*
 %{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
 
 %changelog
+* Mon May 18 2026 Jan Macku <jamacku@redhat.com> - 8.20.0-2
+- Fix potential 100% CPU usage in curl_multi_socket()
+
 * Thu May 07 2026 Jan Macku <jamacku@redhat.com> - 8.20.0-1
 - new upstream release
 

                 reply	other threads:[~2026-11-03 12:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179370959753.1.4069950019622666276.rpms-curl-e9c3b51e959a@fedoraproject.org \
    --to=jamacku@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox