Bug #68565 [NEW]: Counter for wasted memory in Opcache is only int

From: Date: Mon, 08 Dec 2014 12:01:52 +0000
Subject: Bug #68565 [NEW]: Counter for wasted memory in Opcache is only int
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-188957@lists.php.net to get a copy of this message
From: kontakt at adrianslowik dot pl Operating system: Not relevant / Linux Gentoo PHP version: 5.5.19 Package: opcache Bug Type: Bug Bug description:Counter for wasted memory in Opcache is only int Description: ------------ When I set opcache.memory_consumption to 10240 (10Gb), it is possible to have more than 2Gb of wasted memory. The Wasted memory variable in code is stored in signed int instead of size_t. In fact I end up with negative amount of wasted memory and wasted memory percentage, which is less than default 5% for scheduling the reload. To replicate the problem set the opcache.memory_consumption to high value (3Gb) Use opcache_compile_file and opcache_invalidate in loop with the same file until wasted memory rises above 2Gb php.ini settings: opcache.enable=1 opcache.enable_cli=0 opcache.memory_consumption=10240 opcache.interned_strings_buffer=16 opcache.max_accelerated_files=1048793 opcache.max_wasted_percentage=5 opcache.use_cwd=1 opcache.validate_timestamps=0 opcache.revalidate_freq=2 opcache.revalidate_path=1 opcache.save_comments=1 opcache.load_comments=1 opcache.error_log=/var/log/php-fpm.opcache.log opcache.log_verbosity_level=1 -- Edit bug report at https://bugs.php.net/bug.php?id=68565&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68565&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68565&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68565&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=68565&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=68565&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=68565&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=68565&r=needscript Try newer version: https://bugs.php.net/fix.php?id=68565&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=68565&r=support Expected behavior: https://bugs.php.net/fix.php?id=68565&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=68565&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=68565&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=68565&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68565&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=68565&r=dst IIS Stability: https://bugs.php.net/fix.php?id=68565&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=68565&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=68565&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=68565&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=68565&r=mysqlcfg

« previous php.bugs (#188957) next »