Skip to content

threaded resolvers not consuming eventfds when using curl_multi_socket_action #21547

@Earnestly

Description

@Earnestly

This issue is related to a problem surfaced by mpd which results in high cpu usage when curl is built with --enable-threaded-resolver.

A summary of the cause is:

CURL registers the eventfd with MPD's I/O event loop, but upon curl_multi_socket_action(), CURL forgets to consume the eventfd, i.e. doesn't call Curl_wakeup_consume().

More detail here: MusicPlayerDaemon/MPD#2481 (comment)

curl/libcurl version

curl 8.20.0 (x86_64-pc-linux-gnu) libcurl/8.20.0 OpenSSL/3.6.2 zlib/1.3.2 brotli/1.2.0 zstd/1.5.7 libidn2/2.3.8 libpsl/0.21.5 libssh2/1.11.1 nghttp2/1.69.0 ngtcp2/1.22.1 nghttp3/1.15.0 mit-krb5/1.21.3
Release-Date: 2026-04-29
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns mqtt mqtts pop3 pop3s rtsp scp sftp smtp smtps telnet tftp ws wss
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTP3 HTTPS-proxy IDN IPv6 Kerberos Largefile libz PSL SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd

However this is reported to effect many older versions of curl (e.g. 7.x series).

operating system

Linux 7.0.3-arch1-2 #1 SMP PREEMPT_DYNAMIC Fri, 01 May 2026 15:49:22 +0000 x86_64 GNU/Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions