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

From: Date: Sun, 28 Jun 2020 08:29:45 +0000
Subject: Bug #79751 [NEW]: "VirtualProtect() failed" entries in apache error.log
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-227705@lists.php.net to get a copy of this message
From:             buschmann at nidsa dot net
Operating system: Windows Server 2019 64bit
PHP version:      8.0.0alpha1
Package:          Apache2 related
Bug Type:         Bug
Bug description:"VirtualProtect() failed" entries in apache error.log

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 bug report at https://bugs.php.net/bug.php?id=79751&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=79751&r=fixed
Fixed in release:                 https://bugs.php.net/fix.php?id=79751&r=alreadyfixed
Need backtrace:                   https://bugs.php.net/fix.php?id=79751&r=needtrace
Need Reproduce Script:            https://bugs.php.net/fix.php?id=79751&r=needscript
Try newer version:                https://bugs.php.net/fix.php?id=79751&r=oldversion
Not developer issue:              https://bugs.php.net/fix.php?id=79751&r=support
Expected behavior:                https://bugs.php.net/fix.php?id=79751&r=notwrong
Not enough info:                  https://bugs.php.net/fix.php?id=79751&r=notenoughinfo
Submitted twice:                  https://bugs.php.net/fix.php?id=79751&r=submittedtwice
register_globals:                 https://bugs.php.net/fix.php?id=79751&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79751&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=79751&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=79751&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=79751&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=79751&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=79751&r=nozend
MySQL Configuration Error:        https://bugs.php.net/fix.php?id=79751&r=mysqlcfg


Thread (26 messages)

« previous php.bugs (#227705) next »