php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39599 curl_exec crashes
Submitted: 2006-11-22 23:57 UTC Modified: 2006-11-29 21:11 UTC
From: ken at smallboxsoftware dot net Assigned:
Status: Not a bug Package: URL related
PHP Version: 5.2.0 OS: Centos Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ken at smallboxsoftware dot net
New email:
PHP Version: OS:

 

 [2006-11-22 23:57 UTC] ken at smallboxsoftware dot net
Description:
------------
curl_exec crashes when connecting to a URL via SSL

GDB returns the following information: 

Starting program: /usr/local/bin/php test
[Thread debugging using libthread_db enabled]
[New Thread -1208211776 (LWP 24168)]
*** glibc detected *** free(): invalid pointer: 0x00291c80 ***

Program received signal SIGABRT, Aborted.
[Switching to Thread -1208211776 (LWP 24168)]
0x004737a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2


PHP compiled as follows:

'./configure' '--with-gd' '--with-ttf' '--with-freetype-dir=/usr/lib/' '--with-mysql' '--enable-ftp' '--with-zlib' '--with-png-dir=/usr/lib/' '--with-jpeg-dir=/usr/lib/' '--enable-mbstring' '--with-imap=/usr/' '--with-kerberos' '--with-imap-ssl' '--with-curl=/usr/lib' '--with-cyrus' '--with-mysqli' '--enable-debug'

Reproduce code:
---------------
<?php 
 $url = "https://www.mysite.com";
 $ch = curl_init();
 curl_setopt($ch, CURLOPT_URL,$url);
 $response=curl_exec($ch);
?>



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-23 10:11 UTC] tony2001@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2006-11-26 19:22 UTC] ken at smallboxsoftware dot net
#0  0x004737a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x0092c7a5 in raise () from /lib/tls/libc.so.6
#2  0x0092e209 in abort () from /lib/tls/libc.so.6
#3  0x0096071a in __libc_message () from /lib/tls/libc.so.6
#4  0x00966fbf in _int_free () from /lib/tls/libc.so.6
#5  0x0096733a in free () from /lib/tls/libc.so.6
#6  0x003070e7 in operator delete () from /usr//lib/libmysqlclient.so.15
#7  0x002fee18 in yaSSL::ysDelete<yaSSL::SSL_METHOD> ()
   from /usr//lib/libmysqlclient.so.15
#8  0x0030a74e in yaSSL::SSL_CTX::~SSL_CTX () from /usr//lib/libmysqlclient.so.15
#9  0x002fead0 in yaSSL::ysDelete<yaSSL::SSL_CTX> () from /usr//lib/libmysqlclient.so.15
#10 0x002faf9b in SSL_CTX_free () from /usr//lib/libmysqlclient.so.15
#11 0x0063ea90 in Curl_SSL_Close () from /usr//lib/libcurl.so.3
#12 0x00637f42 in Curl_disconnect () from /usr//lib/libcurl.so.3
#13 0x0063a335 in Curl_connect () from /usr//lib/libcurl.so.3
#14 0x0064738d in Curl_follow () from /usr//lib/libcurl.so.3
#15 0x006475b4 in Curl_perform () from /usr//lib/libcurl.so.3
#16 0x00647d02 in curl_easy_perform () from /usr//lib/libcurl.so.3
#17 0x080b5f7d in zif_curl_exec (ht=1, return_value=0xb7f8ef54, return_value_ptr=0x0,
    this_ptr=0x0, return_value_used=1)
    at /usr/local/src/php-5.2.0/ext/curl/interface.c:1656
#18 0x0836c551 in zend_do_fcall_common_helper_SPEC (execute_data=0xbfe10f80)
    at /usr/local/src/php-5.2.0/Zend/zend_vm_execute.h:200
#19 0x08370f81 in ZEND_DO_FCALL_SPEC_CONST_HANDLER (execute_data=0xbfe10f80)
    at /usr/local/src/php-5.2.0/Zend/zend_vm_execute.h:1681
#20 0x0836c166 in execute (op_array=0xb7f8e1b4)
    at /usr/local/src/php-5.2.0/Zend/zend_vm_execute.h:92
#21 0x0834e890 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
    at /usr/local/src/php-5.2.0/Zend/zend.c:1097
#22 0x08308d72 in php_execute_script (primary_file=0xbfe13350)
    at /usr/local/src/php-5.2.0/main/main.c:1758
#23 0x083b2845 in main (argc=2, argv=0xbfe13434)
    at /usr/local/src/php-5.2.0/sapi/cgi/cgi_main.c:1625
 [2006-11-27 09:56 UTC] tony2001@php.net
Not PHP problem.
See http://bugs.mysql.com/19817
 [2006-11-29 21:08 UTC] ken at smallboxsoftware dot net
This is probably still bogus, but upgraded mysql which has fixed thefirst crash - to reveal a second one. 

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208875328 (LWP 2552)]
0x006a1377 in SSL_SESSION_new () from /lib/libssl.so.4
(gdb) bt
#0  0x006a1377 in SSL_SESSION_new () from /lib/libssl.so.4
#1  0x006a214a in SSL_CTX_get_timeout () from /lib/libssl.so.4
#2  0x00b1556e in lh_retrieve () from /lib/libcrypto.so.4
#3  0x006a21f7 in SSL_CTX_flush_sessions () from /lib/libssl.so.4
#4  0x0069e1a3 in SSL_CTX_free () from /lib/libssl.so.4
#5  0x0063ea90 in Curl_SSL_Close () from /usr//lib/libcurl.so.3
#6  0x00637f42 in Curl_disconnect () from /usr//lib/libcurl.so.3
#7  0x00639848 in Curl_done () from /usr//lib/libcurl.so.3
#8  0x0064771e in Curl_perform () from /usr//lib/libcurl.so.3
#9  0x00647d02 in curl_easy_perform () from /usr//lib/libcurl.so.3
#10 0x080b5f7d in zif_curl_exec (ht=1, return_value=0xb7eea3a4, return_value_ptr=0x0,
    this_ptr=0x0, return_value_used=1)
    at /usr/local/src/php-5.2.0/ext/curl/interface.c:1656
#11 0x0836c551 in zend_do_fcall_common_helper_SPEC (execute_data=0xbff52850)
    at /usr/local/src/php-5.2.0/Zend/zend_vm_execute.h:200
#12 0x08370f81 in ZEND_DO_FCALL_SPEC_CONST_HANDLER (execute_data=0xbff52850)
    at /usr/local/src/php-5.2.0/Zend/zend_vm_execute.h:1681
#13 0x0836c166 in execute (op_array=0xb7ee81b4)
    at /usr/local/src/php-5.2.0/Zend/zend_vm_execute.h:92
#14 0x0834e890 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
    at /usr/local/src/php-5.2.0/Zend/zend.c:1097
#15 0x08308d72 in php_execute_script (primary_file=0xbff54c20)
    at /usr/local/src/php-5.2.0/main/main.c:1758
#16 0x083b2845 in main (argc=2, argv=0xbff54d04)
    at /usr/local/src/php-5.2.0/sapi/cgi/cgi_main.c:1625
 [2006-11-29 21:11 UTC] tony2001@php.net
Yep, still we can do nothing about it.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 11:01:30 2024 UTC