cURL / Mailing Lists / curl-library / Single Mail

curl-library

code hangs with sftp downloads

From: E L <crc1021_at_gmail.com>
Date: Fri, 12 Sep 2008 07:59:48 -0500

I am using libcurl (7.19.0) with libssh2 (0.19.0-20080825) to do
downloads on windows XP, the downloading takes place in a separate
thread than the gui code. I'm testing on two computers, one computer
will get hung on a download and just busy-wait. The other computer
never has that happen. A stack snapshot from ProcessExplorer is this
0 ntkrnlpa.exe!ExAllocatePoolWithTag+0x8ab
1 ntkrnlpa.exe!MiAddWorkingSetPage+0x176
2 hal.dll!HalpApcInterrupt+0xc6
3 kernel32.dll!InterlockedDecrement+0xd
4 WS2_32.DLL!DSOCKET::DropDSocketReference+0xc
5 WS2_32.DLL!recv+0x8c
6 myprog.exe!libssh2_trace+0x3639
7 myprog.exe!libssh2_channel_read_ex+0x119
8 myprog.exe!curl_formfree+0x14f1
9 myprog.exe!curl_formfree+0x1b53
10 myprog.exe!libssh2_sftp_init+0x822
11 myprog.exe!curl_share_strerror+0x1036e
12 myprog.exe!curl_share_strerror+0x13649
13 myprog.exe!curl_share_strerror+0x137bb
14 myprog.exe!curl_share_strerror+0x58c0
15 myprog.exe!curl_share_strerror+0x7ad7
16 myprog.exe!curl_share_strerror+0x7c2d
17 myprog.exe!curl_share_strerror+0xd7bc
18 myprog.exe!curl_share_strerror+0xd924
19 myprog.exe!curl_easy_perform+0xf5
20 myprog.exe+0xed0e
21 myprog.exe+0xc644
22 myprog.exe+0x7cf1
23 wxmsw28_gcc_mingw.dll!ZN11wxSemaphore7TryWaitEv+0x84
24 wxmsw28_gcc_mingw.dll!ZN11wxSemaphore7TryWaitEv+0x10d
25 msvcrt.dll!_endthreadex+0xa9
26 kernel32.dll!BaseThreadStart+0x37

When I run it in gdb, I can see that the lowest level calls always
return PACKET_EAGAIN, so the curl state machine never advances and it
get stuck calling the same code.

Any thoughts?

Eric
Received on 2008-09-12