cURL / Mailing Lists / curl-library / Single Mail

curl-library

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

From: Daniel Stenberg <daniel_at_haxx.se>
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

Received on 2016-06-29