cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: multi-threads SFTP in libcurl

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 12 Nov 2010 11:26:22 +0100 (CET)

On Fri, 12 Nov 2010, SU Xing A wrote:

Hi!

I was serious when I asked you to not top-post. If you want me to respond to
your mails, please consider adhering to our etiquette:
http://curl.haxx.se/mail/etiquette.html I can't force you to, but I will
simply stop responding to repeat offenders.

>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.

Okay. For the record: I hate multi-threading for exactly this reason. It's a
mess to debug.

So all evidence suggest that the problem is within libssh2, with the crypto
functions or a funny combination of them.

- As already mentioned, try build libssh2 with gcrypt instead and see if the
problem changes/goes away.

- Build a separate test application that does the SFTP transfer only using
libssh2 (not involving libcurl at all) and see if you get the problem then. If
so, you should take this problem over to the libssh2-devel mailing list
instead and continue there. There are fine examples in the libssh2 release
archive and web site to use as a start for that.

- I'm not aware of any libssh2 bug fix for this symptom but it could be worth
trying out the current dev version of libssh2 just to make sure it isn't
already fixed. I've done some rather big changes in libssh2 lately.

- Did you try to run the app with valgrind to see what it says?

- Can the bug happen already with 2 threads?

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-11-12