cURL / Mailing Lists / curl-users / Single Mail

curl-users

broken pipe

From: brubelsabs <brubelsabs_at_googlemail.com>
Date: Thu, 31 Jul 2008 11:32:56 +0200

Hi,

I've coded a small program checking some URLs and if I use some more
URLs, about 3000, the program crashes with a broken pipe. It seems that
this somehow depends on how much URLs are used.

################################GDB######################################
Program received signal SIGPIPE, Broken pipe.
[Switching to Thread 0xb6a828f0 (LWP 8073)]
0xb7f83410 in __kernel_vsyscall ()
(gdb) where
#0 0xb7f83410 in __kernel_vsyscall ()
#1 0xb7ca62f3 in write () from /lib/tls/i686/cmov/libc.so.6
#2 0xb799cdd1 in ?? () from /usr/lib/i686/cmov/libcrypto.so.0.9.8
#3 0xb799ac73 in BIO_write () from /usr/lib/i686/cmov/libcrypto.so.0.9.8
#4 0xb7a5eabe in ssl3_write_pending () from
/usr/lib/i686/cmov/libssl.so.0.9.8
#5 0xb7a5ee14 in ?? () from /usr/lib/i686/cmov/libssl.so.0.9.8
#6 0xb7a5ef8d in ssl3_dispatch_alert () from
/usr/lib/i686/cmov/libssl.so.0.9.8
#7 0xb7a5e9bb in ssl3_send_alert () from /usr/lib/i686/cmov/libssl.so.0.9.8
#8 0xb7a5c3be in ssl3_shutdown () from /usr/lib/i686/cmov/libssl.so.0.9.8
#9 0xb7a6d9bc in SSL_shutdown () from /usr/lib/i686/cmov/libssl.so.0.9.8
#10 0xb7f4bce9 in ?? () from /usr/lib/libcurl.so.4
#11 0xb7f5ff84 in ?? () from /usr/lib/libcurl.so.4
#12 0xb7f454ee in ?? () from /usr/lib/libcurl.so.4
#13 0xb7f45d71 in ?? () from /usr/lib/libcurl.so.4
#14 0xb7f4673a in ?? () from /usr/lib/libcurl.so.4
#15 0xb7f59531 in ?? () from /usr/lib/libcurl.so.4
#16 0xb7f59e69 in curl_multi_perform () from /usr/lib/libcurl.so.4
#17 0x08072c9c in RequestPool::_startTransferWave (this=0xbf98a244) at
/home/me/prog/src/requestpool.cpp:97
#18 0x08072fca in RequestPool::_perform (this=0xbf98a244,
domainBuckets=@0xbf98a1b8) at /home/me/prog/src/requestpool.cpp:161
#19 0x080732cd in RequestPool::receive (this=0xbf98a244, method=GET,
selector=0x8070e60 <matchAll(Request*)>) at
/home/me/prog/src/requestpool.cpp:228
#20 0x0806dee3 in main (argc=Cannot access memory at address 0x0
) at /home/me/prog/src/main.cpp:68
(gdb) cont
Continuing.

Program terminated with signal SIGPIPE, Broken pipe.
The program no longer exists.
(gdb)
################################GDB######################################

last line (requestpool.cpp 97) my code calls is this:
 while(CURLM_CALL_MULTI_PERFORM == curl_multi_perform(_handle,
                                       &handles));

I've read: http://curl.haxx.se/mail/lib-2006-01/0170.html that this
isn't an issue with libcurl but with libssl, and I should implement a
signal handler ignoring the SIGPIPE, but this was some time ago and
maybe there is now a proper solution? I use libcurl together with
libares. Here some more informations about the system I develop on:

curl -V
 curl 7.18.0 (i486-pc-linux-gnu) libcurl/7.18.0 OpenSSL/0.9.8g
zlib/1.2.3.3 c-ares/1.5.1 libidn/1.1
 Protocols: tftp ftp telnet dict ldap ldaps http file https ftps
 Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz
uname -a
 Linux localhost 2.6.24-19-generic #1 SMP Fri Jul 11 23:41:49 UTC 2008
 i686 GNU/Linux
ulimit -a
 core file size (blocks, -c) 0
 data seg size (kbytes, -d) unlimited
 scheduling priority (-e) 0
 file size (blocks, -f) unlimited
 pending signals (-i) 16039
 max locked memory (kbytes, -l) 32
 max memory size (kbytes, -m) unlimited
 open files (-n) 1024
 pipe size (512 bytes, -p) 8
 POSIX message queues (bytes, -q) 819200
 real-time priority (-r) 0
 stack size (kbytes, -s) 8192
 cpu time (seconds, -t) unlimited
 max user processes (-u) 16039
 virtual memory (kbytes, -v) unlimited
 file locks (-x) unlimited

kind regards
Mathias
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2008-07-31