cURL / Mailing Lists / curl-library / Single Mail

curl-library

libcurl multithreaded application - Crashing

From: asvija b <asvija_at_gmail.com>
Date: Wed, 3 Dec 2008 15:49:11 +0530

Hi all,

I've been using the 'libcurl' in a multithreaded C program. But frequently
the program is crashing .
I have tried to dump the core and the program is failing by the free() calls
used inside the libcurl.

The program is reporting a double free operation in libcurl and crashes.

Following is the backtrace of the core when it crashes complaining about the
double free operation.

Core was generated by `./a.out'.
Program terminated with signal 6, Aborted.
#0 0x00341402 in __kernel_vsyscall ()
(gdb) bt
#0 0x00341402 in __kernel_vsyscall ()
#1 0x00b12c00 in raise () from /lib/libc.so.6
#2 0x00b14451 in abort () from /lib/libc.so.6
#3 0x00b481fb in __libc_message () from /lib/libc.so.6
#4 0x00b4fe1e in _int_free () from /lib/libc.so.6
#5 0x00b535b0 in free () from /lib/libc.so.6
#6 0x00a38b94 in Curl_safefree () from /usr/lib/libcurl.so.4
#7 0x00a392d1 in Curl_disconnect () from /usr/lib/libcurl.so.4
#8 0x00a39578 in Curl_done () from /usr/lib/libcurl.so.4
#9 0x00a48cb7 in Curl_perform () from /usr/lib/libcurl.so.4
#10 0x00a48fc9 in curl_easy_perform () from /usr/lib/libcurl.so.4
#11 0x080586ce in download_data () at main.c:135
#12 0x08057f2e in producer (args=0x0) at thread.c:39
#13 0x00c5d2db in start_thread () from /lib/libpthread.so.0
#14 0x00bb712e in clone () from /lib/libc.so.6

I am running this application on a CentOS 5 Linux system -

Following curl rpms are installed :

curl-7.15.5-2.el5
curl-devel-7.15.5-2.el5

Thanks in advance for any help in this regard.

Regards,
Asvija
Received on 2008-12-03