Bug #78919 [NEW]: CLI server does insufficient cleanup if php_request_startup() fails

From: Date: Fri, 06 Dec 2019 14:42:35 +0000
Subject: Bug #78919 [NEW]: CLI server does insufficient cleanup if php_request_startup() fails
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-224100@lists.php.net to get a copy of this message
From: cataphract@php.net Operating system: Irrelevant PHP version: 7.2.25 Package: Built-in web server Bug Type: Bug Bug description:CLI server does insufficient cleanup if php_request_startup() fails Description: ------------ If php_request_startup() fails, for instance because an extension throws an error during its RINIT, then the CLI server doesn't run php_request_shutdown(). In particular, the memory manager will not be shutdown, which means that repeatedly issuing errors during RINIT will result in eventually PHP running out of memory. Test script: --------------- See https://gist.github.com/cataphract/b3d6fca0dc31132a5d190d2de7d07db3 build the image and start a container. Then hit http://localhost:8080/ After 3 or requests, the CLI server will exit due to lack of memory. Expected result: ---------------- The server runs continuously. Actual result: -------------- The server exits after a couple of requests. -- Edit bug report at https://bugs.php.net/bug.php?id=78919&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=78919&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=78919&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=78919&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=78919&r=needscript Try newer version: https://bugs.php.net/fix.php?id=78919&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=78919&r=support Expected behavior: https://bugs.php.net/fix.php?id=78919&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=78919&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=78919&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=78919&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=78919&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=78919&r=dst IIS Stability: https://bugs.php.net/fix.php?id=78919&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=78919&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=78919&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=78919&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=78919&r=mysqlcfg

« previous php.bugs (#224100) next »