#247: crash in libssh2 while downloading file using multi thread -----------------------------------+-------------------- Reporter: hgxxx007 | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: SFTP | Version: 1.4.1 Keywords: crash libssh2 libcurl | Blocked By: Blocks: | -----------------------------------+-------------------- # cat /etc/SuSE-release SUSE Linux Enterprise Server 11 (x86_64) VERSION = 11 PATCHLEVEL = 1
# 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 # 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 (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琢4C玎&\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琢4C玎&\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) -- Ticket URL: <https://trac.libssh2.org/ticket/247> libssh2 <https://trac.libssh2.org/> C library for writing portable SSH2 clients _______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel