#223: errors in multi threads applications
------------------------------------+---------------------------------------
Reporter: mmichele1974@… | Owner:
Type: defect | Status: new
Priority: normal | Milestone: 1.2.9
Component: SFTP | Version: 1.2.7
Keywords: sftp curl multithread | Blocks:
Blocked By: |
------------------------------------+---------------------------------------
Hi,
I'm using libCURL with libssh2 to make multiple put/get to/from sftp
sites.
In order to make my application thread-safe I added the two callbacks:
CRYPTO_set_id_callback(pthreads_thread_id_callback);
CRYPTO_set_locking_callback(pthreads_locking_callback);
in order to lock common data user to crypt/decrypt.
Unfortunately I take the following segfault:
(gdb) where
#0 0x0000000000000000 in ?? ()
#1 0x0000003980c1bd33 in _libssh2_cipher_crypt (ctx=<value optimized
out>, algo=<value optimized out>, encrypt=<value optimized out>,
block=0x7fe45c01f450 "")
at openssl.c:197
#2 0x0000003980c18cc9 in _libssh2_transport_write
(session=0x7fe45c00af10, data=0x7fe45c017f80 "^", data_len=16422) at
transport.c:819
#3 0x0000003980c05c6c in _libssh2_channel_write (channel=0x7fe45c0103f0,
stream_id=0, buf=0x7fe45c013f50 "", buflen=16413) at channel.c:2014
#4 0x0000003980c1356a in sftp_write (hnd=0x7fe45c00fdd0,
buffer=0x7fe45c005989 "", count=<value optimized out>) at sftp.c:1432
#5 libssh2_sftp_write (hnd=0x7fe45c00fdd0, buffer=0x7fe45c005989 "",
count=<value optimized out>) at sftp.c:1486
#6 0x000000398183b4e3 in Curl_sftp_send () from /usr/lib64/libcurl.so.4
#7 0x0000003981817a65 in Curl_write () from /usr/lib64/libcurl.so.4
#8 0x000000398182b1c7 in Curl_readwrite () from /usr/lib64/libcurl.so.4
#9 0x000000398182bca8 in Curl_perform () from /usr/lib64/libcurl.so.4
#10 0x00007fe4c30eded3 in acs::curl::Curl::performTransfer
(this=0x7fe4a4011cc0, isGet=false, fileToTransfer="", targetFilename=
"/data/testDSDdata/outBasketDC-Implicit//.bigTar.tar",
readData=0x7fe4a4011cc0) at Curl.C:522
...
How can I solve this issue?
Thanks.
-- Ticket URL: <http://trac.libssh2.org/ticket/223> libssh2 <http://trac.libssh2.org/> C library for writing portable SSH2 clients _______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-develReceived on 2011-08-12