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: crash seen in multi_socket

From: Kunal Ekawde via curl-library <curl-library_at_cool.haxx.se>
Date: Sun, 12 May 2019 22:17:43 +0530

Thanks Daniel for checking this over weekend.

Ok, I shall try to update to 7.64.1 but that would take sometime to
integrate, sanitize and load run.

A break would be same consequence as continue in this flow I think. The
'continue' fixed trap #1,
which I could reproduce, but using this patch resulted in trap #2. Based on
trap #2 backtrace,
I've update the patch to 'return result;' //CURLM_OK instead of continue. I
m yet to verify the minimal
load run with the server abruptly terminating case, which most likely
resulted in trap #2. Do you think
'result result;' is not correct there ? One thing missing there would be
updating running_handles.
Please let me know if updating running_handles and return CURLM_OK would be
good or if that is
not correct.

Thanks

On Sun, May 12, 2019 at 2:32 AM Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Sat, 11 May 2019, Kunal Ekawde via curl-library wrote:
>
> > I'm using libcurl - 7.64.0 with nghttp2 for http2 call flow. For
> http/1.1
> > this crash is not seen.
>
> I recommend using 7.64.1!
>
> > I tried with following fix:
> > /* the socket can be shared by many transfers, iterate */
> > for(e = list->head; e; e = e->next) {
> > data = (struct Curl_easy *)e->ptr;
> > // crash fix - temp
> > if (!data)
> > continue;
>
> I think this should do a 'break' instead of a 'continue'. After all, this
> happens because the connection died so there is no more transfers on the
> same
> connection.
>
> > While this would just be defensive fix, the root cause fix could be
> > elsewhere also, request to please check / comment.
>
> This is a bit tricky to reproduce so I haven't managed to do this myself
> yet.
> I'm just reading your description and the code and thinking.
>
> If you add the break like this in there, does this fix the problem for
> you?
> Does it have any other flaws? I'm thinking we might want to terminate
> those
> remaining transfers on the same socket in a more immediate way...
>
> What do you do to reproduce this case?
>
> --
>
> / daniel.haxx.se | Get the best commercial curl support there is - from
> me
> | Private help, bug fixes, support, ports, new features
> | https://www.wolfssl.com/contact/
>

-- 
~Kunal

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2019-05-12