Bug #76484 [NEW]: emory leakage with CURLOPT_SSL_VERIFYPEER set to TRUE

From: Date: Fri, 15 Jun 2018 16:57:57 +0000
Subject: Bug #76484 [NEW]: emory leakage with CURLOPT_SSL_VERIFYPEER set to TRUE
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-215749@lists.php.net to get a copy of this message
From: john357smith at gmail dot com Operating system: Linux PHP version: 7.2.6 Package: cURL related Bug Type: Bug Bug description:emory leakage with CURLOPT_SSL_VERIFYPEER set to TRUE Description: ------------ When cURL is used with CURLOPT_SSL_VERIFYPEER set to TRUE or even without setting it (= default value is TRUE) there is a memory leakage with every call causing memory usage of php process to be constantly increasing. memory_get_usage() reports still the same value so it must be core problem. Keep test script running for more than 1 hour to see difference in memory usage (e.g. with top/htop etc.) After running this script for 24 hours I got 50% of system memory to be used (cca 2GB)! Test script: --------------- error_reporting((E_ALL)); while (TRUE) { $url = "https://www.yahoo.com/"; echo("Fetching $url ... \n"); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_NOBODY, TRUE); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, TRUE); curl_exec($ch); curl_close($ch); usleep(200000); } Expected result: ---------------- No memory leakage even when script is running forever. Actual result: -------------- Memory usage is constantly increasing in time. -- Edit bug report at https://bugs.php.net/bug.php?id=76484&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76484&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76484&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76484&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=76484&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=76484&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=76484&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=76484&r=needscript Try newer version: https://bugs.php.net/fix.php?id=76484&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=76484&r=support Expected behavior: https://bugs.php.net/fix.php?id=76484&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=76484&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=76484&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=76484&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76484&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=76484&r=dst IIS Stability: https://bugs.php.net/fix.php?id=76484&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=76484&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=76484&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=76484&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=76484&r=mysqlcfg

« previous php.bugs (#215749) next »