curl-library
Re: multi-threads SFTP in libcurl
Date: Fri, 12 Nov 2010 00:07:52 -0800
On Fri, Nov 12, 2010 at 10:59:12AM +0800, SU Xing A wrote:
> It is not that libssh2 suddenly do wrong when go beyond 20 threads. It still happened but not often when less than 20 threads.
> This issue happened when we use libcurl/libssh2/openssl in multi-threads. It do not appear in single thread.
> ....
> From the pstack, I guess when libssh2 call "diffie_hellman_sha1/BN_CTX_free", some resource was released but thread 22 still needed. So coredump happened.
> Is it any clue? Thanks a lot.
Are you by any chance using the same curl handle in more than one thread?
That's a no-no; libcurl is thread safe only if you never access the same
handle in more than one thread at a time.
>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-11-12