php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43437 Second SOAP call causes segfault
Submitted: 2007-11-28 10:10 UTC Modified: 2009-02-21 01:00 UTC
Votes:15
Avg. Score:4.4 ± 0.9
Reproduced:14 of 14 (100.0%)
Same Version:5 (35.7%)
Same OS:5 (35.7%)
From: denis dot arh at gmail dot com Assigned:
Status: No Feedback Package: SOAP related
PHP Version: 5.2.5 OS: CentOS 5
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: denis dot arh at gmail dot com
New email:
PHP Version: OS:

 

 [2007-11-28 10:10 UTC] denis dot arh at gmail dot com
Description:
------------
Same problems (segfault) with second call on same client object (re-opening SoapClient solves this issue)

Similar problems as described here: #35570


Reproduce code:
---------------
$c = new SoapClient('api_v0.2.wsdl', array(
	'encoding'   => 'UTF-8', 
	'trace'      => true,
	'exceptions' => true,
));

// call 1  --> OK
// call 2  --> segfault

Expected result:
----------------
Both calls ok, no segfault

Actual result:
--------------
PHP Warning:
Warning: SoapClient::__doRequest(): 31 bytes of buffered data lost during stream conversion! 

Segmentation fault

---------

#0  0x00b43333 in strlen () from /lib/libc.so.6
#1  0x012589c2 in get_http_header_value (headers=0x0, type=0x127c3fb "HTTP/") at /usr/src/redhat/BUILD/php-5.2.5/ext/soap/php_http.c:1144
#2  0x0125ad3a in make_http_soap_request (this_ptr=0x84d9bd0,
    buf=0x850a6a0 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ns1=\"http://schemas.zejn.si/AvtoPortal/\"><SOAP-ENV:Body><ns1:login><userName>"..., buf_size=302, location=0x84e49a4 "http://dev.avtooglasnik.lan/api/api_v0.2.php",
    soapaction=0x84e4b00 "http://dev.avtooglasnik.lan/api/php?application=embedded&service=AdCaptureService&method=login", soap_version=1, buffer=0x84d9e70, buffer_len=0x84d9e74)
    at /usr/src/redhat/BUILD/php-5.2.5/ext/soap/php_http.c:734
#3  0x0123b973 in zim_SoapClient___doRequest (ht=5, return_value=0x84d9e70, return_value_ptr=0x0, this_ptr=0x84d9bd0, return_value_used=1)
    at /usr/src/redhat/BUILD/php-5.2.5/ext/soap/soap.c:3035
#4  0x0820b4ee in zend_call_function ()
#5  0x0820c4dc in call_user_function_ex ()
#6  0x0820c55b in call_user_function ()
#7  0x01240f19 in do_request (this_ptr=0x84d9bd0, request=<value optimized out>, location=0x84e49a4 "http://dev.avtooglasnik.lan/api/api_v0.2.php",
    action=0x84e4b00 "http://dev.avtooglasnik.lan/api/php?application=embedded&service=AdCaptureService&method=login", version=1, one_way=0, response=0xbfc75a30)
    at /usr/src/redhat/BUILD/php-5.2.5/ext/soap/soap.c:2549
#8  0x01246ba3 in do_soap_call (this_ptr=0x84d9bd0, function=0x84d6b50 "login", function_len=<value optimized out>, arg_count=1, real_args=0x84d9db0, return_value=0x84dc610,
    location=0x84e49a4 "http://dev.avtooglasnik.lan/api/api_v0.2.php", soap_action=0x0, call_uri=0x0, soap_headers=0x0, output_headers=0x0)
    at /usr/src/redhat/BUILD/php-5.2.5/ext/soap/soap.c:2673
#9  0x012479ec in zim_SoapClient___call (ht=2, return_value=0x84dc610, return_value_ptr=0x0, this_ptr=0x84d9bd0, return_value_used=1)
    at /usr/src/redhat/BUILD/php-5.2.5/ext/soap/soap.c:2889
#10 0x0820b4ee in zend_call_function ()
#11 0x0822ca6f in zend_call_method ()
#12 0x08233c05 in zend_std_call_user_call ()
#13 0x08238e20 in zend_do_fcall_common_helper_SPEC ()
#14 0x08237c7d in execute ()
#15 0x08216f1a in zend_execute_scripts ()
#16 0x081d0093 in php_execute_script ()
#17 0x0829cc76 in main ()


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-11-28 12:45 UTC] jani@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi

I think it was fixed already, so please try the snapshot to verify.
 [2007-11-29 12:12 UTC] denis dot arh at gmail dot com
Tried with the latest PHP (from the link you gave me) - still no luck

#0  0x0021f333 in strlen () from /lib/libc.so.6
#1  0x0817a9b6 in get_http_header_value (headers=0x0, type=0x83b8fec "HTTP/") at /usr/src/php/php5.2-200711290930/ext/soap/php_http.c:1144
#2  0x0817caef in make_http_soap_request (this_ptr=0x9fd5290,
    buf=0xa00c740 "<?xml version=\"1.0\" 

.....
 [2008-06-06 21:10 UTC] john dot navratil at sbcglobal dot net
OS: Solaris 8
PHP: 5.2.4 and 5.2.6

SOAP Server Example -------:
<?
function myMethod($user, $pwd)
{
  $rslt = str_repeat('x', 7444);
  return $rslt;
}

ini_set("soap.wsdl_cache_enabled", "0"); // disabling WSDL cache
$server = new SoapServer("http://myURL/my.wsdl");
$server->addFunction("myMethod");
?>

SOAP Client test code -------:

<?php
ini_set("soap.wsdl_cache_enabled", "0"); // disabling WSDL cache -- remove after testing
$client = new SoapClient("http://myURL/my.wsdl");
try
{
        print($client->myMethod("asdf", "asdf"));
        print($client->myMethod("asdf", "asdf"));
}
catch (SoapFault $exception)
{
        echo $exception;
}
?>


Attempting to return a string 7443 X's succeeds.  7444 fails with message: PHP Warning:  SoapClient::__doRequest(): 1 bytes of buffered data lost during stream conversion!.  After failure, a second SOAP invocation results in a segmentation fault.

FWIW: Hitting the same SOAP server with a VBScript test script doesn't exhibit the error.
 [2009-02-13 22:18 UTC] felipe@php.net
Please try using this CVS snapshot:

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

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


 [2009-02-21 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".
 [2009-12-22 11:03 UTC] bartosz dot kubek at google dot com
PHP 5.2.6;  CentoOS5 and Ubuntu 8.04
I have exactly the same problem on both machines.
I can send ~300 SoapClient requests, and when one of it results false (null) the followup one causes segFault (script crashes and stops)
Any news here?
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC