curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. 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 himself.

Re: infinite "easy_transfer function" wait loop

From: Henrik Holst via curl-library <curl-library_at_lists.haxx.se>
Date: Tue, 8 Feb 2022 16:07:26 +0100

I just wanted to say that you are not alone with this problem, I have seen
this happen as well. I have an application that downloads an external link
once per second 24x7 and on some seldom but random occasion (perhaps 2-3
times per year) it gets stuck in curl_multi_socket_action().

So far I have not been able to catch it in the act since it have happened
at times where I have been away and my colleges have simply restarted the
service (so as to not have any outage). My problem is that it happens so
rare that I cannot just run it with a debugger so my only hope at this
point is to catch it in the act and connect a debugger live to it when it
happens the next time. You seem to run on Windows and I have zero knowledge
if one can attach debuggers or have the equivalent of ltrace/strace on a
running application there like you can on Linux.

/HH

Den tis 8 feb. 2022 kl 08:32 skrev Lilia Boneva via curl-library <
curl-library_at_lists.haxx.se>:

>
> Hello again and thank you for the help.
> Like Mr. Ray Satiro noticed, It seems I was not set google drive link
> properly. Now should be OK (
> https://drive.google.com/file/d/1kdMSBS9fZPBW4WoMJ4qgHIeB01h46d4V/view?usp=sharing).
> Also thank you for links and winsock info.
>
> I will try making working code to share (now not so easy because the
> secure requests use private data).
> I will also try release version (like Mr. Dmitry Karpov suggested) and
> other curl versions, because 7.77 for example runs >5 days before infinite
> loop (7.81 less than a day)
> Thank you for suggesting ideas toward solutionHave a nice day
>
>
> PS1:
> by Ray Satiro:"The file you linked to is inaccessible. HTTP/2 will be
> harder to debug
>
> so stay with 1.1 for now. There might be 3rd party Windows sockets
>
> libraries but since nobody uses them with curl they might cause other
>
> problems. Keep using winsock.
>
>
>
> There is not enough information here to say this is a curl problem. Can
>
> you show us the code you are using? Do you have a minimal self contained
>
> example that can be used to reproduce on a public website like
>
> httpbin.org for example? Please review the documentation for the multi
>
> interface [1] and multi- prefixed examples [2].
>
>
>
>
>
> [1]: https://curl.se/libcurl/c/libcurl-multi.html
>
> [2]: https://curl.se/libcurl/c/example.html
>
> "
> PS2:by Dmitry Karpov"I assume that you made a "Debug" build and ran your
> program under MSVC debugger for 20hrs, right?
>
> Do you see the same problem for the "release" build (or for "debug" build)
> when it is not running under MSVC debugger?
>
>
>
> I have seen issues with MSVC debugger in the past, so the issue you
> observed may be a debugger issue (when it has been running for too long)
> rather than curl's one.
>
>
>
> I would put some debugging "printf" messages into your app to detect the
> infinite loop but run it as the production "release" build not under
> MSVC debugger to confirm that it is not a debugger issue.
>
>
>
> And if you still see the "infinite loop" issue without running under
> debugger, then, as some folks already mentioned , could you please
> provide some sample or "skeleton" code like what you are using in your
> app to illustrate where the "infinite loop" happens?
>
>
>
> Thanks,
>
> Dmitry Karpov"
> --
> Unsubscribe: https://lists.haxx.se/listinfo/curl-library
> Etiquette: https://curl.haxx.se/mail/etiquette.html
>


-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2022-02-08