Bug #66151 [NEW]: Memory leak when SOAP fails to process a WSDL file
| From: | askalski at gmail dot com | Date: | Fri, 22 Nov 2013 17:22:32 +0000 |
| Subject: | Bug #66151 [NEW]: Memory leak when SOAP fails to process a WSDL file | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-182893@lists.php.net to get a copy of this message | ||
From: askalski at gmail dot com
Operating system: Linux
PHP version: 5.4Git-2013-11-22 (Git)
Package: SOAP related
Bug Type: Bug
Bug description:Memory leak when SOAP fails to process a WSDL file
Description:
------------
The PHP SOAP module leaks memory when it fails to parse a WSDL file.
This leaked memory is not recovered between requests (mod_php).
Test script:
---------------
Download the following file into your script directory before testing:
http://www.paypalobjects.com/wsdl/PayPalSvc.wsdl
Do NOT download the dependent .xsd files (if they already exist in your
directory, remove them.) The missing .xsd files will cause the WSDL
parse failure which is essential to reproducing the memory leak.
PHP should be configured as an Apache module (mod_php).
<?php
$s = new soapclient("PayPalSvc.wsdl");
?>
Request the script many times with curl or Apache Bench. Monitor
memory/swap usage. (Be prepared to stop the test before it exhausts all
of your memory. This will happen very quickly.)
Expected result:
----------------
Apache worker memory usage should stay relatively constant.
Actual result:
--------------
Because of the leak, memory usage grows rapidly.
--
Edit bug report at https://bugs.php.net/bug.php?id=66151&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=66151&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=66151&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=66151&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=66151&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=66151&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=66151&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=66151&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=66151&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=66151&r=support
Expected behavior: https://bugs.php.net/fix.php?id=66151&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=66151&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=66151&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=66151&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66151&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=66151&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=66151&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=66151&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=66151&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=66151&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=66151&r=mysqlcfg