php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49045 Crash when connecting to different web services (caused by --with-curlwrappers)
Submitted: 2009-07-24 08:49 UTC Modified: 2009-08-11 01:00 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: kelvin at netbasic dot co dot uk Assigned: jani (profile)
Status: No Feedback Package: SOAP related
PHP Version: 5.3.0 OS: Centos 4.7 and 5.3
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: kelvin at netbasic dot co dot uk
New email:
PHP Version: OS:

 

 [2009-07-24 08:49 UTC] kelvin at netbasic dot co dot uk
Description:
------------
The PHP 5.3 SoapClient seems to have trouble connecting to certain 
services, we use a lot of 3rd party SOAP web services and have no issues 
using them with PHP 5.2.x, but 5.3 seems to have problems with around 
50% of them.

The problem seems to occur mostly upon instantiation of the SoapClient 
when using a Windows based service with a WSDL, as far I can tell it 
doesn't like the initial response.

Reproduce code:
---------------
        $url = 'http://webservices.data-8.co.uk/TelephoneValidation.asmx?WSDL';
        echo "creating client..<Br>";
        $client = new SoapClient($url);
        echo "client created..";

Expected result:
----------------
You would see the output below, and have a useable SoapClient object:

creating client..
client created..

Actual result:
--------------
Nothing will be returned and you will get an seg fault error in the 
Apache logs.

[Fri Jul 24 09:37:10 2009] [notice] child pid 17265 exit signal 
Segmentation fault (11)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-24 11:48 UTC] felipe@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.


 [2009-07-24 13:27 UTC] kelvin at netbasic dot co dot uk
Hi,

This the backtrace run from the commandline php (Seems our apache 
config doesn't work to well with gdb)

#0  0x0075df2d in strncasecmp () from /lib/libc.so.6
#1  0x006bee4b in curl_strnequal () from /usr/lib/libcurl.so.3
#2  0x006a519c in ?? () from /usr/lib/libcurl.so.3
#3  0x006a6d59 in Curl_http () from /usr/lib/libcurl.so.3
#4  0x006b2810 in Curl_do () from /usr/lib/libcurl.so.3
#5  0x006c190b in ?? () from /usr/lib/libcurl.so.3
#6  0x006c1e9c in curl_multi_perform () from /usr/lib/libcurl.so.3
#7  0x08148b90 in php_curl_stream_read (stream=0x912fde8, 
buf=0x9130964 "\\\t\023\t\\\t\023\t???\b", count=8192) at /root/t/php-
5.3.0/ext/curl/streams.c:184
#8  0x083373b6 in php_stream_fill_read_buffer (stream=0x912fde8, 
size=4000) at /root/t/php-5.3.0/main/streams/streams.c:562
#9  0x08337653 in _php_stream_read (stream=0x912fde8, buf=0x91b5d90 
"", size=4000) at /root/t/php-5.3.0/main/streams/streams.c:605
#10 0x04690870 in xmlParserInputBufferGrow () from 
/usr/lib/libxml2.so.2
#11 0x04669331 in xmlParserInputGrow () from /usr/lib/libxml2.so.2
#12 0x0466d3fc in ?? () from /usr/lib/libxml2.so.2
#13 0x0467f0bc in xmlParseDocument () from /usr/lib/libxml2.so.2
#14 0x08258e37 in soap_xmlParseFile (filename=0x912f30c 
"http://webservices.data-8.co.uk/TelephoneValidation.asmx?WSDL")
    at /root/t/php-5.3.0/ext/soap/php_xml.c:100
#15 0x0824b611 in load_wsdl_ex (this_ptr=0x912ed48, struri=0x912f30c 
"http://webservices.data-8.co.uk/TelephoneValidation.asmx?WSDL", 
ctx=0xbfb69450, 
    include=0) at /root/t/php-5.3.0/ext/soap/php_sdl.c:240
#16 0x08256979 in get_sdl (this_ptr=0x912ed48, uri=0x912f30c 
"http://webservices.data-8.co.uk/TelephoneValidation.asmx?WSDL", 
    cache_wsdl=<value optimized out>) at /root/t/php-
5.3.0/ext/soap/php_sdl.c:654
#17 0x082268c1 in zim_SoapClient_SoapClient (ht=1, 
return_value=0x912f870, return_value_ptr=0x0, this_ptr=0x912ed48, 
return_value_used=0)
    at /root/t/php-5.3.0/ext/soap/soap.c:2671
#18 0x0838b3b6 in zend_do_fcall_common_helper_SPEC 
(execute_data=0x9162688) at /root/t/php-
5.3.0/Zend/zend_vm_execute.h:313
#19 0x0838a838 in execute (op_array=0x912f204) at /root/t/php-
5.3.0/Zend/zend_vm_execute.h:104
#20 0x0836e58b in zend_execute_scripts (type=8, retval=0x0, 
file_count=3) at /root/t/php-5.3.0/Zend/zend.c:1188
#21 0x08327ed3 in php_execute_script (primary_file=0xbfb6cc50) at 
/root/t/php-5.3.0/main/main.c:2196
#22 0x083e4e9c in main (argc=2, argv=0xbfb6cd44) at /root/t/php-
5.3.0/sapi/cli/php_cli.c:1188)
 [2009-07-25 22:25 UTC] jani@php.net
Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

I believe this should be fixed now. And really had nothing to do with 
SOAP extension itself. :)
 [2009-07-26 01:16 UTC] kelvin at netbasic dot co dot uk
Hi Jani

Thanks for looking into this so quickly, unfortunately its still 
occuring, I've tested the last 2 snapshots on both Ubuntu and CentOS 
with the same result, I've attached another backtrace -


Program received signal SIGSEGV, Segmentation fault.
0x006f6f2d in strncasecmp () from /lib/libc.so.6
(gdb) bt
#0  0x006f6f2d in strncasecmp () from /lib/libc.so.6
#1  0x00d0505b in curl_strnequal () from /usr/lib/libcurl.so.3
#2  0x00ceb1bc in ?? () from /usr/lib/libcurl.so.3
#3  0x00cecd89 in Curl_http () from /usr/lib/libcurl.so.3
#4  0x00cf89b0 in Curl_do () from /usr/lib/libcurl.so.3
#5  0x00d07b2b in ?? () from /usr/lib/libcurl.so.3
#6  0x00d080bc in curl_multi_perform () from /usr/lib/libcurl.so.3
#7  0x081507ff in php_curl_stream_read (stream=0x99778c0, 
buf=0x997931c "\024\223\227\t\024\223\227\t?g\203\t", count=8192)
    at /root/t/php5.3-200907260030/ext/curl/streams.c:184
#8  0x08383324 in php_stream_fill_read_buffer (stream=0x99778c0, 
size=4000) at /root/t/php5.3-200907260030/main/streams/streams.c:562
#9  0x083835da in _php_stream_read (stream=0x99778c0, buf=0x99f52d8 
"", size=4000) at /root/t/php5.3-
200907260030/main/streams/streams.c:605
#10 0x0014b870 in xmlParserInputBufferGrow () from 
/usr/lib/libxml2.so.2
#11 0x00124331 in xmlParserInputGrow () from /usr/lib/libxml2.so.2
#12 0x001283fc in ?? () from /usr/lib/libxml2.so.2
#13 0x0013a0bc in xmlParseDocument () from /usr/lib/libxml2.so.2
#14 0x0828edcf in soap_xmlParseFile (filename=0x997769c 
"http://webservices.data-8.co.uk/TelephoneValidation.asmx?WSDL")
    at /root/t/php5.3-200907260030/ext/soap/php_xml.c:100
#15 0x082849eb in load_wsdl_ex (this_ptr=0x9977180, struri=0x997769c 
"http://webservices.data-8.co.uk/TelephoneValidation.asmx?WSDL", 
ctx=0xbfbfeb08, include=0)
    at /root/t/php5.3-200907260030/ext/soap/php_sdl.c:240
#16 0x08288ef6 in load_wsdl (this_ptr=0x9977180, struri=0x997769c 
"http://webservices.data-8.co.uk/TelephoneValidation.asmx?WSDL")
    at /root/t/php5.3-200907260030/ext/soap/php_sdl.c:654
#17 0x0828a76f in get_sdl (this_ptr=0x9977180, uri=0x997769c 
"http://webservices.data-8.co.uk/TelephoneValidation.asmx?WSDL", 
cache_wsdl=1)
    at /root/t/php5.3-200907260030/ext/soap/php_sdl.c:3227
#18 0x0825cc68 in zim_SoapClient_SoapClient (ht=1, 
return_value=0x9977714, return_value_ptr=0x0, this_ptr=0x9977180, 
return_value_used=0)
    at /root/t/php5.3-200907260030/ext/soap/soap.c:2671
#19 0x08406399 in zend_do_fcall_common_helper_SPEC 
(execute_data=0x99a9fc0) at /root/t/php5.3-
200907260030/Zend/zend_vm_execute.h:313
#20 0x083dddcd in execute (op_array=0x9978ec0) at /root/t/php5.3-
200907260030/Zend/zend_vm_execute.h:104
#21 0x083bcc77 in zend_execute_scripts (type=8, retval=0x0, 
file_count=3) at /root/t/php5.3-200907260030/Zend/zend.c:1188
#22 0x0836cb8e in php_execute_script (primary_file=0xbfc02568) at 
/root/t/php5.3-200907260030/main/main.c:2211
#23 0x0843c2e7 in main (argc=2, argv=0xbfc026c4) at /root/t/php5.3-
200907260030/sapi/cli/php_cli.c:1188)
 [2009-07-26 12:15 UTC] jani@php.net
What is the configure line you used?
 [2009-07-26 21:48 UTC] kelvin at netbasic dot co dot uk
I know this isn't the best config, but it does for testing. I've used 
the same config on both CentOS and Unbuntu boxes and all had the same 
problem:

'./configure' '--with-apxs2=/usr/local/apache/bin/apxs' '--enable-
bcmath' '--enable-calendar' '--enable-ftp' '--enable-discard-path' '--
with-pear' '--enable-sockets' '--with-zlib' '--with-gd' '--with-curl' '-
-enable-bcmath' '--enable-sigchild' '--enable-sockets' '--with-curl' '--
with-curlwrappers' '--enable-soap' '--with-openssl' '--with-kerberos' '-
-enable-mbstring' '--enable-zip' '--with-jpeg-dir=/usr/lib/' --with-ttf 
--with-pdo-mysql --with-mysqli --with-mysql)
 [2009-07-26 23:38 UTC] jani@php.net
Can you try without this: --with-curlwrappers ?
 [2009-07-27 08:09 UTC] kelvin at netbasic dot co dot uk
Without --with-curlwrappers it now works, so the cause would appear to 
lay there.

Interestingly, this also appears to be the cause of another stream 
issue, which is the following function played havoc with require_once

stream_wrapper_register('swift', 'Swift_Stream', 0);

Once this was run, require_once tried to treat all paths as a URL, this 
is also working as expected.)
 [2009-08-03 12:05 UTC] jani@php.net
I can not reproduce the crash with this configure line and using latest SVN checkout of PHP_5_3 branch:

/home/jani/src/php-5.3/configure --disable-all --disable-cgi --enable-soap --enable-libxml --with-curl --with-curlwrappers

Please try again the latest SVN snapshot.
 [2009-08-11 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 10 23:01:26 2024 UTC