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: Crash when libcurl invokes prune_dead_connections
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Henrik Holst via curl-library <curl-library_at_lists.haxx.se>
Date: Tue, 8 Feb 2022 15:52:35 +0100
From what you submit it looks like data->state.conn_cache is NULL (or
pointing to recently freed memory). I would recommend that you run your
application under valgrind and try to trigger the error and see what
valgrind finds. If this is a use after free, valgrind will point out where
it was freed which would give a better indication on where the problem lies.
/HH
Den tis 8 feb. 2022 kl 13:10 skrev Marius via curl-library <
curl-library_at_lists.haxx.se>:
> Hello everyone,
>
> Some time ago I have developed a small C application which uses
> libcurl to send data to some APIs. (It's very basic)
>
> Since about mid-December my application started to crash when invoking
> libcurl.
>
> After doing some debugging it looks like the prune_dead_connections call
> tries to access some freed memory when doing: Curl_timediff[1].
>
> My application the multi interface to libcurl and libevent2 events.
> A link to the project is here[2].
>
> I have a dump of the crash[3], from a binary compiled against libevent2
> version 2.1.12, and libcurl version curl+7_81_0-1.
>
> Unfortunately I am not sure if the problem is with curl or, more
> likely, I had a bug in my integration with it that got exposed by an
> update.
>
> If anyone can give me any suggestions about how to investigate this
> better, I would appreciate it. Also please let me know what other
> type of information I need to provide for others to make sense of
> this issue.
>
> Thank you,
> /Marius Orcsik
>
> [1]
>
> https://github.com/curl/curl/blob/2610142139d14265ed9acf9ed83cdf73d6bb4d05/lib/url.c#L1084
> [2] https://github.com/mariusor/mpris-scrobbler
> [3] https://habarnam.ro/mpris-scrobbler.dump.tgz
> --
> Unsubscribe: https://lists.haxx.se/listinfo/curl-library
> Etiquette: https://curl.haxx.se/mail/etiquette.html
>
Date: Tue, 8 Feb 2022 15:52:35 +0100
From what you submit it looks like data->state.conn_cache is NULL (or
pointing to recently freed memory). I would recommend that you run your
application under valgrind and try to trigger the error and see what
valgrind finds. If this is a use after free, valgrind will point out where
it was freed which would give a better indication on where the problem lies.
/HH
Den tis 8 feb. 2022 kl 13:10 skrev Marius via curl-library <
curl-library_at_lists.haxx.se>:
> Hello everyone,
>
> Some time ago I have developed a small C application which uses
> libcurl to send data to some APIs. (It's very basic)
>
> Since about mid-December my application started to crash when invoking
> libcurl.
>
> After doing some debugging it looks like the prune_dead_connections call
> tries to access some freed memory when doing: Curl_timediff[1].
>
> My application the multi interface to libcurl and libevent2 events.
> A link to the project is here[2].
>
> I have a dump of the crash[3], from a binary compiled against libevent2
> version 2.1.12, and libcurl version curl+7_81_0-1.
>
> Unfortunately I am not sure if the problem is with curl or, more
> likely, I had a bug in my integration with it that got exposed by an
> update.
>
> If anyone can give me any suggestions about how to investigate this
> better, I would appreciate it. Also please let me know what other
> type of information I need to provide for others to make sense of
> this issue.
>
> Thank you,
> /Marius Orcsik
>
> [1]
>
> https://github.com/curl/curl/blob/2610142139d14265ed9acf9ed83cdf73d6bb4d05/lib/url.c#L1084
> [2] https://github.com/mariusor/mpris-scrobbler
> [3] https://habarnam.ro/mpris-scrobbler.dump.tgz
> --
> 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.htmlReceived on 2022-02-08