curl-library
Re: curl segfault
Date: Mon, 24 Mar 2003 08:45:17 +0100
I have a more interesting stack trace this time :
(gdb) bt
#0 0x280ad73e in addbyter (output=67, data=0xbfa54060) at mprintf.c:959
#1 0x280acc1a in dprintf_formatf (data=0xbfa54060, stream=0x280ad724
#<addbyter>, format=0x280b7e80 "Connect timeout on IP number %d",
ap_save=0xbfa540ac "IA¥¿\220\037") at mprintf.c:617
#2 0x280ad7db in curl_mvsnprintf (buffer=0x8d1075ff <Error reading address
#0x8d1075ff: Bad address>, maxlength=256,
format=0x280b7e80 "Connect timeout on IP number %d", ap_save=0xbfa540ac
"IA¥¿\220\037") at mprintf.c:996
#3 0x280a2d16 in Curl_failf (data=0x280a6ef6, fmt=0x280b7e80 "Connect
#timeout on IP number %d") at sendf.c:154 4 0x280b30bc in Curl_connecthost
#(conn=0x9da4000, remotehost=0xaa4cc50, port=-1079688769,
#sockconn=0x8956100, addr=0x280b9940,
connected=0xbfa54328 "") at connect.c:678
#5 0x280a8a95 in CreateConnection (data=0xa399000, in_connect=0xbfa54328)
#at url.c:2819 6 0x280a8b78 in Curl_connect (data=0xa399000,
#in_connect=0xbfa54328) at url.c:2865 7 0x280b1f62 in Curl_perform
#(data=0xa399000) at transfer.c:1576 8 0x280b22e9 in curl_easy_perform
#(curl=0xa399000) at easy.c:247 9 0x0807130a in ExecuterRequeteHTTP
#(mydata=0xbfa54f64, curl_handle=0xa399000) at pxd.c:216 10 0x08072b55 in
#SousTraiter (mydata=0xbfa54f64, curl_handle=0xa399000) at pxd.c:754 11
#0x08072e9c in TraiterConnexion (connexion=-1928301057,
#pAdresseDistante=0x8d1075ff, NumeroConnexion=14403) at pxd.c:864 12
#0x08068178 in Thread_Traiter (params=0x97c6ce0) at pthreads.cc:299 13
#0x080682e5 in Spawn_Traiter (myh=0x80eaac0) at pthreads.cc:349 14
#0x281898e7 in _thread_start () from /usr/lib/libc_r.so.4
(gdb) frame 4
#4 0x280b30bc in Curl_connecthost (conn=0x9da4000, remotehost=0xaa4cc50,
#port=-1079688769, sockconn=0x8956100, addr=0x280b9940,
connected=0xbfa54328 "") at connect.c:678
678 failf(data, "Connect timeout on IP number %d",
aliasindex+1);
(gdb) print conn
$20 = (struct connectdata *) 0x3e7b3bf3
(gdb) print *conn
Error accessing memory address 0x3e7b3bf3: Bad address.
(gdb) up
#5 0x280a8a95 in CreateConnection (data=0xa399000, in_connect=0xbfa54328)
#at url.c:2819
2819 result = ConnectPlease(conn, hostaddr, &connected);
(gdb) print conn
$21 = (struct connectdata *) 0x9da4000
(gdb) print *conn
$22 = {data = 0xa399000, connectindex = 0, protocol = 4, connect_addr =
0x0, serv_addr = {sin_len = 0 '\0', sin_family = 0 '\0', sin_port = 0,
sin_addr = {s_addr = 0}, sin_zero = "\0\0\0\0\0\0\0"}, protostr = "http",
'\0' <repeats 59 times>, gname = "192.168.100.249\08080", '\0' <repeats
492 times>, name = 0x9da4060 "192.168.100.249", path = 0x8956100
"/w0819ea52.2e871d7a:00000004/t02/_00000f5c.jpeg", hostname = 0x9da4060
"192.168.100.249", port = 8080, remote_port = 8080, ppath = 0x8956100
"/w0819ea52.2e871d7a:00000004/t02/_00000f5c.jpeg", bytecount = 0,
notice how conn doesnt have the same value in frame 4 and 5 ? In frame 5 is
looks ok but below it points nowhere. Curl_connecthost is nevertheless
called with the right argument, so there seem to be some subtle stack
corruption below. Maybe it has to see with the connect timeout ?
FYI i have removed all timeouts and added the NOSIGNAL option.
If anyone has a clue please let me know :)
Best regards,
Philippe
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
Received on 2003-03-24