curl-library
Re: libcurl hang in poll() using easy interface
Date: Wed, 14 Feb 2007 19:03:05 -0800 (PST)
I think I have figured it out thanks to some previous messages. I had not setup openssl callbacks. I was using easy interface on a multi-threaded crawler application with multiple threads retrieving data in parallel using independent curl handles. I was reusing curl handles (but not simultaneously) and using curl_share interface for DNS caching/sharing. The app would run normally for a while before loosing threads to the given deadlock/hang over an extended run.
>> And this hangs for more than 1000 ms?
Yes. There was no way to recover a hung thread. It did not timeout. However the rest of application including other curl handles worked fine during this.
>> And you're sure that you do get traffic on this socket, that would make it stop waiting?
I was getting traffic. Individual threads worked normally for a while until they ran into this issue.
Thanks,
Sami
----- Original Message ----
From: Daniel Stenberg <daniel_at_haxx.se>
To: libcurl development <curl-library_at_cool.haxx.se>
Sent: Wednesday, February 14, 2007 5:24:44 AM
Subject: Re: libcurl hang in poll() using easy interface
On Mon, 12 Feb 2007, Sami M wrote:
> I am using libcurl v7.15.5 in a multi threaded (crawler) application. I get
> occational hangs in some threads. I was thinking it might be a known issue.
No, I don't think we've got this reported before.
> #0 0xffffe402 in __kernel_vsyscall ()
> #1 0x00aba503 in poll () from /lib/libc.so.6
> #2 0x080d597d in Curl_select (readfd=36, writefd=-1, timeout_ms=1000) at
> select.c:101
And this hangs for more than 1000 ms? Or is it repeatedly called and hangs
1000ms per call? And you're sure that you do get traffic on this socket, that
would make it stop waiting?
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.html ____________________________________________________________________________________ TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV. http://tv.yahoo.com/Received on 2007-02-15