curl-library
Re: curl_multi_remove_handle() crashes if called before transfers are complete.
Date: Wed, 9 Mar 2011 18:28:40 -0500
Below is the relevant output from dbx when I compiled the code with -g. This
code works fine about 50% of the time. Then breaks about the other 50% of
the time. So it seems like its a bad memory location. See below.
t_at_1 (l_at_1) signal SEGV (no mapping at the fault address) in ssh_statemach_act
at line 2036 in file "ssh.c"
2036 Curl_safefree(sftp_scp->path);
(dbx) where
current thread: t_at_1
=>[1] ssh_statemach_act(conn = 0x64d80, block = 0xffbfee74), line 2036 in
"ssh.c"
[2] ssh_easy_statemach(conn = 0x64d80, duringconnect = bool_false), line
2444 in "ssh.c"
[3] ssh_done(conn = 0x64d80, status = CURLE_OK), line 2727 in "ssh.c"
[4] sftp_done(conn = 0x64d80, status = CURLE_OK, premature = bool_true),
line 2894 in "ssh.c"
[5] Curl_done(connp = 0x44e0c, status = CURLE_OK, premature = bool_true),
line 5200 in "url.c"
[6] curl_multi_remove_handle(multi_handle = 0x43a30, curl_handle =
0x5c5f8), line 684 in "multi.c"
[7] main(), line 44 in "myCurlTest.C"
(dbx) up
Current function is ssh_easy_statemach
2444 result = ssh_statemach_act(conn, &block);
(dbx) up
Current function is ssh_done
2727 result = ssh_easy_statemach(conn, FALSE);
(dbx) up
Current function is sftp_done
2894 return ssh_done(conn, status);
(dbx) up
Current function is Curl_done
5200 result = conn->handler->done(conn, status, premature);
(dbx) up
Current function is curl_multi_remove_handle
684 (void)Curl_done(&easy->easy_conn, easy->result, premature);
(dbx) up
Current function is main
44 retVal = curl_multi_remove_handle(multiHandle,
newEasyHandle);
(dbx) print multiHandle
multiHandle = 0x43a30
(dbx) print newEasyHandle
newEasyHandle = 0x5c5f8
(dbx) x newEasyHandle
0x0005c5f8: 0x00000000
- Saqib
On Wed, Mar 9, 2011 at 12:57 PM, Saqib Ali <saqib.ali.75_at_gmail.com> wrote:
>
> Thanks. I have only encountered this crash while using SFTP. But I have not
> really tested it on other protocols. Can you reproduce the problem?
>
> I'll do the -g & bt and send them along shortly.
>
>
> - Saqib
>
>
>
>
>
> On Wed, Mar 9, 2011 at 12:44 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:
>
>> On Wed, 9 Mar 2011, Saqib Ali wrote:
>>
>> t_at_1 (l_at_1) signal SEGV (no mapping at the fault address) in
>>>> ssh_statemach_act at 0xff34f5a0
>>>> 0xff34f5a0: ssh_statemach_act+0x32c8: ld [%l2], %o0
>>>> (dbx)
>>>>
>>>
>> What if you build your libcurl with debug symbols (-g) and you issue 'bt'
>> when you get the crash?
>>
>> This indicates a problem in the SSH code, do you see the crash no matter
>> which protocol or with some particular ones?
>>
>>
>> --
>>
>> / daniel.haxx.se
>> -------------------------------------------------------------------
>> List admin: http://cool.haxx.se/list/listinfo/curl-library
>> Etiquette: http://curl.haxx.se/mail/etiquette.html
>>
>
>
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-03-10