curl-library
Re: Fwd: Segfault when downloading multiple sftp files in parallel
Date: Wed, 29 Jun 2016 23:15:29 +0200 (CEST)
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
- text/x-diff attachment: 0001-conn-don-t-free-easy-handle-data-in-handler-disconne.patch