cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[ curl-Bugs-3560856 ] crash in libssh2 while downloading file using multi thread

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Thu, 23 Aug 2012 00:05:34 -0700

Bugs item #3560856, was opened at 2012-08-22 19:57
Message generated for change (Comment added) made by bagder
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3560856&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: SCP/SFTP
Group: crash
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: young chopin (hgxxx007)
Assigned to: Daniel Stenberg (bagder)
Summary: crash in libssh2 while downloading file using multi thread

Initial Comment:
# cat /etc/SuSE-release
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 1

# uname -a
Linux linux49 2.6.32.45-0.3.2.3813.0.PTF-default #1 SMP 2011-08-22 10:12:58 +0200 x86_64 x86_64 x86_64 GNU/Linux

# uname -a
Linux ATAE_R3_250 2.6.32.12-0.7-default #1 SMP 2010-05-20 11:14:20 +0200 x86_64 x86_64 x86_64 GNU/Linux(gdb)

bt
#0 0x00007ffff6f95cef in memcpy () from /lib64/libc.so.6
#1 0x00007ffff7567ef1 in SHA1_Update () from /usr/lib64/libcrypto.so.0.9.8
#2 0x00007ffff759c086 in ?? () from /usr/lib64/libcrypto.so.0.9.8
#3 0x00007ffff72957e0 in _libssh2_transport_send (session=0x1196bd0, data=0x1097e1c "^", data_len=38, data2=0x7fffdc007904 "", data2_len=29) at transport.c:800
#4 0x00007ffff727b188 in _libssh2_channel_write (channel=0x1097bb0, stream_id=0, buf=0x7fffdc007904 "", buflen=29) at channel.c:2055
#5 0x00007ffff728cec2 in sftp_read (handle=0x7fffd8001da0,
    buffer=0x1173ec0 "\223?235?R*?W\001?225cSHb邢%\215A).QXB:?{(\201[.\225Q肯?\221?>.\203\017\003晤..?220饽?#?\005t\237n聿M.桠T?fb\234\002\037?\212@!?030^\211\n\\o??230?027?U.x\211r\213zP&L\030M主\021\060?214?L\204\215+GB!?\022#\226\033琢4C玎&\bE?, buffer_size=16384) at sftp.c:1221
#6 0x00007ffff728d2ec in libssh2_sftp_read (hnd=0x7fffd8001da0,
    buffer=0x1173ec0 "\223?235?R*?W\001?225cSHb邢%\215A).QXB:?{(\201[.\225Q肯?\221?>.\203\017\003晤..?220饽?#?\005t\237n聿M.桠T?fb\234\002\037?\212@!?030^\211\n\\o??230?027?U.x\211r\213zP&L\030M主\021\060?214?L\204\215+GB!?\022#\226\033琢4C玎&\bE?, buffer_maxlen=16384) at sftp.c:1374
#7 0x00007ffff78658db in sftp_recv () from ./libcurl.so.4
#8 0x00007ffff78397b1 in Curl_read () from ./libcurl.so.4
#9 0x00007ffff78518d6 in Curl_readwrite () from ./libcurl.so.4
#10 0x00007ffff7852a08 in Curl_do_perform () from ./libcurl.so.4
#11 0x000000000040dfe6 in merge_download_all_ts (m3u8_info=0x10db160) at merge_download.c:2465
#12 0x000000000040e829 in merge_download_thread (param=0x623820) at merge_download.c:2590
#13 0x00007ffff6cfe5f0 in start_thread () from /lib64/libpthread.so.0
#14 0x00007ffff6fe884d in clone () from /lib64/libc.so.6
#15 0x0000000000000000 in ?? ()
(gdb)

./curl --version
curl 7.24.0 (x86_64-unknown-linux-gnu) libcurl/7.24.0 OpenSSL/0.9.8h zlib/1.2.3 libssh2/1.4.0
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: IPv6 Largefile NTLM NTLM_WB SSL libz

# ldd libcurl.so
        linux-vdso.so.1 => (0x00007fff989ff000)
        libssh2.so.1 => ./libssh2.so.1 (0x00007f087bd2c000)
        librt.so.1 => /lib64/librt.so.1 (0x00007f087baed000)
        libssl.so.0.9.8 => /usr/lib64/libssl.so.0.9.8 (0x00007f087b899000)
        libcrypto.so.0.9.8 => /usr/lib64/libcrypto.so.0.9.8 (0x00007f087b51e000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f087b319000)
        libz.so.1 => /lib64/libz.so.1 (0x00007f087b103000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f087ada5000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f087ab87000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f087c1b6000)
# ldd libssh2.so.1
        linux-vdso.so.1 => (0x00007fffda1ff000)
        libssl.so.0.9.8 => /usr/lib64/libssl.so.0.9.8 (0x00007f2b64fcd000)
        libcrypto.so.0.9.8 => /usr/lib64/libcrypto.so.0.9.8 (0x00007f2b64c51000)
        libz.so.1 => /lib64/libz.so.1 (0x00007f2b64a3b000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f2b646dd000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f2b644d8000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f2b6547e000)

----------------------------------------------------------------------

>Comment By: Daniel Stenberg (bagder)
Date: 2012-08-23 00:05

Message:
Thanks for the report.

1 - do you have the openssl mutex callbacks set in your app to properly
work multi-threaded? If not, that's the explanation.

2 - can you please tell us how to repeat this problem in our end

3 - does this problem still appear if you try the same with recent versions
of openssl, libssh2 and libcurl ?

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3560856&group_id=976
Received on 2012-08-23

These mail archives are generated by hypermail.

donate! Page updated January 05, 2012.
web site info

File upload with ASP.NET