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.

Re: High CPU usage associated to busy loop in curl_timediff_us()

From: Ray Satiro via curl-library <curl-library_at_lists.haxx.se>
Date: Wed, 10 Sep 2025 13:02:01 -0400

On 9/10/2025 10:57 AM, Stephane Cruchon via curl-library wrote:
>
> We are no doing more than using Libcurl within a thread, executed
> inside a container in order to send many messages toward http AS.
>
> By attaching to the process where we observed the described symptoms,
> we managed to retrieve several threads stuck in /curl_timediff_us/
> function ( bt full on thread )
>
> //
>
> /#0  0x00007f844a387b1a in Curl_timediff_us () from
> /home/actility/lib/libcurl.so.4/
>
> /No symbol table info available./
>
> /#1  0x00007f844a382923 in Curl_splay () from
> /home/actility/lib/libcurl.so.4/
>
> /No symbol table info available./
>
> /#2  0x00007f844a382c40 in Curl_splayremove () from
> /home/actility/lib/libcurl.so.4/
>
> /No symbol table info available./
>
> /#3  0x00007f844a3698cd in Curl_expire_ex () from
> /home/actility/lib/libcurl.so.4/
>
> /No symbol table info available./
>
> /#4  0x00007f844a369ec4 in process_pending_handles () from
> /home/actility/lib/libcurl.so.4/
>
> /No symbol table info available./
>
> /#5  0x00007f844a36b3c8 in multi_runsingle () from
> /home/actility/lib/libcurl.so.4/
>
> /No symbol table info available./
>
> /#6  0x00007f844a36d2d9 in curl_multi_perform () from
> /home/actility/lib/libcurl.so.4/
>
> //
>
> Something we do not experienced out of a container.
>

Please review the thread safety guidelines [1] and try the latest
version [2]. Often when we get reports like this it is user error.

[1]: https://curl.se/libcurl/c/threadsafe.html
[2]: https://curl.se/download.html


-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2025-09-10