Bug #79751 [Com]: "VirtualProtect() failed" entries in apache error.log
| From: | dominique at ottello dot net | Date: | Sun, 01 Nov 2020 09:26:34 +0000 |
| Subject: | Bug #79751 [Com]: "VirtualProtect() failed" entries in apache error.log | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-230051@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=79751&edit=1
ID: 79751
Comment by: dominique at ottello dot net
Reported by: buschmann at nidsa dot net
Summary: "VirtualProtect() failed" entries in apache
error.log
Status: Open
Type: Bug
Package: opcache
Operating System: Windows Server 2019 64bit
PHP Version: 8.0.0alpha1
Block user comment: N
Private report: N
New Comment:
To avoid these errors under Windows, I added under the [opcache] section of php.ini:
; To avoid errors VirtualProtect() failed [...] Incorrect parameter
opcache.jit=off
It would be nice if in the php.ini-development and php.ini-production files of the php 8 packages
for Windows this directive is integrated.
It would be even better if the php.ini-development and php.ini-production files integrate, by
default, the appropriate directives so that opcache does not give errors under Windows.
Previous Comments:
------------------------------------------------------------------------
[2020-10-30 11:11:12] phpdev at ehrhardt dot nl
Or is Opcache JIT only availabke at smaller pages? What is the maximum?
------------------------------------------------------------------------
[2020-10-30 10:57:53] phpdev at ehrhardt dot nl
@Christoph or @Nikita Is there any change Opcache JIT will be supported on Windows anywhere in the
near future?
------------------------------------------------------------------------
[2020-10-30 08:50:21] dominique at ottello dot net
Same errors on Windows with PHP 8.0.0 beta1 to RC3
Apache used as a service and PHP as an Apache module.
opcache is loaded in php.ini by:
[opcache]
zend_extension="E:/wamp64/bin/php/php8.0.0rc3/ext/php_opcache.dll"
Errors occur when using all default opcache directives as they are in the php.ini-development or
php.ini-production templates.
------------------------------------------------------------------------
[2020-06-30 21:44:31] cmb@php.net
> I would like to test JIT with huge pages on on Windows.
I just learned that these are not supported by PHP on Windows.
------------------------------------------------------------------------
[2020-06-30 15:01:41] buschmann at nidsa dot net
When it helps, I can show below all lines from my active php.ini containing "opcache.":
zend_extension = N:\Apache\php8\ext\php_opcache.dll
;zend_extension = N:\Apache\php8\php_opcache.dll
;opcache.enable=0
opcache.enable=1
;opcache.enable_cli=0
;opcache.memory_consumption=64
opcache.memory_consumption=32
;opcache.interned_strings_buffer=4
opcache.interned_strings_buffer=4
;opcache.max_accelerated_files=2000
opcache.max_accelerated_files=980
;opcache.max_wasted_percentage=5
;opcache.use_cwd=1
;opcache.validate_timestamps=1
;opcache.revalidate_freq=2
opcache.revalidate_freq=60
;opcache.revalidate_path=0
;opcache.save_comments=1
opcache.save_comments=0
;opcache.load_comments=1
opcache.load_comments=0
;opcache.fast_shutdown=0
;opcache.fast_shutdown=0
;opcache.enable_file_override=0
;opcache.optimization_level=0xffffffff
;opcache.inherited_hack=1
;opcache.dups_fix=0
;opcache.blacklist_filename=
;opcache.max_file_size=0
;opcache.consistency_checks=0
;opcache.force_restart_timeout=180
;opcache.error_log=
;opcache.log_verbosity_level=1
;opcache.preferred_memory_model=
;opcache.protect_memory=0
;opcache.protect_memory=0
opcache.huge_code_pages=1
; http://php.net/opcache.preload
;opcache.preload=
;;opcache.preload="N:\Apache\Apache24\conf\local\php_preload.php"
opcache.jit_buffer_size=16M
This seems to set/change only the following settings:
[opcache]
opcache.enable=1
opcache.memory_consumption=32
opcache.interned_strings_buffer=4
opcache.max_accelerated_files=980
opcache.revalidate_freq=60
opcache.save_comments=0
opcache.load_comments=0
opcache.huge_code_pages=1
opcache.jit_buffer_size=16M
Perhaps this may help to explain where the defaults JIT=ON and jit_buffer_size=0 stem from.
BTW: Do you have an idea with php_info and opcache.huge_code_pages not showing?
In my php.ini I left it on but never confirmed that it worked under windows (it requires OS support,
but how exactly ?!?!)
I have managed to activate and verify huge pages usage for Postgres shared buffers on Windows 64bit
(by pinning memory with gpedit.msc).
I would like to test JIT with huge pages on on Windows.
Thanks!
------------------------------------------------------------------------
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=79751
--
Edit this bug report at https://bugs.php.net/bug.php?id=79751&edit=1