curl-library
Re: Bug in libcurl in multithreaded program
Date: Wed, 22 May 2002 23:48:11 +0200 (MET DST)
On Wed, 22 May 2002, Avery Fay wrote:
> I wasn't aware of the CURLOPT_DNS_USE_GLOBAL_CACHE option. (Is the default
> on?
No, it defaults to FALSE/off.
> In this case, the example multithreaded program should be updated) However,
> even after I set it to false the problem persists.
Does it still give you the same stack trace? The trace looks a bit funny (the
double Curl_ftp_done for example) but it seems as if the code believes the
global DNS cache is enabled.
Can you build libcurl with -g (and without -O or -O2) to get a more detailed
stack trace from the crash?
> My program is fairly simple. Basically, generate a list of ftp and http
> urls to a specified server. Create a bunch of threads. Each thread randomly
> picks a url from the list, fetches the file, and repeats. In terms of using
> libcurl, the only functions i'm using are curl_easy_init and curl_setopt to
> set the url. Since the threads keep on fetching until the program is killed
> I never call curl_easy_cleanup. I've tried compiling both the library and
> my program with gcc -O0 (no optimizations) but the segfaulting persists.
Can you make a (possibly edited) version available for us that we can try to
repeat this problem with?
Can you make it happen using only two threads?
-- Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/ _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfmReceived on 2002-05-22