php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76260 crash on any little error when opcache enabled,build with Intel C Compiler
Submitted: 2018-04-24 16:08 UTC Modified: 2021-07-18 04:22 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: inari at sosteam dot jp Assigned: cmb (profile)
Status: No Feedback Package: opcache
PHP Version: Irrelevant OS: Debian 8 x86_64
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
2 + 3 = ?
Subscribe to this entry?

 
 [2018-04-24 16:08 UTC] inari at sosteam dot jp
Description:
------------
test in php-fpm+nginx and php+apache,if any wrong part in php code(but it can run on the php with gcc compiler normal),and php will crash,
nginx and apache will return error 500.


I collect some crashes information,seems it was all with opcache.
And then I disabled opcache,now it could run php code normal.

Here is the build informations -

Compiler:
Intel C Compiler 2018 update 2(18.0.2.199 Build 20180210)

PHP Version:
7.3.0-dev(jit-dynasm)

Build options:
--enable-debug
--disable-cgi
--enable-cli
--enable-fpm
--enable-opcache
CFLAGS="-O0"
CXXFLAGS="-O0"

without any changes in php.ini

I put one of crash example code at test script.
How could fix it without crash?


Sorry for my bad english,
thank you for helping!


Test script:
---------------
<?php
function test(){
	$TEST['A']['A'] = 1;
	$TEST['A']['B'] = implode("test", $TEST['A']['B']);
}
test()
?>

Expected result:
----------------
It's could run without error like build with gcc.

Actual result:
--------------
Program terminated with signal SIGILL, Illegal instruction.
#0  0x0000000000d8838c in zend_error_va_list (type=23778976, format=0x1 <error: Cannot access memory at address 0x1>,
    args=0x7ffc86bd0ed0) at /usr/local/src/php-7.2.4/Zend/zend.c:1363
1363                            zval_ptr_dtor(&params[4]);

***************************************************************************

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000000000fca501 in zend_error (type=8, format=0x7fdc23bc651c "Undefined index: %s")
    at /usr/local/src/php-7.2.4/Zend/zend.c:1399
1399    {

***************************************************************************

Program terminated with signal SIGILL, Illegal instruction.
#0  0x0000000000fca281 in zend_wrong_parameters_none_error () at /usr/local/src/php-7.2.4/Zend/zend_API.c:181
181                                     ZEND_ARG_USES_STRICT_TYPES(),

***************************************************************************

Program terminated with signal SIGILL, Illegal instruction.
#0  0x0000000000fca3c3 in zend_throw_error (exception_ce=0x7ffc9992b5c8, format=0x7fb11c020550 "\340\221\006\034\261\177")
    at /usr/local/src/php-7.2.4/Zend/zend.c:1427
1427                            exception_ce = zend_ce_error;

***************************************************************************

Program terminated with signal SIGABRT, Aborted.
#0  0x00007fb120a4ce7b in raise () from /lib/x86_64-linux-gnu/libc.so.6

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-04-24 16:24 UTC] levim@php.net
What CPU model do you have?
 [2018-04-24 16:28 UTC] inari at sosteam dot jp
Thank you for reply.

here is the cpu model:
Intel Xeon W-2145

Thank you!
 [2018-04-24 16:47 UTC] inari at sosteam dot jp
I'm sorry there is a mistake in test script,
here is the correct script:
<?php
function test(){
	$TEST['A']['A'] = 1;
	$TEST['A']['B'] = implode("test", $TEST['A']['B']);
}
test();
?>
 [2021-07-08 13:21 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-07-08 13:21 UTC] cmb@php.net
Is this still an issue with any of the actively supported PHP
versions[1]?  If so, are there any compiler warnings?

[1] <https://www.php.net/supported-versions.php>
 [2021-07-18 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Sep 18 05:03:36 2021 UTC