On Thu, 9 Nov 2023, Frédéric BOITEUX via curl-library wrote:

 I'm using libcurl in a C program to perform various web operations. I'm
 using the 'multi' interface to be able to run multiple concurrent requests,
 in an asynchronous manner. I'm working on Linux Debian systems, and I
 recently tried to migrate my program from a Debian 11 to Debian 12 version,
 with libcurl updated from 7.74 to 7.88 version. With this 'new' version,
 I've experienced an unexpected behaviour: sometimes, when closing my app
 [and libcurl], the call to curl_multi_cleanup() takes a [very] long time,
 more than 5 minutes !! After some tests, I could reproduce it doing an
 HTTPS request, then terminating.

You did not say which TLS backend you are using.

I tried to revert it and test the modified version, and my problem disappears :-)

What puzzles me about this is that the change in question is mostly just reading data, if there is anything to read, but the read should not block. Obviously, in your case, that is not true.

Can you verify that the extra read is what actually blocks? You can probably just add printf() or infof() around the read to make that visible in logging.

I figure the next step then depends on the answers on the two questions above.

--

 / daniel.haxx.se
 | Commercial curl support up to 24x7 is available!
 | Private help, bug fixes, support, ports, new features
 | https://curl.se/support.html
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html

Reply via email to