curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder Daniel himself.

transactions stall after March 6 commit to improve wakeup and wait code in multi

From: Bryan Henderson via curl-library <curl-library_at_lists.haxx.se>
Date: 9 Jun 2026 18:25:13 +0000

I have some code that uses the libcurl multi manager to perform HTTP
transactions and after commit 9bc8b078... on March 6, it no longer works.

My code does this:

  curl_multi_add_handle

  curl_multi_fdset

    This returns one read file descriptor

  pselect on the above file descriptor

    In old code, and for the past twenty years, this finds the file descriptor
    either already ready to read or ready very soon after. After that, my
    code calls curl_multi_perform to advance the HTTP transaction.

    But after the subject commit, the file descriptor never becomes ready to
    read. My code eventually times out as a failsafe and calls
    curl_multi_perform anyway, and the transaction does in fact advance.
    After that, the pselect/curl_multi_perform loop properly completes the
    transaction.

Is this a bug, or is the algorithm above not supposed to work?


If you're wondering why this code does not use curl_multi_poll, it's because
it predates that.

This problem was discovered, and all the analysis was done, by my user Lars
Knipschild.

The libcurl client code I'm talking about is XML-RPC For C/C++.

-- 
Bryan Henderson                                   Omak, Washington
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2026-06-10