php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41984 Detail on which files changed?
Submitted: 2007-07-12 22:00 UTC Modified: 2007-07-26 16:59 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: mr_walsh at yahoo dot com Assigned: dmitry (profile)
Status: Closed Package: SOAP related
PHP Version: 5.2.3 OS: Linux and OSX
Private report: No CVE-ID: None
 [2007-07-12 22:00 UTC] mr_walsh at yahoo dot com
Description:
------------
Recently I added a field with a large string to an already stable SOAP call.  This made the SoapClient call hang.  I was able in fact to see from _getLastRequest that if the raw sent XML PHP generates is over 67979 bytes on Mac OSX or something like 11000 bytes on Linux the problem happens every time.  

I ran in the debugger and it makes it nearly certain this is some sort of socket interface problem.

This seems just like bug #29256 but I'm using the very latest php 5.2.3.

Is there some sort of socket configuration I can do as a workaround?

#1  0x004d3a31 in send () from /lib/tls/libpthread.so.0
#2  0x082796e3 in php_sockop_write (stream=0xb7ecc508, 
    buf=0xb73c9018 "szwOUrHRAXXwmeqiMzFOndm1nfunsjT+Hy63WxwOoCJ6Q0Ar9Py8rC8rwzRAttA/H/oqvzMywB46gqL6MzGQwmmE5HNLz02Gehchq6puU1pFZOX4LabnB6Jp1+XYfbGjKkAvYbNPBvM10oACKAGaoTGBBnGpk+IuWq4NDXdSgOHot51/K8NE1zdTuk6wWIAvnMI9B64Z"..., count=7259) at /home/msw/php-5.2.3/main/streams/xp_socket.c:62
#3  0x08095448 in php_openssl_sockop_write (stream=0xb7ecc508, 
    buf=0xb73c9018 "szwOUrHRAXXwmeqiMzFOndm1nfunsjT+Hy63WxwOoCJ6Q0Ar9Py8rC8rwzRAttA/H/oqvzMywB46gqL6MzGQwmmE5HNLz02Gehchq6puU1pFZOX4LabnB6Jp1+XYfbGjKkAvYbNPBvM10oACKAGaoTGBBnGpk+IuWq4NDXdSgOHot51/K8NE1zdTuk6wWIAvnMI9B64Z"..., count=7259) at /home/msw/php-5.2.3/ext/openssl/xp_ssl.c:203
#4  0x08271491 in _php_stream_write_buffer (stream=0xb7ecc508, 
    buf=0xb73c9018 "szwOUrHRAXXwmeqiMzFOndm1nfunsjT+Hy63WxwOoCJ6Q0Ar9Py8rC8rwzRAttA/H/oqvzMywB46gqL6MzGQwmmE5HNLz02Gehchq6puU1pFZOX4LabnB6Jp1+XYfbGjKkAvYbNPBvM10oACKAGaoTGBBnGpk+IuWq4NDXdSgOHot51/K8NE1zdTuk6wWIAvnMI9B64Z"..., count=7259) at /home/msw/php-5.2.3/main/streams/streams.c:912
#5  0x081988f4 in make_http_soap_request (this_ptr=0xb7b1fb90, 
    buf=0x8b194b8 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ns1=\"https://boxaroo.whateverittakes.com\"><SOAP-ENV:Body><ns1:BoxRequestOrder"..., buf_size=15193, location=0xb7b5f9d4 "http://blah.com/blah.asmx", 
    soapaction=0xb7ab38bc "https://blah.com/SubmitRequest", soap_version=1, 
    buffer=0xb7b5f49c, buffer_len=0xb7b5f4a0) at /home/msw/php-5.2.3/ext/soap/php_http.c:683
#6  0x08184902 in zim_SoapClient___doRequest (ht=5, return_value=0xb7b5f49c, return_value_ptr=0x0, 
    this_ptr=0xb7b1fb90, return_value_used=1) at /home/msw/php-5.2.3/ext/soap/soap.c:2993
#7  0x0828ee1a in zend_call_function (fci=0xbff12940, fci_cache=0x0)
    at /home/msw/php-5.2.3/Zend/zend_execute_API.c:989
#8  0x0828f5f0 in call_user_function_ex (function_table=0x1908, object_pp=0x1908, function_name=0x1908, 
    retval_ptr_ptr=0x1908, param_count=6408, params=0x1908, no_separation=6408, symbol_table=0x1908)
    at /home/msw/php-5.2.3/Zend/zend_execute_API.c:602
#9  0x0828f62c in call_user_function (function_table=0x0, object_pp=0xbff129f0, function_name=0xbff12a70, 
    retval_ptr=0xbff12be0, param_count=5, params=0xbff12a00)
    at /home/msw/php-5.2.3/Zend/zend_execute_API.c:575
#10 0x08185244 in do_request (this_ptr=Variable "this_ptr" is not available.
) at /home/msw/php-5.2.3/ext/soap/soap.c:2457
#11 0x0818aee1 in do_soap_call (this_ptr=0xb7b1fb90, function=0xb7b229f4 "SubmitRequest", 
    function_len=21, arg_count=1, real_args=0xb7ab36d8, return_value=0xb764fd84, 
    location=0xb7b5f9d4 "http://blah.com/blah.asmx", soap_action=0x0, 
    call_uri=0x0, soap_headers=0x0, output_headers=0x0) at /home/msw/php-5.2.3/ext/soap/soap.c:2600


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-07-12 22:22 UTC] mr_walsh at yahoo dot com
The socket connection is stuck on 'CLOSE_WAIT'
 [2007-07-13 14:19 UTC] dmitry@php.net
I am not able to reproduce the problem on Linux.
Does the following script hangs for you?

<?php
  $client = new SoapClient(NULL,array(
    "location"=> "http://localhost:8080/",
    "uri"     => "test://"));
  echo $client->getQuote(str_repeat('a',65536));
?>

 [2007-07-13 20:59 UTC] mr_walsh at yahoo dot com
Here's a way to reproduce it...I have a web service server running.  Hit it with this code.  It hangs if you send ~68000 bytes or more (though the limit seemed to be closer to 15000 on a Linux box)

<?
   class Test
   {  public $post;

      public function __construct()
      {  $this->post = str_repeat('a',68536);
      }
   }

   $client = new SOAPClient("https://boxaroo.whateverittakes.com/BoxarooToPII.asmx?WSDL",
      array('trace' => 1,
         'soap_version' => SOAP_1_2)
      );

   $t = new Test();

   $resp = $client->Test($t);
   echo strlen($resp->TestResult);
?>
 [2007-07-24 14:25 UTC] dmitry@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 [2007-07-26 16:59 UTC] mr_walsh at yahoo dot com
Hi Dimitry:  Is this checked into the 5.x tree, the 6.x tree, or both?

Any way you could tell me which file(s) got touched?  If it's minor I can patch my version?

Thanks again for fixing this!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC