cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Fwd: Segfault when downloading multiple sftp files in parallel

From: Gou Lingfeng <goughostt_at_gmail.com>
Date: Thu, 30 Jun 2016 17:06:09 +0800

Thanks. This solves the segfault bug.

But I wonder how those pointers get freed. Memory leak might be a problem
if a multi handle is used to drive millions of easy handle.

Best,
glf

On Thu, Jun 30, 2016 at 5:15 AM, Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Wed, 29 Jun 2016, Gou Lingfeng wrote:
>
> My guess is that connections and session handles highly depend on one
>> another (connection and disconnection need session data), but connection
>> reusing needs some independence of connections.
>>
>
> I think you're right - and thanks a bunch for your excellent analysis and
> step by step description. It really made me understand the issue.
>
> I think the freeing of the 'req.protop' in the disconnect function is
> totally wrong. The connection gets disconnected, it should not clear data
> in the easy handle just because of that.
>
> See attachment for my suggested fix. I believe the free'ing should've been
> removed before already, we have just been lucky (or perhaps unlucky) that
> nobody else ran into this problem (or at least reported it) before.
>
> --
>
> / daniel.haxx.se
> -------------------------------------------------------------------
> List admin: https://cool.haxx.se/list/listinfo/curl-library
> Etiquette: https://curl.haxx.se/mail/etiquette.html
>

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-06-30