SHM issues PHP7 x64
| From: | Jan Ehrhardt | Date: | Thu, 13 Apr 2017 10:10:30 +0000 |
| Subject: | SHM issues PHP7 x64 | ||
| Groups: | php.internals.win | ||
| Request: | Send a blank email to internals-win+get-1166@lists.php.net to get a copy of this message | ||
There is a reproducable SHM issue with php_apcu.dll in PHP 7 NTS x64:
https://github.com/krakjoe/apcu/issues/223#issuecomment-288202260
I thought that could be due to the special method that apcu uses to
create a SHM block. It directly loads ntdll.dll:
https://github.com/krakjoe/apcu/blob/master/apc_windows_srwlock_kernel.c#L63
I tried to reproduce this issue on AppVeyor, but failed:
https://github.com/krakjoe/apcu/pull/240
My conclusion at that time was, that php_apcu.dll is broken on x64. In
PHP7 only, because it works perfectly in PHP 5.6.
But today I ran into an issue that seems related. On a Windows 2008 R2
(development) server I am running Apache/2.4.25 (Win64) PHP/7.1.4
OpenSSL/1.0.2k-fips mod_fcgid/2.3.9.
The server is really low traffic. There is a Drupal 7 site running on it
with me as the only user. Drupal 7 runs with PHP 7.1.4 NTS x64 under
mod_fcgid, without php_apcu.dll.
The site reproduced Internal server errors 500 today. Nothing in the
logs except that "the pipe had been ended", indicating that php-cgi.exe
did not return anything to mod_fcgid. Then I checked eventvrw.msc. Error
message in Zend OPcache:
|Base address marks unusable memory region. Please setup
|opcache.file_cache and opcache.file_cache_fallback directives for more
|convenient Opcache usage
| Attempt to access invalid address
This error message is SHM related as well, according to Anatol:
http://markmail.org/message/hhieta6jpzocnvll#query:+page:1+mid:cyq7g7fcibunrdr2+state:results
I cannot easily reproduce the Error 500 on my Win2k8 server. They
disappeared after the php-cgi.exe instance had been killed by Apache:
[Thu Apr 13 10:17:55.795816 2017] [fcgid:warn] [pid 7264:tid 828]
mod_fcgid: process 5604 graceful kill fail, sending SIGKILL
But the problem with php_apcu.dll is reproducable on my Win7 Pro laptop
and on the Win2k8 server.
https://github.com/krakjoe/apcu/pull/240#issuecomment-288365944
Ugly problem. Is there anything I can do to get it solved?
--
Jan