PHP5 and soap module crash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



	I'm running FreeBSD 5.4-STABLE with PHP 5.05 (I can also reproduce 
this with the same version on 7-CURRENT) and something in the soap 
module is causing php/apache to sig11.
I'm using the soap module to connect to MapPoint to retrieve location 
coordinates.  This problem doesn't happen with the 5.04 soap module.  
Thanks for any help or suggestions.  Let me know if I need to provide 
any more debug information.

The backtrace follows:
(gdb) bt
#0  0x48c8f729 in php_openssl_sockop_cast ()
   from /usr/local/lib/php/20041030/openssl.so
#1  0x080f0e6e in _php_stream_cast ()
#2  0x48c5c7a6 in stream_alive () 
from /usr/local/lib/php/20041030/soap.so
#3  0x48c5e376 in make_http_soap_request ()
   from /usr/local/lib/php/20041030/soap.so
#4  0x48c4b449 in zif_SoapClient___doRequest ()
   from /usr/local/lib/php/20041030/soap.so
#5  0x0810ebb4 in zend_call_function ()
#6  0x0810dd70 in call_user_function_ex ()
#7  0x0810dc93 in call_user_function ()
#8  0x48c49705 in do_request () 
from /usr/local/lib/php/20041030/soap.so
#9  0x48c49d58 in do_soap_call () 
from /usr/local/lib/php/20041030/soap.so
#10 0x48c4ae66 in zif_SoapClient___call ()
   from /usr/local/lib/php/20041030/soap.so
#11 0x0813bb84 in execute_internal ()
#12 0x4850f822 in xdebug_execute_internal ()
   from /usr/local/lib/php/20041030/xdebug.so
#13 0x0814639f in zend_do_fcall_common_helper ()
#14 0x081467e5 in zend_do_fcall_by_name_handler ()
#15 0x0813bce3 in execute ()
#16 0x4850f6ff in xdebug_execute () 
from /usr/local/lib/php/20041030/xdebug.so
#17 0x081190fd in zend_execute_scripts ()

When I try to compile with debugging, I don't get the sig 11, but when 
I run the script with valgrind it does give the following:
> valgrind -v ./soap-crash.php
==76689== Memcheck, a memory error detector for x86-linux.
==76689== Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward.
==76689== Using valgrind-2.1.0, a program supervision framework for 
x86-linux.
==76689== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward.
==76689== Valgrind library directory: /usr/local/lib/valgrind
==76689== Command line
==76689==    /usr/local/bin/php
==76689==    ./soap-crash.php
==76689== Startup, with flags:
==76689==    -v
==76689== Reading syms from /usr/local/bin/php (0x8048000)
==76689== Reading syms from /libexec/ld-elf.so.1 (0x3C000000)
==76689==    object doesn't have a symbol table
==76689==    object doesn't have any debug info
==76689== Reading syms from /libexec/ld-elf.so.1 (0xB0000000)
==76689==    object doesn't have a symbol table
==76689==    object doesn't have any debug info
==76689== Reading syms from /lib/libc.so.5 (0xB0038000)
==76689==    object doesn't have a symbol table
==76689==    object doesn't have any debug info
==76689== Reading syms from /usr/local/lib/valgrind/vgskin_memcheck.so 
(0xB0121000)
==76689==    object doesn't have a symbol table
==76689==    object doesn't have any debug info
==76689== Reading syms from /usr/local/lib/valgrind/stage2 
(0xB8000000)
==76689==    object doesn't have a symbol table
==76689==    object doesn't have any debug info
==76689== Reading suppressions 
file: /usr/local/lib/valgrind/default.supp
==76689== Estimated CPU clock rate is 1340 MHz
==76689== REDIRECT soname:libc.so.6(__GI___errno_location) to 
soname:libpthread.so.0(__errno_location)
==76689== REDIRECT soname:libc.so.6(__errno_location) to 
soname:libpthread.so.0(__errno_location)
==76689== REDIRECT soname:libc.so.6(__GI___h_errno_location) to 
soname:libpthread.so.0(__h_errno_location)
==76689== REDIRECT soname:libc.so.6(__h_errno_location) to 
soname:libpthread.so.0(__h_errno_location)
==76689== REDIRECT soname:libc.so.6(__GI___res_state) to 
soname:libpthread.so.0(__res_state)
==76689== REDIRECT soname:libc.so.6(__res_state) to 
soname:libpthread.so.0(__res_state)
==76689== REDIRECT soname:libc.so.6(stpcpy) to 
*vgpreload_memcheck.so*(stpcpy)
==76689== REDIRECT soname:libc.so.6(strnlen) to 
*vgpreload_memcheck.so*(strnlen)
==76689== REDIRECT soname:ld-linux.so.2(stpcpy) to 
*vgpreload_memcheck.so*(stpcpy)
==76689== REDIRECT soname:ld-linux.so.2(strchr) to 
*vgpreload_memcheck.so*(strchr)
==76689== 
==76689== Reading syms from /usr/local/lib/valgrind/vg_inject.so 
(0x3C03B000)
==76689==    object doesn't have a symbol table
==76689==    object doesn't have any debug info
==76689== Reading syms 
from /usr/local/lib/valgrind/vgpreload_memcheck.so (0x3C03E000)
==76689==    object doesn't have a symbol table
==76689==    object doesn't have any debug info
==76689== Reading syms from /lib/libcrypt.so.2 (0x3C044000)
==76689==    object doesn't have a symbol table
==76689==    object doesn't have any debug info
==76689== Reading syms from /lib/libm.so.3 (0x3C05E000)
==76689==    object doesn't have a symbol table
==76689==    object doesn't have any debug info
==76689== Reading syms from /usr/local/lib/libxml2.so.5 (0x3C07A000)
==76689==    object doesn't have any debug info
==76689== Reading syms from /lib/libz.so.2 (0x3C1A6000)
==76689==    object doesn't have a symbol table
==76689==    object doesn't have any debug info
==76689== Reading syms from /usr/local/lib/libiconv.so.3 (0x3C1B8000)
==76689==    object doesn't have any debug info
==76689== Reading syms from /lib/libc.so.5 (0x3C2A6000)
==76689==    object doesn't have a symbol table
==76689==    object doesn't have any debug info
==76689== Reading syms 
from /usr/local/lib/php/20041030-debug/fribidi.so (0x3C491000)
==76689==    object doesn't have any debug info
==76689== Reading syms from /usr/local/lib/libfribidi.so.0 
(0x3C495000)
==76689==    object doesn't have any debug info
==76689== Reading syms 
from /usr/local/lib/php/20041030-debug/xdebug.so (0x3C4A3000)
==76689==    object doesn't have any debug info
PHP Warning:  Module 'fribidi' already loaded in Unknown on line 0
==76689== Reading syms 
from /usr/local/lib/php/20041030-debug/simplexml.so (0x3C4C2000)
==76689==    object doesn't have any debug info
==76689== Reading syms from /usr/local/lib/php/20041030-debug/xml.so 
(0x3C4CA000)
==76689==    object doesn't have any debug info
==76689== Reading syms from /usr/local/lib/php/20041030-debug/pgsql.so 
(0x3C4D6000)
==76689==    object doesn't have any debug info
==76689== Reading syms from /usr/local/lib/libpq.so.4 (0x3C4F0000)
==76689== Reading syms from /usr/local/lib/libintl.so.6 (0x3C513000)
==76689==    object doesn't have any debug info
==76689== Reading syms from /usr/local/lib/libssl.so.3 (0x3C51D000)
==76689==    object doesn't have any debug info
==76689== Reading syms from /usr/local/lib/libcrypto.so.3 (0x3C5FA000)
==76689==    object doesn't have any debug info
==76689== Reading syms from /usr/local/lib/valgrind/libpthread.so.1 
(0x3C707000)
==76689==    object doesn't have a symbol table
==76689==    object doesn't have any debug info
==76689== Reading syms from /usr/local/lib/php/20041030-debug/dom.so 
(0x3C725000)
==76689==    object doesn't have any debug info
==76689== Reading syms from /usr/local/lib/php/20041030-debug/ctype.so 
(0x3C748000)
==76689==    object doesn't have any debug info
==76689== Reading syms 
from /usr/local/lib/php/20041030-debug/tokenizer.so (0x3C74D000)
==76689==    object doesn't have any debug info
==76689== Reading syms from /usr/local/lib/php/20041030-debug/iconv.so 
(0x3C753000)
==76689==    object doesn't have any debug info
==76689== Reading syms from /usr/local/lib/php/20041030-debug/pcre.so 
(0x3C75C000)
==76689==    object doesn't have any debug info
==76689== Reading syms from /usr/local/lib/php/20041030-debug/mysql.so 
(0x3C792000)
==76689==    object doesn't have any debug info
==76689== Reading syms from /usr/local/lib/mysql/libmysqlclient.so.14 
(0x3C7A0000)
==76689==    object doesn't have any debug info
==76689== Reading syms from /usr/lib/libssl.so.3 (0x3C7FD000)
==76689==    object doesn't have a symbol table
==76689==    object doesn't have any debug info
==76689== Reading syms from /lib/libcrypto.so.3 (0x3C831000)
==76689==    object doesn't have a symbol table
==76689==    object doesn't have any debug info
==76689== Reading syms from /usr/local/lib/php/20041030-debug/gd.so 
(0x3C942000)
==76689==    object doesn't have any debug info
==76689== Reading syms from /usr/local/lib/libt1.so.5 (0x3C9A7000)
==76689==    object doesn't have any debug info
==76689== Reading syms from /usr/local/lib/libfreetype.so.9 
(0x3C9FD000)
==76689==    object doesn't have any debug info
==76689== Reading syms from /usr/X11R6/lib/libX11.so.6 (0x3CA69000)
==76689==    object doesn't have any debug info
==76689== Reading syms from /usr/X11R6/lib/libXpm.so.4 (0x3CB34000)
==76689==    object doesn't have any debug info
==76689== Reading syms from /usr/local/lib/libpng.so.5 (0x3CB45000)
==76689==    object doesn't have a symbol table
==76689==    object doesn't have any debug info
==76689== Reading syms from /usr/local/lib/libjpeg.so.9 (0x3CB6B000)
==76689==    object doesn't have any debug info
==76689== Reading syms from /usr/X11R6/lib/libXext.so.6 (0x3CB89000)
==76689==    object doesn't have any debug info
==76689== Reading syms 
from /usr/local/lib/php/20041030-debug/session.so (0x3CB98000)
==76689==    object doesn't have any debug info
==76689== Reading syms from /usr/local/lib/php/20041030-debug/soap.so 
(0x3CBA6000)
==76689==    object doesn't have any debug info
==76689== Reading syms 
from /usr/local/lib/php/20041030-debug/sqlite.so (0x3CBF7000)
==76689==    object doesn't have any debug info
==76689== Reading syms from /usr/local/lib/php/20041030-debug/posix.so 
(0x3CC48000)
==76689==    object doesn't have any debug info
==76689== Reading syms 
from /usr/local/lib/php/20041030-debug/openssl.so (0x3CC4E000)
==76689==    object doesn't have any debug info
==76689== Invalid read of size 4
==76689==    at 0x3CBC87FE: stream_alive 
(in /usr/local/lib/php/20041030-debug/soap.so)
==76689==    by 0x3CBCAB04: make_http_soap_request 
(in /usr/local/lib/php/20041030-debug/soap.so)
==76689==    by 0x3CBB42F8: zif_SoapClient___doRequest 
(in /usr/local/lib/php/20041030-debug/soap.so)
==76689==    by 0x812BC7E: zend_call_function (zend_execute_API.c:900)
==76689==  Address 0x3CD5E2B0 is 172 bytes inside a block of size 184 
free'd
==76689==    at 0x3C04068F: free 
(in /usr/local/lib/valgrind/vgpreload_memcheck.so)
==76689==    by 0x811EC77: _efree (zend_alloc.c:288)
==76689==    by 0x810625B: _php_stream_free (streams.c:394)
==76689==    by 0x3CBD0025: make_http_soap_request 
(in /usr/local/lib/php/20041030-debug/soap.so)
==76689== 
==76689== Invalid read of size 4
==76689==    at 0x8105EE6: _php_stream_free (streams.c:276)
==76689==    by 0x3CBCAB22: make_http_soap_request 
(in /usr/local/lib/php/20041030-debug/soap.so)
==76689==    by 0x3CBB42F8: zif_SoapClient___doRequest 
(in /usr/local/lib/php/20041030-debug/soap.so)
==76689==    by 0x812BC7E: zend_call_function (zend_execute_API.c:900)
==76689==  Address 0x3CD5E270 is 108 bytes inside a block of size 184 
free'd
==76689==    at 0x3C04068F: free 
(in /usr/local/lib/valgrind/vgpreload_memcheck.so)
==76689==    by 0x811EC77: _efree (zend_alloc.c:288)
==76689==    by 0x810625B: _php_stream_free (streams.c:394)
==76689==    by 0x3CBD0025: make_http_soap_request 
(in /usr/local/lib/php/20041030-debug/soap.so)
39.9993431382:-83.0282030224
==76689== discard syms at 0x3CC4E000-0x3CC61000 
in /usr/local/lib/php/20041030-debug/openssl.so due to munmap()
==76689== discard syms at 0x3CC48000-0x3CC4D000 
in /usr/local/lib/php/20041030-debug/posix.so due to munmap()
==76689== discard syms at 0x3CBF7000-0x3CC47000 
in /usr/local/lib/php/20041030-debug/sqlite.so due to munmap()
==76689== discard syms at 0x3CBA6000-0x3CBF6000 
in /usr/local/lib/php/20041030-debug/soap.so due to munmap()
==76689== discard syms at 0x3CB98000-0x3CBA5000 
in /usr/local/lib/php/20041030-debug/session.so due to munmap()
==76689== discard syms at 0x3C942000-0x3C9A6000 
in /usr/local/lib/php/20041030-debug/gd.so due to munmap()
==76689== discard syms at 0x3C9A7000-0x3C9FC000 
in /usr/local/lib/libt1.so.5 due to munmap()
==76689== discard syms at 0x3C9FD000-0x3CA68000 
in /usr/local/lib/libfreetype.so.9 due to munmap()
==76689== discard syms at 0x3CA69000-0x3CB33000 
in /usr/X11R6/lib/libX11.so.6 due to munmap()
==76689== discard syms at 0x3CB34000-0x3CB44000 
in /usr/X11R6/lib/libXpm.so.4 due to munmap()
==76689== discard syms at 0x3CB45000-0x3CB6A000 
in /usr/local/lib/libpng.so.5 due to munmap()
==76689== discard syms at 0x3CB6B000-0x3CB88000 
in /usr/local/lib/libjpeg.so.9 due to munmap()
==76689== discard syms at 0x3CB89000-0x3CB97000 
in /usr/X11R6/lib/libXext.so.6 due to munmap()
==76689== discard syms at 0x3C792000-0x3C79F000 
in /usr/local/lib/php/20041030-debug/mysql.so due to munmap()
==76689== discard syms at 0x3C7A0000-0x3C7FC000 
in /usr/local/lib/mysql/libmysqlclient.so.14 due to munmap()
==76689== discard syms at 0x3C7FD000-0x3C830000 
in /usr/lib/libssl.so.3 due to munmap()
==76689== discard syms at 0x3C831000-0x3C941000 in /lib/libcrypto.so.3 
due to munmap()
==76689== discard syms at 0x3C75C000-0x3C791000 
in /usr/local/lib/php/20041030-debug/pcre.so due to munmap()
==76689== discard syms at 0x3C753000-0x3C75B000 
in /usr/local/lib/php/20041030-debug/iconv.so due to munmap()
==76689== discard syms at 0x3C74D000-0x3C752000 
in /usr/local/lib/php/20041030-debug/tokenizer.so due to munmap()
==76689== discard syms at 0x3C748000-0x3C74C000 
in /usr/local/lib/php/20041030-debug/ctype.so due to munmap()
==76689== discard syms at 0x3C725000-0x3C747000 
in /usr/local/lib/php/20041030-debug/dom.so due to munmap()
==76689== discard syms at 0x3C4D6000-0x3C4EF000 
in /usr/local/lib/php/20041030-debug/pgsql.so due to munmap()
==76689== discard syms at 0x3C4F0000-0x3C512000 
in /usr/local/lib/libpq.so.4 due to munmap()
==76689== discard syms at 0x3C513000-0x3C51C000 
in /usr/local/lib/libintl.so.6 due to munmap()
==76689== discard syms at 0x3C51D000-0x3C5F9000 
in /usr/local/lib/libssl.so.3 due to munmap()
==76689== discard syms at 0x3C5FA000-0x3C706000 
in /usr/local/lib/libcrypto.so.3 due to munmap()
==76689== discard syms at 0x3C707000-0x3C724000 
in /usr/local/lib/valgrind/libpthread.so.1 due to munmap()
==76689== discard syms at 0x3C4CA000-0x3C4D5000 
in /usr/local/lib/php/20041030-debug/xml.so due to munmap()
==76689== discard syms at 0x3C4C2000-0x3C4C9000 
in /usr/local/lib/php/20041030-debug/simplexml.so due to munmap()
==76689== discard syms at 0x3C4A3000-0x3C4C1000 
in /usr/local/lib/php/20041030-debug/xdebug.so due to munmap()
==76689== discard syms at 0x3C491000-0x3C494000 
in /usr/local/lib/php/20041030-debug/fribidi.so due to munmap()
==76689== discard syms at 0x3C495000-0x3C4A2000 
in /usr/local/lib/libfribidi.so.0 due to munmap()
==76689== 
==76689== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 
0)
==76689== 
==76689== 1 errors in context 1 of 2:
==76689== Invalid read of size 4
==76689==    at 0x8105EE6: _php_stream_free (streams.c:276)
==76689==    by 0x3CBCAB22: ???
==76689==    by 0x3CBB42F8: ???
==76689==    by 0x812BC7E: zend_call_function (zend_execute_API.c:900)
==76689==  Address 0x3CD5E270 is 108 bytes inside a block of size 184 
free'd
==76689==    at 0x3C04068F: free 
(in /usr/local/lib/valgrind/vgpreload_memcheck.so)
==76689==    by 0x811EC77: _efree (zend_alloc.c:288)
==76689==    by 0x810625B: _php_stream_free (streams.c:394)
==76689==    by 0x3CBD0025: ???
==76689== 
==76689== 1 errors in context 2 of 2:
==76689== Invalid read of size 4
==76689==    at 0x3CBC87FE: ???
==76689==    by 0x3CBCAB04: ???
==76689==    by 0x3CBB42F8: ???
==76689==    by 0x812BC7E: zend_call_function (zend_execute_API.c:900)
==76689==  Address 0x3CD5E2B0 is 172 bytes inside a block of size 184 
free'd
==76689==    at 0x3C04068F: free 
(in /usr/local/lib/valgrind/vgpreload_memcheck.so)
==76689==    by 0x811EC77: _efree (zend_alloc.c:288)
==76689==    by 0x810625B: _php_stream_free (streams.c:394)
==76689==    by 0x3CBD0025: ???
==76689== IN SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
==76689== 
==76689== malloc/free: in use at exit: 25688 bytes in 1256 blocks.
==76689== malloc/free: 17054 allocs, 15798 frees, 1803278 bytes 
allocated.
==76689== 
--76689--     TT/TC: 0 tc sectors discarded.
--76689--            12196 chainings, 0 unchainings.
--76689-- translate: new     18231 (348936 -> 4090151; ratio 117:10)
--76689--            discard 5546 (112149 -> 1228612; ratio 109:10).
--76689--  dispatch: 6750000 jumps (bb entries), of which 1038840 
(15%) were unchained.
--76689--            394/57108 major/minor sched events.  23094 
tt_fast misses.
--76689-- reg-alloc: 2771 t-req-spill, 736256+18439 orig+spill uis, 
89674 total-reg-r.
--76689--    sanity: 311 cheap, 13 expensive checks.
--76689--    ccalls: 83904 C calls, 56% saves+restores avoided (279758 
bytes)
--76689--            119336 args, avg 0.88 setup instrs each (27234 
bytes)
--76689--            0% clear the stack (251712 bytes)
--76689--            27617 retvals, 31% of reg-reg movs avoided (17002 
bytes)

Here is snippet of the php code.
     //MapPoint Web Service user name goes here.
     $mapPointUserName = "MYUSERNAMEHERE";
     //MapPoint Web Service password goes here.
     $mapPointPassword = "MYPASSWORDHERE";
     //A MapPoint Web Service evaluation account includes
     //access to the MapPoint Web Service staging environment only.
     $mapPointWsdl = 
"http://staging.mappoint.net/standard-30/mappoint.wsdl";;
     $address = array(
     'AddressLine' => $fields["address"],
     'PrimaryCity' => $fields["city"],
     //SecondaryCity is not required for U.S. addresses.
     'Subdivision' => $fields["state"],
     'PostalCode' => $fields["zip"],
     'CountryRegion' => 'USA'
     );

     //Define the FindRange object, which determines the first result 
we
     //want returned and the number of
     //results to return.
     $findRange = array(
     'StartIndex' => 0,
     'Count' => 100
     );
     
     //Define a FindResultMask object to specify which
     //properties should be returned along with the results.
     $findResultMask = 'AddressFlag LatLongFlag';
     //Define the FindOptions object.
     $findOptions = array(
     'Range' => $findRange,
     'SearchContext' => 244,
     'ResultMask' => $findResultMask,
     'ThresholdScore' => 0.85
     );

     $findAddressSpecification = array(
     'DataSourceName' => 'MapPoint.NA',
     'InputAddress' => $address,
     'Options' => $findOptions
     );
     $findAddress = array('specification' => 
$findAddressSpecification);

		$options = array('login' => $mapPointUserName,
				 'password' => $mapPointPassword,
				 'authentication' => SOAP_AUTHENTICATION_DIGEST,
				 "connection_timeout" => 5);

		try
		{
			$client = new SoapClient($mapPointWsdl, $options);
			$method = 'FindAddress';
			$ans = $client->__soapCall($method, array('parameters' => 
$findAddress));
			$fields["latitude"] = 
$ans->FindAddressResult->Results->FindResult->FoundLocation->LatLong->Latitude;
			$fields["longitude"] = 
$ans->FindAddressResult->Results->FindResult->FoundLocation->LatLong->Longitude;
		}
		catch (Exception $e)
		{
			trigger_error("SOAP Fault: (faultcode: {$ans->faultcode}, 
faultstring: {$ans->faultstring}). \n exception: ". $e->getMessage(). 
"Please contact UnitedWare.", E_ERROR);
		}

print($fields["latitude"].":".$fields["longitude"]."\n");




-- 
Anish Mistry
amistry@xxxxxxxxxxxxxxxxxx
AM Productions http://am-productions.biz/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux