Bug #75175 [NEW]: Opcache_reset() does not clear cache
| From: | tm8544 at hotmail dot com | Date: | Fri, 08 Sep 2017 14:56:32 +0000 |
| Subject: | Bug #75175 [NEW]: Opcache_reset() does not clear cache | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-211009@lists.php.net to get a copy of this message | ||
From: tm8544 at hotmail dot com
Operating system: Windows 10 x64
PHP version: 7.2.0RC1
Package: opcache
Bug Type: Bug
Bug description:Opcache_reset() does not clear cache
Description:
------------
After opcache_reset, with version 7.2.0RC1 "used_memory" still occupies
much more memory than with version 7.1.9. Opcache runtime configuration
stays the same.
Expected result shows test script output with PHP 7.1.9,
and actual result shows test script output with PHP 7.2.0RC1.
Test script:
---------------
<html><body><pre><?php
echo "Memory Usage before reset:\r\n";
$a = opcache_get_status();
var_dump($a["memory_usage"]);
echo "----------------------\r\n";
echo "Reset Opcache\r\n";
$ok = opcache_reset();
var_dump($ok);
echo "----------------------\r\n";
echo "Memory Usage after reset:\r\n";
$a = opcache_get_status();
var_dump($a["memory_usage"]);
?></pre></body></html>
Expected result:
----------------
Memory Usage before reset:
array(4) {
["used_memory"]=>
int(701384)
["free_memory"]=>
int(133516344)
["wasted_memory"]=>
int(0)
["current_wasted_percentage"]=>
float(0)
}
----------------------
Reset Opcache
bool(true)
----------------------
Memory Usage after reset:
array(4) {
["used_memory"]=>
int(701384)
["free_memory"]=>
int(133516344)
["wasted_memory"]=>
int(0)
["current_wasted_percentage"]=>
float(0)
}
Actual result:
--------------
Memory Usage before reset:
array(4) {
["used_memory"]=>
int(18272056)
["free_memory"]=>
int(115945672)
["wasted_memory"]=>
int(0)
["current_wasted_percentage"]=>
float(0)
}
----------------------
Reset Opcache
bool(true)
----------------------
Memory Usage after reset:
array(4) {
["used_memory"]=>
int(18272056)
["free_memory"]=>
int(115945672)
["wasted_memory"]=>
int(0)
["current_wasted_percentage"]=>
float(0)
}
--
Edit bug report at https://bugs.php.net/bug.php?id=75175&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75175&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75175&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75175&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=75175&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=75175&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=75175&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=75175&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=75175&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=75175&r=support
Expected behavior: https://bugs.php.net/fix.php?id=75175&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=75175&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=75175&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=75175&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75175&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=75175&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=75175&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=75175&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=75175&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=75175&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=75175&r=mysqlcfg