Bug #71931 [Com]: Soap cache_wsdl WSDL_CACHE_MEMORY option on CLI
| From: | tech at enuygun dot com | Date: | Mon, 15 May 2017 14:37:35 +0000 |
| Subject: | Bug #71931 [Com]: Soap cache_wsdl WSDL_CACHE_MEMORY option on CLI | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-209133@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=71931&edit=1
ID: 71931
Comment by: tech at enuygun dot com
Reported by: nikspijkerman at gmail dot com
Summary: Soap cache_wsdl WSDL_CACHE_MEMORY option on CLI
Status: Open
Type: Bug
Package: SOAP related
Operating System: Ubuntu 14.04
PHP Version: 7.0.4
Block user comment: N
Private report: N
New Comment:
Issue still exists in 7.1.4 and 7.1.5, debian jessie with sury php packages.
Previous Comments:
------------------------------------------------------------------------
[2017-01-27 07:58:38] tentje at gmail dot com
The issue persists in PHP 7.1.1
------------------------------------------------------------------------
[2016-11-24 03:32:21] bddenhartog at gmail dot com
I have this same issue running PHP-CGI under IIS.
The server is Windows Server 2012 R2 Datacenter.
------------------------------------------------------------------------
[2016-11-02 23:02:48] gcarrette at wayfair dot com
Related To: Bug #50722
------------------------------------------------------------------------
[2016-11-02 22:49:44] gcarrette at wayfair dot com
Here is a self-contained simple script you can use to reproduce this at will.
The script was derived from a bug report 50722, but adds a real wsdl reference url. I also get the
same error in a more complex application, with only 1 wsdl
file. The work around is to stick with WSDL_CACHE_DISK and avoid MEMORY/BOTH.
$wsdl_url = 'https://webservices.sandbox.netsuite.com/wsdl/v2013_2_0/netsuite.wsdl';
$wsdl_xml = file_get_contents($wsdl_url);
for($j = 1; $j <= 6; $j++) {
$status = file_put_contents("wsdl-file-$j.wsdl", $wsdl_xml);
if ($status === false) {
echo "ERROR: Failed to write wsdl-file-$j.wsdl\n";
}
}
ini_set('soap.wsdl_cache_enabled', 1);
ini_set('soap.wsdl_cache', WSDL_CACHE_MEMORY);
ini_set('soap.wsdl_cache_limit', 5); // Note: Cache size of 5.
function test($x)
{
$client1 = new SoapClient("./wsdl-file-1.wsdl");
$client2 = new SoapClient("./wsdl-file-2.wsdl");
$client3 = new SoapClient("./wsdl-file-3.wsdl");
$client4 = new SoapClient("./wsdl-file-4.wsdl");
$client5 = new SoapClient("./wsdl-file-5.wsdl");
return $x; //web server segfaults or corrupt XML returned
}
$server = new SoapServer("./wsdl-file-6.wsdl");
$server->addFunction("test");
$server->handle();
test(null);
------------------------------------------------------------------------
[2016-11-02 13:31:10] kevin dot letord at openclassrooms dot com
Still present in 7.0.12 on MacOS X
Process: php [62107]
Path: /usr/local/Cellar/php70/7.0.12_5/bin/php
Identifier: php
Version: 0
Code Type: X86-64 (Native)
Parent Process: zsh [701]
Responsible: iTerm2 [696]
User ID: 502
Date/Time: 2016-11-02 14:17:24.450 +0100
OS Version: Mac OS X 10.11.6 (15G1108)
Report Version: 11
Anonymous UUID: 82D86DB1-0CCB-203A-1A50-3F1ED24A48DD
Time Awake Since Boot: 17000 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x000000010d6d6d75
VM Regions Near 0x10d6d6d75:
VM_ALLOCATE 000000010d200000-000000010d400000 [ 2048K] rw-/rwx SM=PRV
-->
MALLOC_LARGE 000000010e400000-000000010e640000 [ 2304K] rw-/rwx SM=PRV
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 php 0x0000000109f5396c zend_hash_destroy + 348
1 php 0x0000000109dcbb43 delete_type_persistent + 342
2 php 0x0000000109f53895 zend_hash_destroy + 133
3 php 0x0000000109dd424c delete_psdl_int + 105
4 php 0x0000000109dd407a delete_psdl + 17
5 php 0x0000000109f53962 zend_hash_destroy + 338
6 php 0x0000000109da71b6 zm_shutdown_soap + 82
7 php 0x0000000109f4c1c7 module_destructor + 117
8 php 0x0000000109f43e5e module_destructor_zval + 17
9 php 0x0000000109f531e8 _zend_hash_del_el_ex + 308
10 php 0x0000000109f544d1 zend_hash_graceful_reverse_destroy + 175
11 php 0x0000000109f43fe5 zend_shutdown + 225
12 php 0x0000000109ee7117 php_module_shutdown + 42
13 php 0x0000000109fd1ff4 main + 1381
14 libdyld.dylib 0x00007fff8c3e55ad start + 1
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x00007fff7989f420 rbx: 0x0000010000000000 rcx: 0x00000000001f8100 rdx: 0x0000000000132480
rdi: 0x000000010d6d6d70 rsi: 0x000000010abe9200 rbp: 0x00007fff560e5d10 rsp: 0x00007fff560e5ce0
r8: 0x0000000000000000 r9: 0x00007faa79c2be80 r10: 0x000000008c2dd4b2 r11: 0x00007faa79c00000
r12: 0x00007faa7a03fa80 r13: 0x000000010a532db2 r14: 0x00007faa79c78fc0 r15: 0x00007faa7a03fe20
rip: 0x0000000109f5396c rfl: 0x0000000000010202 cr2: 0x000000010d6d6d75
Logical CPU: 0
Error Code: 0x00000004
Trap Number: 14
lldb
(lldb) bt
* thread #1: tid = 0x442c0, 0x00007fff9c37d8ea libsystem_kernel.dylib`__kill + 10, queue =
'com.apple.main-thread', stop reason = signal SIGSEGV
* frame #0: 0x00007fff9c37d8ea libsystem_kernel.dylib`__kill + 10
frame #1: 0x0000000101dcc1cb php`zend_mm_panic + 52
frame #2: 0x0000000101dcd2a2 php`zend_mm_free_heap + 733
frame #3: 0x0000000101e0099b php`zend_hash_destroy + 395
frame #4: 0x0000000101c78b43 php`delete_type_persistent + 342
frame #5: 0x0000000101e00895 php`zend_hash_destroy + 133
frame #6: 0x0000000101c8124c php`delete_psdl_int + 105
frame #7: 0x0000000101c8107a php`delete_psdl + 17
frame #8: 0x0000000101e00962 php`zend_hash_destroy + 338
frame #9: 0x0000000101c541b6 php`zm_shutdown_soap + 82
frame #10: 0x0000000101df91c7 php`module_destructor + 117
frame #11: 0x0000000101df0e5e php`module_destructor_zval + 17
frame #12: 0x0000000101e001e8 php`_zend_hash_del_el_ex + 308
frame #13: 0x0000000101e014d1 php`zend_hash_graceful_reverse_destroy + 175
frame #14: 0x0000000101df0fe5 php`zend_shutdown + 225
frame #15: 0x0000000101d94117 php`php_module_shutdown + 42
frame #16: 0x0000000101e7eff4 php`main + 1381
frame #17: 0x00007fff8c3e55ad libdyld.dylib`start + 1
frame #18: 0x00007fff8c3e55ad libdyld.dylib`start + 1
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=71931
--
Edit this bug report at https://bugs.php.net/bug.php?id=71931&edit=1