cURL / Mailing Lists / curl-library / Single Mail

curl-library

segfault in curl_easy_perform

From: Dave S <snidely.too_at_gmail.com>
Date: Thu, 22 Oct 2015 12:19:39 -0700

I get a sigsegv in curl_easy_perform() for certain URLs. I'm trying
to access a local server on port 7070, and as I tweak the URL to try
get it right, some of the combinations give me a coredump (which
abrt_server takes away, not trusting me). System is a Centos 7
setup. What should I be doing to avoid the coredump?

BTW, I know the server I'm trying to reach works, as I can access it
via curl on its host (using its REST API), and via WinInet on another
client. I can even access the REST API via command line curl on the
client I'm segfaulting on.

Details shown below. Thanks for your help.

Dave
/dps

/var/log/messages (and dmesg) show
"general protection ip:7f52a7953a94 sp:7fff5c5e9810 error:0 in
libc-2.17.so[7f52a790b000+1b6000]"

From strace, I get this set of events:

fcntl(3, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK)
fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
getpeername(3, {sa_family=AF_INET, sin_port=htons(7070),
sin_addr=inet_addr("10.3.171.27")}, [16]) = 0
close(6) = 0
getpeername(3, {sa_family=AF_INET, sin_port=htons(7070),
sin_addr=inet_addr("10.3.171.27")}, [16]) = 0
sendto(3, "\26\3\1\0H\1\0\0D\3\1\255\2619\342\372\211\343\216\373\272\217\203_\206\345\252t\360\315s\311"...,
77, 0, NULL, 0) = 77
recvfrom(3, 0x2321bb8, 5, 0, 0, 0) = -1 EAGAIN (Resource
temporarily unavailable)
poll([{fd=3, events=POLLIN|POLLPRI}], 1, 5000) = 1 ([{fd=3, revents=POLLIN}])
recvfrom(3, "HTTP/", 5, 0, NULL, NULL) = 5
sendto(3, "\25\3\1\0\2\2\n", 7, 0, NULL, 0) = 7
close(3) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SI_KERNEL, si_addr=0} ---
+++ killed by SIGSEGV (core dumped) +++

Version information is via curl command:

curl --version
curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.15.4
zlib/1.2.7 libidn/1.28 libssh2/1.4.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps
pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz

uname -a
Linux dpsbldrcos 3.10.0-229.11.1.el7.x86_64 #1 SMP Thu Aug 6 01:06:18
UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

 cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

-- 
test signature -- please apply at front gate on Tuesdays only.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2015-10-22