Bug #80422 [Asn]: php_opcache.dll crashes when using Apache 2.4 with JIT
| From: | martin at radiok2r dot de | Date: | Wed, 13 Jan 2021 08:11:11 +0000 |
| Subject: | Bug #80422 [Asn]: php_opcache.dll crashes when using Apache 2.4 with JIT | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-231526@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=80422&edit=1
ID: 80422
User updated by: martin at radiok2r dot de
Reported by: martin at radiok2r dot de
Summary: php_opcache.dll crashes when using Apache 2.4 with
JIT
Status: Assigned
Type: Bug
Package: JIT
Operating System: Windows 10 64-bit
PHP Version: 8.0.0
Assigned To: dmitry
Block user comment: N
Private report: N
New Comment:
I changed the code for testing a bit to make it independent from the webserver:
<?php
print "Hello world\r\n";
for ($i = 0; $i < 100; $i++)
{ $b = file_exists("index.php");
print $i;
var_dump($b);
}
print "It worked";
This code still crashes in Apache, but works fine with CLI.
I'm not sure what else I could do to make it reproducible for you, I already gave you the
versions from Apache I'm using. What else could influence that it works for you and not for me
and louisowen?
Previous Comments:
------------------------------------------------------------------------
[2021-01-13 06:12:39] dmitry@php.net
I wasn't able to reproduce the crash on test case from @martin.
Is it crashes on very first request (after web server start)?
I need a well reproducible test case to analyse and fix this.
Better, if it possible to reproduce the crash with CLI PHP (without Apache).
However, the problem may be especially related to Apache SAPI (ZTS or Windows ASLR).
------------------------------------------------------------------------
[2021-01-13 02:30:15] louisowen at me dot com
same situation,hope this bug can be solved quickly.
------------------------------------------------------------------------
[2020-12-14 15:49:47] martin at radiok2r dot de
Thanks for your reply and all your hints!
It all works with opcache.jit=1205 without problems.
Without opcache.jit=1205 (no setting for opcache.jit at all in the php.ini) this php-code crashes:
<?php
print "Hello world\r\n";
print $_SERVER["DOCUMENT_ROOT"]."\r\n";
for ($i = 0; $i < 100; $i++)
{ $b = file_exists($_SERVER["DOCUMENT_ROOT"]."/index.php");
}
print "It worked";
When reducing the loop to run 50 times it works, but 100 times is too much and it crashes.
Hope this helps.
------------------------------------------------------------------------
[2020-12-14 13:42:57] dmitry@php.net
Also try to reproduce the same problem with opcache.jit=1205. If you see the same crash, try to
isolate the problem with opcache.jit=1205 (it should be easier).
------------------------------------------------------------------------
[2020-12-14 13:39:11] dmitry@php.net
Check what page causes the crash.
Try to reproduce the same crash, passing the script and CGI environment variables command line PHP
(or PHP-CGI).
If the application doesn't use external resources (DB, etc) and doesn't contain sensitive
data, you may just pack and send it to me (with instruction, how to reproduce the crash).
Otherwise, you need to track down to the problem yourself... You may catch the crash in debugger and
check the PHP source position printing
(char*)executor_globals.current_execute_data->func->op_array.function_name.val and
executor_globals.current_execute_data->opline->lineno. Then try to isolate the function(s)
involved into crash. This is not a simple task...
------------------------------------------------------------------------
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=80422
--
Edit this bug report at https://bugs.php.net/bug.php?id=80422&edit=1