#40609 [NEW]: Segfaults when using more than one SoapVar in a request

Ask a Question related to PHP Bugs, Design and Development.

  1. #1

    Default #40609 [NEW]: Segfaults when using more than one SoapVar in a request

    From: robin dot harvey at chaptereight dot com
    Operating system: Linux - Ubuntu
    PHP version: 5.2.1
    PHP Bug Type: SOAP related
    Bug description: Segfaults when using more than one SoapVar in a request

    Description:
    ------------
    I've got a very simple soap service (written in Java/Tomcat/Axis) which
    simply accepts and logs the XML of a soap request. I need to post complex
    XML to the server (an XSL stylesheet) and I'm using SoapVar with XSD_ANYXML
    and dealing with the XSL as a string in PHP. When I try to add more than
    one SoapVar object encoded in this way, PHP segfaults. It's happy with 1
    param as a SoapVar, and with both as simple strings.

    Reproduce code:
    ---------------
    <?php
    $s = new
    SoapClient('http://192.168.1.79:8080/axis2/services/BuddyTestService?wsdl');
    $data1 = <<<XML
    <meta>
    <properties>
    <of>the transform go here!</of>
    </properties>
    </meta>
    XML;

    $data2 = <<<XML
    <more>
    <nice>Random content</nice>
    <being>sent to the soap server</being>
    </more>
    XML;

    $tdata = new SoapVar($data1, XSD_ANYXML);
    $t = new SoapVar($data2, XSD_ANYXML);

    $data = array('TransformData' => $tdata, 'Transform' => $t);
    //$data = array('TransformData' => 'foo', 'Transform' => 'bar');
    $s->examine($data);
    ?>

    Expected result:
    ----------------
    NULL. The service is 'In only'

    Actual result:
    --------------
    robin@robin-desktop:~/projects/buddy/tomcat/soap2$ php test-client-joe.php

    Segmentation fault (core dumped)

    --
    Edit bug report at [url]http://bugs.php.net/?id=40609&edit=1[/url]
    --
    Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=40609&r=trysnapshot44[/url]
    Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=40609&r=trysnapshot52[/url]
    Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=40609&r=trysnapshot60[/url]
    Fixed in CVS: [url]http://bugs.php.net/fix.php?id=40609&r=fixedcvs[/url]
    Fixed in release: [url]http://bugs.php.net/fix.php?id=40609&r=alreadyfixed[/url]
    Need backtrace: [url]http://bugs.php.net/fix.php?id=40609&r=needtrace[/url]
    Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=40609&r=needscript[/url]
    Try newer version: [url]http://bugs.php.net/fix.php?id=40609&r=oldversion[/url]
    Not developer issue: [url]http://bugs.php.net/fix.php?id=40609&r=support[/url]
    Expected behavior: [url]http://bugs.php.net/fix.php?id=40609&r=notwrong[/url]
    Not enough info: [url]http://bugs.php.net/fix.php?id=40609&r=notenoughinfo[/url]
    Submitted twice: [url]http://bugs.php.net/fix.php?id=40609&r=submittedtwice[/url]
    register_globals: [url]http://bugs.php.net/fix.php?id=40609&r=globals[/url]
    PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=40609&r=php3[/url]
    Daylight Savings: [url]http://bugs.php.net/fix.php?id=40609&r=dst[/url]
    IIS Stability: [url]http://bugs.php.net/fix.php?id=40609&r=isapi[/url]
    Install GNU Sed: [url]http://bugs.php.net/fix.php?id=40609&r=gnused[/url]
    Floating point limitations: [url]http://bugs.php.net/fix.php?id=40609&r=float[/url]
    No Zend Extensions: [url]http://bugs.php.net/fix.php?id=40609&r=nozend[/url]
    MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=40609&r=mysqlcfg[/url]
    robin dot harvey at chaptereight dot com Guest

  2. Similar Questions and Discussions

    1. What is the difference between REQUEST and REQUEST.QUERYSTRING?
      What is the difference between these two statements? They seem to do the same thing... response.write(request("variable")) ...
    2. #39819 [NEW]: PHP always segfaults with --without-sqlite
      From: matteo at beccati dot com Operating system: NetBSD PHP version: 4.4.4 PHP Bug Type: Reproducible crash Bug...
    3. Confused about a REQUEST.FORM and a REQUEST.QUERYSTRING
      This is snipit of code, supplied by PayPal with explanation about what has to be done to access their back end. I am confused because they first...
    4. best way to get data: request.form, request.params, controlname.value
      Hi! I think I remember somewhere that using request.form was a bad idea (I can't say I remember why). So I'm wondering: What is the best way to...
    5. difference bet. request.querystring and Request.Params
      request.params for asp.net is the httprequest object, and this method gets a combined collection of querystring, cookies, form and servervars...
  3. #2

    Default #40609 [Opn->Fbk]: Segfaults when using more than one SoapVar in a request

    ID: 40609
    Updated by: [email]rrichards@php.net[/email]
    Reported By: robin dot harvey at chaptereight dot com
    -Status: Open
    +Status: Feedback
    Bug Type: SOAP related
    Operating System: Linux - Ubuntu
    PHP Version: 5.2.1
    New Comment:

    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
    [url]http://bugs.php.net/bugs-generating-backtrace.php[/url] for *NIX and
    [url]http://bugs.php.net/bugs-generating-backtrace-win32.php[/url] 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.

    An accessible WSDL might also be helpful


    Previous Comments:
    ------------------------------------------------------------------------

    [2007-02-23 17:12:38] robin dot harvey at chaptereight dot com

    Description:
    ------------
    I've got a very simple soap service (written in Java/Tomcat/Axis) which
    simply accepts and logs the XML of a soap request. I need to post
    complex XML to the server (an XSL stylesheet) and I'm using SoapVar
    with XSD_ANYXML and dealing with the XSL as a string in PHP. When I
    try to add more than one SoapVar object encoded in this way, PHP
    segfaults. It's happy with 1 param as a SoapVar, and with both as
    simple strings.

    Reproduce code:
    ---------------
    <?php
    $s = new
    SoapClient('http://192.168.1.79:8080/axis2/services/BuddyTestService?wsdl');
    $data1 = <<<XML
    <meta>
    <properties>
    <of>the transform go here!</of>
    </properties>
    </meta>
    XML;

    $data2 = <<<XML
    <more>
    <nice>Random content</nice>
    <being>sent to the soap server</being>
    </more>
    XML;

    $tdata = new SoapVar($data1, XSD_ANYXML);
    $t = new SoapVar($data2, XSD_ANYXML);

    $data = array('TransformData' => $tdata, 'Transform' => $t);
    //$data = array('TransformData' => 'foo', 'Transform' => 'bar');
    $s->examine($data);
    ?>

    Expected result:
    ----------------
    NULL. The service is 'In only'

    Actual result:
    --------------
    robin@robin-desktop:~/projects/buddy/tomcat/soap2$ php
    test-client-joe.php
    Segmentation fault (core dumped)


    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40609&edit=1[/url]
    rrichards@php.net Guest

  4. #3

    Default #40609 [Fbk->Opn]: Segfaults when using more than one SoapVar in a request

    ID: 40609
    User updated by: robin dot harvey at chaptereight dot com
    Reported By: robin dot harvey at chaptereight dot com
    -Status: Feedback
    +Status: Open
    Bug Type: SOAP related
    Operating System: Linux - Ubuntu
    PHP Version: 5.2.1
    New Comment:

    Hi,

    I've uploaded the Soap service to an accessible site, and produced a
    backtrace, as requested. I've not used dbg before, so please let me
    know if i've done something wrong. I recompiled php with
    --enable-debug: heres the configure line:
    './configure' \
    '--with-apxs2=/usr/bin/apxs2' \
    '--with-zlib' \
    '--with-bz2' \
    '--with-pdo-mysql' \
    '--with-pdo-pgsql' \
    '--with-xsl' \
    '--with-pear' \
    '--enable-soap' \
    '--enable-ftp' \
    '--with-gd' \
    '--enable-mbstring' \
    '--enable-sockets' \
    '--with-mcrypt' \
    '--enable-debug'

    Here's a copy of the php script I'm using:
    <?php
    $xml1 = <<<XML
    <this>
    <might>be nice for a <while/> old chum</might>
    </this>
    XML;

    $xml2 = <<<XML
    <ok>
    Run it through <dbg/> to see what's going on
    </ok>
    XML;

    $c = new
    SoapClient('http://bluelines.org:8080/axis2/services/StockQuoteService?wsdl');
    $sv1 = new SoapVar($xml1, XSD_ANYXML);
    $sv2 = new SoapVar($xml2, XSD_ANYXML);

    $c->update(array('symbol' => $sv1, 'price' => $sv2));
    ?>

    ....and the dbg session, with a backtrace...


    (gdb) set args /home/robin/tmp/40609.php
    (gdb) run
    Starting program: /usr/local/bin/php /home/robin/tmp/40609.php
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    [Thread debugging using libthread_db enabled]
    [New Thread 46912533505280 (LWP 23881)]
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    ---Type <return> to continue, or q <return> to quit---

    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 46912533505280 (LWP 23881)]
    0x0000000000642c51 in encode_add_ns ()
    (gdb) bt
    #0 0x0000000000642c51 in encode_add_ns ()
    #1 0x0000000000639c62 in to_zval_user ()
    #2 0x0000000000639f42 in to_zval_user ()
    #3 0x000000000063a71d in to_zval_user ()
    #4 0x00000000006420d5 in sdl_guess_convert_xml ()
    #5 0x0000000000634b37 in master_to_xml ()
    #6 0x000000000062c8c6 in add_soap_fault ()
    #7 0x000000000062c781 in add_soap_fault ()
    #8 0x000000000062ba97 in add_soap_fault ()
    #9 0x0000000000624448 in zim_SoapClient_SoapClient ()
    #10 0x0000000000625f40 in zim_SoapClient___call ()
    #11 0x00000000007fd2f8 in zend_call_function ()
    #12 0x0000000000827112 in zend_call_method ()
    #13 0x0000000000830aca in zend_std_call_user_call ()
    #14 0x0000000000834ecd in execute ()
    #15 0x0000000000835daa in execute ()
    #16 0x0000000000834912 in execute ()
    #17 0x000000000080c9e8 in zend_execute_scripts ()
    #18 0x00000000007ae109 in php_execute_script ()
    #19 0x000000000089170a in main ()


    Many thanks,
    --Robin


    Previous Comments:
    ------------------------------------------------------------------------

    [2007-02-23 17:48:16] [email]rrichards@php.net[/email]

    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
    [url]http://bugs.php.net/bugs-generating-backtrace.php[/url] for *NIX and
    [url]http://bugs.php.net/bugs-generating-backtrace-win32.php[/url] 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.

    An accessible WSDL might also be helpful

    ------------------------------------------------------------------------

    [2007-02-23 17:12:38] robin dot harvey at chaptereight dot com

    Description:
    ------------
    I've got a very simple soap service (written in Java/Tomcat/Axis) which
    simply accepts and logs the XML of a soap request. I need to post
    complex XML to the server (an XSL stylesheet) and I'm using SoapVar
    with XSD_ANYXML and dealing with the XSL as a string in PHP. When I
    try to add more than one SoapVar object encoded in this way, PHP
    segfaults. It's happy with 1 param as a SoapVar, and with both as
    simple strings.

    Reproduce code:
    ---------------
    <?php
    $s = new
    SoapClient('http://192.168.1.79:8080/axis2/services/BuddyTestService?wsdl');
    $data1 = <<<XML
    <meta>
    <properties>
    <of>the transform go here!</of>
    </properties>
    </meta>
    XML;

    $data2 = <<<XML
    <more>
    <nice>Random content</nice>
    <being>sent to the soap server</being>
    </more>
    XML;

    $tdata = new SoapVar($data1, XSD_ANYXML);
    $t = new SoapVar($data2, XSD_ANYXML);

    $data = array('TransformData' => $tdata, 'Transform' => $t);
    //$data = array('TransformData' => 'foo', 'Transform' => 'bar');
    $s->examine($data);
    ?>

    Expected result:
    ----------------
    NULL. The service is 'In only'

    Actual result:
    --------------
    robin@robin-desktop:~/projects/buddy/tomcat/soap2$ php
    test-client-joe.php
    Segmentation fault (core dumped)


    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40609&edit=1[/url]
    robin dot harvey at chaptereight dot com Guest

  5. #4

    Default #40609 [Opn->Asn]: Segfaults when using more than one SoapVar in a request

    ID: 40609
    Updated by: [email]iliaa@php.net[/email]
    Reported By: robin dot harvey at chaptereight dot com
    -Status: Open
    +Status: Assigned
    Bug Type: SOAP related
    Operating System: Linux - Ubuntu
    PHP Version: 5.2.1
    -Assigned To:
    +Assigned To: dmitry


    Previous Comments:
    ------------------------------------------------------------------------

    [2007-02-24 14:08:31] robin dot harvey at chaptereight dot com

    Hi,

    I've uploaded the Soap service to an accessible site, and produced a
    backtrace, as requested. I've not used dbg before, so please let me
    know if i've done something wrong. I recompiled php with
    --enable-debug: heres the configure line:
    './configure' \
    '--with-apxs2=/usr/bin/apxs2' \
    '--with-zlib' \
    '--with-bz2' \
    '--with-pdo-mysql' \
    '--with-pdo-pgsql' \
    '--with-xsl' \
    '--with-pear' \
    '--enable-soap' \
    '--enable-ftp' \
    '--with-gd' \
    '--enable-mbstring' \
    '--enable-sockets' \
    '--with-mcrypt' \
    '--enable-debug'

    Here's a copy of the php script I'm using:
    <?php
    $xml1 = <<<XML
    <this>
    <might>be nice for a <while/> old chum</might>
    </this>
    XML;

    $xml2 = <<<XML
    <ok>
    Run it through <dbg/> to see what's going on
    </ok>
    XML;

    $c = new
    SoapClient('http://bluelines.org:8080/axis2/services/StockQuoteService?wsdl');
    $sv1 = new SoapVar($xml1, XSD_ANYXML);
    $sv2 = new SoapVar($xml2, XSD_ANYXML);

    $c->update(array('symbol' => $sv1, 'price' => $sv2));
    ?>

    ....and the dbg session, with a backtrace...


    (gdb) set args /home/robin/tmp/40609.php
    (gdb) run
    Starting program: /usr/local/bin/php /home/robin/tmp/40609.php
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    [Thread debugging using libthread_db enabled]
    [New Thread 46912533505280 (LWP 23881)]
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    ---Type <return> to continue, or q <return> to quit---

    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 46912533505280 (LWP 23881)]
    0x0000000000642c51 in encode_add_ns ()
    (gdb) bt
    #0 0x0000000000642c51 in encode_add_ns ()
    #1 0x0000000000639c62 in to_zval_user ()
    #2 0x0000000000639f42 in to_zval_user ()
    #3 0x000000000063a71d in to_zval_user ()
    #4 0x00000000006420d5 in sdl_guess_convert_xml ()
    #5 0x0000000000634b37 in master_to_xml ()
    #6 0x000000000062c8c6 in add_soap_fault ()
    #7 0x000000000062c781 in add_soap_fault ()
    #8 0x000000000062ba97 in add_soap_fault ()
    #9 0x0000000000624448 in zim_SoapClient_SoapClient ()
    #10 0x0000000000625f40 in zim_SoapClient___call ()
    #11 0x00000000007fd2f8 in zend_call_function ()
    #12 0x0000000000827112 in zend_call_method ()
    #13 0x0000000000830aca in zend_std_call_user_call ()
    #14 0x0000000000834ecd in execute ()
    #15 0x0000000000835daa in execute ()
    #16 0x0000000000834912 in execute ()
    #17 0x000000000080c9e8 in zend_execute_scripts ()
    #18 0x00000000007ae109 in php_execute_script ()
    #19 0x000000000089170a in main ()


    Many thanks,
    --Robin

    ------------------------------------------------------------------------

    [2007-02-23 17:48:16] [email]rrichards@php.net[/email]

    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
    [url]http://bugs.php.net/bugs-generating-backtrace.php[/url] for *NIX and
    [url]http://bugs.php.net/bugs-generating-backtrace-win32.php[/url] 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.

    An accessible WSDL might also be helpful

    ------------------------------------------------------------------------

    [2007-02-23 17:12:38] robin dot harvey at chaptereight dot com

    Description:
    ------------
    I've got a very simple soap service (written in Java/Tomcat/Axis) which
    simply accepts and logs the XML of a soap request. I need to post
    complex XML to the server (an XSL stylesheet) and I'm using SoapVar
    with XSD_ANYXML and dealing with the XSL as a string in PHP. When I
    try to add more than one SoapVar object encoded in this way, PHP
    segfaults. It's happy with 1 param as a SoapVar, and with both as
    simple strings.

    Reproduce code:
    ---------------
    <?php
    $s = new
    SoapClient('http://192.168.1.79:8080/axis2/services/BuddyTestService?wsdl');
    $data1 = <<<XML
    <meta>
    <properties>
    <of>the transform go here!</of>
    </properties>
    </meta>
    XML;

    $data2 = <<<XML
    <more>
    <nice>Random content</nice>
    <being>sent to the soap server</being>
    </more>
    XML;

    $tdata = new SoapVar($data1, XSD_ANYXML);
    $t = new SoapVar($data2, XSD_ANYXML);

    $data = array('TransformData' => $tdata, 'Transform' => $t);
    //$data = array('TransformData' => 'foo', 'Transform' => 'bar');
    $s->examine($data);
    ?>

    Expected result:
    ----------------
    NULL. The service is 'In only'

    Actual result:
    --------------
    robin@robin-desktop:~/projects/buddy/tomcat/soap2$ php
    test-client-joe.php
    Segmentation fault (core dumped)


    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40609&edit=1[/url]
    iliaa@php.net Guest

  6. #5

    Default #40609 [Asn->Csd]: Segfaults when using more than one SoapVar in a request

    ID: 40609
    Updated by: [email]dmitry@php.net[/email]
    Reported By: robin dot harvey at chaptereight dot com
    -Status: Assigned
    +Status: Closed
    Bug Type: SOAP related
    Operating System: Linux - Ubuntu
    PHP Version: 5.2.1
    Assigned To: dmitry
    New Comment:

    Fixed in CVS HEAD and PHP_5_2.
    Thanks to Rob.



    Previous Comments:
    ------------------------------------------------------------------------

    [2007-02-24 14:08:31] robin dot harvey at chaptereight dot com

    Hi,

    I've uploaded the Soap service to an accessible site, and produced a
    backtrace, as requested. I've not used dbg before, so please let me
    know if i've done something wrong. I recompiled php with
    --enable-debug: heres the configure line:
    './configure' \
    '--with-apxs2=/usr/bin/apxs2' \
    '--with-zlib' \
    '--with-bz2' \
    '--with-pdo-mysql' \
    '--with-pdo-pgsql' \
    '--with-xsl' \
    '--with-pear' \
    '--enable-soap' \
    '--enable-ftp' \
    '--with-gd' \
    '--enable-mbstring' \
    '--enable-sockets' \
    '--with-mcrypt' \
    '--enable-debug'

    Here's a copy of the php script I'm using:
    <?php
    $xml1 = <<<XML
    <this>
    <might>be nice for a <while/> old chum</might>
    </this>
    XML;

    $xml2 = <<<XML
    <ok>
    Run it through <dbg/> to see what's going on
    </ok>
    XML;

    $c = new
    SoapClient('http://bluelines.org:8080/axis2/services/StockQuoteService?wsdl');
    $sv1 = new SoapVar($xml1, XSD_ANYXML);
    $sv2 = new SoapVar($xml2, XSD_ANYXML);

    $c->update(array('symbol' => $sv1, 'price' => $sv2));
    ?>

    ....and the dbg session, with a backtrace...


    (gdb) set args /home/robin/tmp/40609.php
    (gdb) run
    Starting program: /usr/local/bin/php /home/robin/tmp/40609.php
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    [Thread debugging using libthread_db enabled]
    [New Thread 46912533505280 (LWP 23881)]
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    ---Type <return> to continue, or q <return> to quit---

    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 46912533505280 (LWP 23881)]
    0x0000000000642c51 in encode_add_ns ()
    (gdb) bt
    #0 0x0000000000642c51 in encode_add_ns ()
    #1 0x0000000000639c62 in to_zval_user ()
    #2 0x0000000000639f42 in to_zval_user ()
    #3 0x000000000063a71d in to_zval_user ()
    #4 0x00000000006420d5 in sdl_guess_convert_xml ()
    #5 0x0000000000634b37 in master_to_xml ()
    #6 0x000000000062c8c6 in add_soap_fault ()
    #7 0x000000000062c781 in add_soap_fault ()
    #8 0x000000000062ba97 in add_soap_fault ()
    #9 0x0000000000624448 in zim_SoapClient_SoapClient ()
    #10 0x0000000000625f40 in zim_SoapClient___call ()
    #11 0x00000000007fd2f8 in zend_call_function ()
    #12 0x0000000000827112 in zend_call_method ()
    #13 0x0000000000830aca in zend_std_call_user_call ()
    #14 0x0000000000834ecd in execute ()
    #15 0x0000000000835daa in execute ()
    #16 0x0000000000834912 in execute ()
    #17 0x000000000080c9e8 in zend_execute_scripts ()
    #18 0x00000000007ae109 in php_execute_script ()
    #19 0x000000000089170a in main ()


    Many thanks,
    --Robin

    ------------------------------------------------------------------------

    [2007-02-23 17:48:16] [email]rrichards@php.net[/email]

    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
    [url]http://bugs.php.net/bugs-generating-backtrace.php[/url] for *NIX and
    [url]http://bugs.php.net/bugs-generating-backtrace-win32.php[/url] 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.

    An accessible WSDL might also be helpful

    ------------------------------------------------------------------------

    [2007-02-23 17:12:38] robin dot harvey at chaptereight dot com

    Description:
    ------------
    I've got a very simple soap service (written in Java/Tomcat/Axis) which
    simply accepts and logs the XML of a soap request. I need to post
    complex XML to the server (an XSL stylesheet) and I'm using SoapVar
    with XSD_ANYXML and dealing with the XSL as a string in PHP. When I
    try to add more than one SoapVar object encoded in this way, PHP
    segfaults. It's happy with 1 param as a SoapVar, and with both as
    simple strings.

    Reproduce code:
    ---------------
    <?php
    $s = new
    SoapClient('http://192.168.1.79:8080/axis2/services/BuddyTestService?wsdl');
    $data1 = <<<XML
    <meta>
    <properties>
    <of>the transform go here!</of>
    </properties>
    </meta>
    XML;

    $data2 = <<<XML
    <more>
    <nice>Random content</nice>
    <being>sent to the soap server</being>
    </more>
    XML;

    $tdata = new SoapVar($data1, XSD_ANYXML);
    $t = new SoapVar($data2, XSD_ANYXML);

    $data = array('TransformData' => $tdata, 'Transform' => $t);
    //$data = array('TransformData' => 'foo', 'Transform' => 'bar');
    $s->examine($data);
    ?>

    Expected result:
    ----------------
    NULL. The service is 'In only'

    Actual result:
    --------------
    robin@robin-desktop:~/projects/buddy/tomcat/soap2$ php
    test-client-joe.php
    Segmentation fault (core dumped)


    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40609&edit=1[/url]
    dmitry@php.net Guest

  7. #6

    Default #40609 [Csd]: Segfaults when using more than one SoapVar in a request

    ID: 40609
    User updated by: robin dot harvey at chaptereight dot com
    Reported By: robin dot harvey at chaptereight dot com
    Status: Closed
    Bug Type: SOAP related
    Operating System: Linux - Ubuntu
    PHP Version: 5.2.1
    Assigned To: dmitry
    New Comment:

    Thanks for sorting this out so quickly guys - the fix works perfectly!

    --Robin


    Previous Comments:
    ------------------------------------------------------------------------

    [2007-02-25 13:25:23] [email]dmitry@php.net[/email]

    Fixed in CVS HEAD and PHP_5_2.
    Thanks to Rob.


    ------------------------------------------------------------------------

    [2007-02-24 14:08:31] robin dot harvey at chaptereight dot com

    Hi,

    I've uploaded the Soap service to an accessible site, and produced a
    backtrace, as requested. I've not used dbg before, so please let me
    know if i've done something wrong. I recompiled php with
    --enable-debug: heres the configure line:
    './configure' \
    '--with-apxs2=/usr/bin/apxs2' \
    '--with-zlib' \
    '--with-bz2' \
    '--with-pdo-mysql' \
    '--with-pdo-pgsql' \
    '--with-xsl' \
    '--with-pear' \
    '--enable-soap' \
    '--enable-ftp' \
    '--with-gd' \
    '--enable-mbstring' \
    '--enable-sockets' \
    '--with-mcrypt' \
    '--enable-debug'

    Here's a copy of the php script I'm using:
    <?php
    $xml1 = <<<XML
    <this>
    <might>be nice for a <while/> old chum</might>
    </this>
    XML;

    $xml2 = <<<XML
    <ok>
    Run it through <dbg/> to see what's going on
    </ok>
    XML;

    $c = new
    SoapClient('http://bluelines.org:8080/axis2/services/StockQuoteService?wsdl');
    $sv1 = new SoapVar($xml1, XSD_ANYXML);
    $sv2 = new SoapVar($xml2, XSD_ANYXML);

    $c->update(array('symbol' => $sv1, 'price' => $sv2));
    ?>

    ....and the dbg session, with a backtrace...


    (gdb) set args /home/robin/tmp/40609.php
    (gdb) run
    Starting program: /usr/local/bin/php /home/robin/tmp/40609.php
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    [Thread debugging using libthread_db enabled]
    [New Thread 46912533505280 (LWP 23881)]
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    (no debugging symbols found)
    ---Type <return> to continue, or q <return> to quit---

    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 46912533505280 (LWP 23881)]
    0x0000000000642c51 in encode_add_ns ()
    (gdb) bt
    #0 0x0000000000642c51 in encode_add_ns ()
    #1 0x0000000000639c62 in to_zval_user ()
    #2 0x0000000000639f42 in to_zval_user ()
    #3 0x000000000063a71d in to_zval_user ()
    #4 0x00000000006420d5 in sdl_guess_convert_xml ()
    #5 0x0000000000634b37 in master_to_xml ()
    #6 0x000000000062c8c6 in add_soap_fault ()
    #7 0x000000000062c781 in add_soap_fault ()
    #8 0x000000000062ba97 in add_soap_fault ()
    #9 0x0000000000624448 in zim_SoapClient_SoapClient ()
    #10 0x0000000000625f40 in zim_SoapClient___call ()
    #11 0x00000000007fd2f8 in zend_call_function ()
    #12 0x0000000000827112 in zend_call_method ()
    #13 0x0000000000830aca in zend_std_call_user_call ()
    #14 0x0000000000834ecd in execute ()
    #15 0x0000000000835daa in execute ()
    #16 0x0000000000834912 in execute ()
    #17 0x000000000080c9e8 in zend_execute_scripts ()
    #18 0x00000000007ae109 in php_execute_script ()
    #19 0x000000000089170a in main ()


    Many thanks,
    --Robin

    ------------------------------------------------------------------------

    [2007-02-23 17:48:16] [email]rrichards@php.net[/email]

    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
    [url]http://bugs.php.net/bugs-generating-backtrace.php[/url] for *NIX and
    [url]http://bugs.php.net/bugs-generating-backtrace-win32.php[/url] 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.

    An accessible WSDL might also be helpful

    ------------------------------------------------------------------------

    [2007-02-23 17:12:38] robin dot harvey at chaptereight dot com

    Description:
    ------------
    I've got a very simple soap service (written in Java/Tomcat/Axis) which
    simply accepts and logs the XML of a soap request. I need to post
    complex XML to the server (an XSL stylesheet) and I'm using SoapVar
    with XSD_ANYXML and dealing with the XSL as a string in PHP. When I
    try to add more than one SoapVar object encoded in this way, PHP
    segfaults. It's happy with 1 param as a SoapVar, and with both as
    simple strings.

    Reproduce code:
    ---------------
    <?php
    $s = new
    SoapClient('http://192.168.1.79:8080/axis2/services/BuddyTestService?wsdl');
    $data1 = <<<XML
    <meta>
    <properties>
    <of>the transform go here!</of>
    </properties>
    </meta>
    XML;

    $data2 = <<<XML
    <more>
    <nice>Random content</nice>
    <being>sent to the soap server</being>
    </more>
    XML;

    $tdata = new SoapVar($data1, XSD_ANYXML);
    $t = new SoapVar($data2, XSD_ANYXML);

    $data = array('TransformData' => $tdata, 'Transform' => $t);
    //$data = array('TransformData' => 'foo', 'Transform' => 'bar');
    $s->examine($data);
    ?>

    Expected result:
    ----------------
    NULL. The service is 'In only'

    Actual result:
    --------------
    robin@robin-desktop:~/projects/buddy/tomcat/soap2$ php
    test-client-joe.php
    Segmentation fault (core dumped)


    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=40609&edit=1[/url]
    robin dot harvey at chaptereight dot com Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139