Bug #75373 [Com]: Warning Internal error: wrong size calculation
| From: | tm8544 at hotmail dot com | Date: | Mon, 16 Oct 2017 16:40:47 +0000 |
| Subject: | Bug #75373 [Com]: Warning Internal error: wrong size calculation | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-211727@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75373&edit=1
ID: 75373
Comment by: tm8544 at hotmail dot com
Reported by: tm8544 at hotmail dot com
Summary: Warning Internal error: wrong size calculation
Status: Feedback
Type: Bug
Package: opcache
Operating System: Windows 10 x64
PHP Version: 7.2.0RC4
Block user comment: N
Private report: N
New Comment:
Relevant ini options (opcache)
------------------------------
zend_extension=php_opcache.dll
opcache.enable=1
opcache.enable_cli=0
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.max_wasted_percentage=5
opcache.use_cwd=1
opcache.validate_timestamps=1
opcache.revalidate_freq=60
opcache.file_update_protection=900
opcache.revalidate_path=1
opcache.save_comments=1
opcache.load_comments=1
opcache.fast_shutdown=0
opcache.enable_file_override=0
opcache.optimization_level=0xffffffff
opcache.inherited_hack=0
opcache.dups_fix=0
opcache.blacklist_filename=c:\PHP\php.ini.opcache_blacklist.txt
opcache.max_file_size=0
opcache.consistency_checks=0
opcache.force_restart_timeout=15
opcache.error_log=""
opcache.log_verbosity_level=2
opcache.preferred_memory_model=""
opcache.protect_memory=0
opcache.restrict_api=""
opcache.mmap_base=0x20000000
opcache.file_cache=""
opcache.file_cache_only=0
opcache.file_cache_consistency_checks=0
opcache.file_cache_fallback=0
opcache.huge_code_pages=0
opcache.validate_permission=0
opcache.validate_root=0
Reproduce code
-----------------
Batch file that runs once every hour to refresh the Opcache. Actual server name and username +
password are replaced.
"C:\curl\curl.exe" https://_SERVERNAME_/index.php?ei_laskuria=1
-k --user un:pw
"C:\curl\curl.exe" https://kauppa._SERVERNAME_/index.php -k --user
un:pw
"C:\curl\curl.exe" https://forum._SERVERNAME_/index.php -k --user un:pw
"C:\curl\curl.exe" https://_SERVERNAME_/mysqladm1n007/index.php
-k --user un:pw
Previous Comments:
------------------------------------------------------------------------
[2017-10-15 17:02:12] ab@php.net
Thanks for the report. @tm8544, please provide a reproduce code snippet and the relevant ini
options.
Thanks.
------------------------------------------------------------------------
[2017-10-15 12:53:33] tm8544 at hotmail dot com
Eventually 'Warning Internal error: wrong size calculation' appered into the log again, so
it was not about config options.
------------------------------------------------------------------------
[2017-10-15 11:17:37] tm8544 at hotmail dot com
The first comment led me thinking that after all, what if it is about an already cached script?
I my PHP.ini some opcache config options were commented out, so they were in their default values.
I changed this so that I specifically gave those options the default value.
For opcache.file_cache_consistency_checks I also changed the value, even though file_cache is not
used.
Here are all config options, changed lines are marked with ***, left is the new value / right is the
old value.
opcache.enable=1 / opcache.enable=1
opcache.enable_cli=0 / opcache.enable_cli=0
opcache.memory_consumption=128 / opcache.memory_consumption=128
opcache.interned_strings_buffer=8 / opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000 / opcache.max_accelerated_files=4000
*** opcache.max_wasted_percentage=5 / ;opcache.max_wasted_percentage=5
*** opcache.use_cwd=1 / ;opcache.use_cwd=1
opcache.validate_timestamps=1 / opcache.validate_timestamps=1
opcache.revalidate_freq=60 / opcache.revalidate_freq=60
opcache.file_update_protection=3600 / opcache.file_update_protection=3600
opcache.revalidate_path=1 / opcache.revalidate_path=1
opcache.save_comments=1 / opcache.save_comments=1
opcache.load_comments=1 / opcache.load_comments=1
opcache.fast_shutdown=0 / opcache.fast_shutdown=0
*** opcache.enable_file_override=0 / ;opcache.enable_file_override=0
opcache.optimization_level=0xffffffff / opcache.optimization_level=0xffffffff
*** opcache.inherited_hack=1 / ;opcache.inherited_hack=1
*** opcache.dups_fix=0 / ;opcache.dups_fix=0
opcache.blacklist_filename=c:\PHP\php.ini.opcache_blacklist.txt /
opcache.blacklist_filename=c:\PHP\php.ini.opcache_blacklist.txt
*** opcache.max_file_size=0 / ;opcache.max_file_size=0
*** opcache.consistency_checks=0 / ;opcache.consistency_checks=0
opcache.force_restart_timeout=15 / opcache.force_restart_timeout=15
*** opcache.error_log="" / ;opcache.error_log=
opcache.log_verbosity_level=2 / opcache.log_verbosity_level=2
*** opcache.preferred_memory_model="" / ;opcache.preferred_memory_model=
*** opcache.protect_memory=0 / opcache.protect_memory=0
*** opcache.restrict_api="" / ;opcache.restrict_api=
opcache.mmap_base=0x20000000 / opcache.mmap_base=0x20000000
*** opcache.file_cache="" / ;opcache.file_cache=
*** opcache.file_cache_only=0 / ;opcache.file_cache_only=0
*** opcache.file_cache_consistency_checks=0 / ;opcache.file_cache_consistency_checks=1
*** opcache.file_cache_fallback=0 / ;opcache.file_cache_fallback=1
*** opcache.huge_code_pages=0 / ;opcache.huge_code_pages=1
*** opcache.validate_permission=0 / ;opcache.validate_permission=0
*** opcache.validate_root=0 / ;opcache.validate_root=0
After this, I have not seen any warning of wrong size calculation in Apache log.
Could it be that PHP7.2.0 handles opcache config option default values differently than e.g. 7.1 or
previous versions?
------------------------------------------------------------------------
[2017-10-15 06:28:20] tm8544 at hotmail dot com
In this case, I believe it is not a about replacing an already cached script. It happens even when
the server is restarted, so there should be no cached scripts in memory.
It is always those three scripts, values for 'start', 'end' and 'real'
change from time to time
------------------------------------------------------------------------
[2017-10-13 18:14:19] spam2 at rhsoft dot net
I faced this "internal size error" randomly after upgrade to php 7.1.x in production but
can't trigger it reliable - when it happens it is always after replace a already cached script
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=75373
--
Edit this bug report at https://bugs.php.net/bug.php?id=75373&edit=1