cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Segfault running a threaded application -Update

From: Abe Lederman <abe_at_deepwebtech.com>
Date: Tue, 3 Dec 2002 22:08:25 -0700

Daniel,

I believe that the problem that I was having last week was related to
getting a URL from a site where the request was timing out, and that the
problem would only occur when I was running my application
multi-threaded.

In my test the URL that was timing out was being retrieved every 11
requests and I was running 6 requests in parallel, and for a while I was
consistently getting a segfault after retrieving about 100 URLs total.
The segfault was not necessarily occurring when retrieving the URL that
was timing out.

When I removed the URL that was timing out from list of URLs to retrieve
I was able to process over 3000 URLs, so I am as certain as can be that
I'm only using one curl handle in one thread at all times and that the
same curl handle is not used in more than one thread at a time.

The site that was down is now up, and I have not been able to duplicate
my problem.

I did discover that the pthread stack and possibly other resources were
not been freed up until I did a pthread_join. I don't know if not
calling pthread_join could be related to the bug that I was seeing.

I'll let you know if I see the problem again.

Thanks,

Abe

-------------------------------------------------------
This SF.net email is sponsored by: Microsoft Visual Studio.NET
comprehensive development tool, built to increase your
productivity. Try a free online hosted session at:
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en
Received on 2002-12-04