cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: running_handles: less than zero ?

From: Jeff Pohlmeyer <yetanothergeek_at_gmail.com>
Date: Wed, 11 Oct 2006 04:53:56 -0500

> I think we need to add a debug function to libcurl to "dump" all sockets it
> currently expects traffic for in/out, and then make a similar for the
> application so that we at any given moment can display both and check for
> deviations.

I already have a function for the app, in the "hacked-up" version.

I sent it along with http://curl.haxx.se/mail/lib-2006-10/0113.html
but for some reason it looks like gmail may have sent just an empty
file instead (http://curl.haxx.se/mail/lib-2006-10/att-0113/hiperfifo.c )
So I am sending it along again this time.

Basically, the fifo-reading code just checks for the string "DEBUG"
and if it finds that instead of a URL string, it will run the is_debug()
function, so I can do whatever kind of dumping we need from there.

Currently, I have the is_debug() procedure set up to just run a
curl_multi_socket_all() loop, which seems to do the job of getting
past the stall without adding another URL.

> I think I'll commit the timer callback work first, since it is a good
> idea to have and it shouldn't make the problem worse.

Great! Glad to have it in.

> Just to be sure: you build libcurl with a c-ares from CVS, don't you?

Yes, ares 1.3.1 from CVS. I am linking ares dynamically (--enable-shared)
but I don't suppose that would make any difference.

BTW, if I try to use pipelining and ares at the same time, sometimes I
get a nasty crash:

* STATE: INIT => CONNECT handle 0x8071264; (connection #-1)
* Re-using existing connection! (#0) with host www.geocities.com
* About to connect() to www.geocities.com port 80
* Expire at 1160559926 / 492193 (29998ms)

Program received signal SIGSEGV, Segmentation fault.
0xb7f6feba in Curl_connecthost (conn=0x806422c, remotehost=0x0,
                                sockconn=0x80642a4, addr=0xbfe681a8,
                                connected=0xbfe681e7 "") at connect.c:851
851 num_addr = Curl_num_addresses(remotehost->addr);

( Notice remotehost is NULL, so remotehost->addr doesn't work. )

 - Jeff

Received on 2006-10-11