Bug #79751 [Opn]: "VirtualProtect() failed" entries in apache error.log

From: Date: Tue, 30 Jun 2020 07:25:57 +0000
Subject: Bug #79751 [Opn]: "VirtualProtect() failed" entries in apache error.log
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-227733@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 Updated by: cmb@php.net Reported by: buschmann at nidsa dot net Summary: "VirtualProtect() failed" entries in apache error.log Status: Open Type: Bug Package: Apache2 related Operating System: Windows Server 2019 64bit PHP Version: 8.0.0alpha1 Block user comment: N Private report: N New Comment: I think these log entries are from OPcache JIT. Do you have JIT enabled (see PHP info)? Previous Comments: ------------------------------------------------------------------------ [2020-06-29 15:42:19] buschmann at nidsa dot net when I set opcache.protect_memory=0 (verified in php_info opcache.protect_memory Off Off) the problem stays the same. I don't know the internals, but the sripts in the web application are working in both situations. ------------------------------------------------------------------------ [2020-06-29 08:49:49] nikic@php.net Does the problem go away if you set opcache.protect_memory=0? This is an debugging setting, that should not be enabled for production opcache use. Of course, it still shouldn't cause failures... ------------------------------------------------------------------------ [2020-06-28 08:29:45] buschmann at nidsa dot net Description: ------------ When trying to load the opcache with php-scripts from tools and our application in a script to preload the opcache: (here one example line:) <?php $bresult=opcache_compile_file('N:\Apache\tcpdf\include\tcpdf_colors.php'); I get multiple entries in the apache error.log file as : ... [Sun Jun 28 09:58:00.642291 2020] [mpm_winnt:notice] [pid 6572:tid 548] AH00354: Child: Starting 64 worker threads. VirtualProtect() failed VirtualProtect() failed ... This was the first operation (explicitly and manually called from a browser) after a fresh start from Apache/php as a service. It seems that 2 entries per compile request are generated (without timestamp). There are no errors reported in php_err.log. The scripts have been successfully loaded into opcache as reported by https://github.com/amnuts/opcache-gui - version 2.5.4 The same preload script has been used under 7.x.y until 7.4.7 for a long time without this issue. Environment: - Windows server 2019 64bit Standard in a VM under HyperV - Apache 2.43 64bit from apachelounge - php 8 alpha1 64bit thread safe from php.net QA download - php loaded as a module with php_module Test script: --------------- <?php $bresult=opcache_compile_file('N:\Apache\tcpdf\include\tcpdf_colors.php'); Expected result: ---------------- No error log entry in error.log ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=79751&edit=1

« previous php.bugs (#227733) next »