Edit report at https://bugs.php.net/bug.php?id=70428&edit=1
ID: 70428
Comment by: viking at xakep dot ru
Reported by: christian at rishoj dot net
Summary: Opcache crashes with SIGSEGV
Status: Re-Opened
Type: Bug
Package: opcache
Operating System: Ubuntu 14.04
PHP Version: 5.6.12
Block user comment: N
Private report: N
New Comment:
Yes, it also crash with
opcache.fast_shutdown=0
Previous Comments:
------------------------------------------------------------------------
[2016-04-16 20:50:25] mfischer@php.net
Does it also crash with opcache.fast_shutdown=0 ?
------------------------------------------------------------------------
[2015-12-23 10:56:33] viking at xakep dot ru
And no errors when
opcache.interned_strings_buffer=0
------------------------------------------------------------------------
[2015-12-23 10:45:37] viking at xakep dot ru
you don't need to call any functions, just create new instance. This isolated code always
crashes with configuration
opcache.use_cwd=1
opcache.validate_timestamps=1
opcache.memory_consumption=128
opcache.log_verbosity_level=2
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.fast_shutdown=1
opcache.enable_cli=1
but only after first crash in non-sharable code
call stack
#0 0x000000000076058a in _zend_mm_alloc_int ()
#1 0x000000000077b7b6 in init_op_array ()
#2 0x00000000007713ad in zend_do_begin_function_declaration ()
#3 0x000000000074d654 in zendparse ()
#4 0x0000000000751228 in compile_file ()
#5 0x00000000006045f2 in phar_compile_file ()
#6 0x00007f2ebf01fa99 in compile_and_cache_file.constprop.17 () from
/opt/aol/production/php56/ext/opcache.so
#7 0x00007f2ebf0207d2 in persistent_compile_file () from /opt/aol/production/php56/ext/opcache.so
#8 0x0000000000751397 in compile_filename ()
#9 0x000000000082baa3 in ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER ()
#10 0x00000000007bdbe8 in execute_ex ()
#11 0x0000000000778e03 in zend_call_function ()
#12 0x000000000079ef35 in zend_call_method ()
#13 0x000000000067c10a in zif_spl_autoload_call ()
#14 0x0000000000778d66 in zend_call_function ()
#15 0x00000000007796b2 in zend_lookup_class_ex ()
#16 0x0000000000779d92 in zend_fetch_class_by_name ()
#17 0x00000000007d4209 in ZEND_FETCH_CLASS_SPEC_CONST_HANDLER ()
#18 0x00000000007bdbe8 in execute_ex ()
#19 0x00000000007897a0 in zend_execute_scripts ()
#20 0x0000000000728562 in php_execute_script ()
#21 0x00000000004350b0 in main ()
------------------------------------------------------------------------
[2015-12-23 10:08:18] requinix@php.net
@viking:
> $this->{self::TEST_CONST}();
That will cause PHP to call testConst() repeatedly until the process eventually runs out of stack
space and crashes. This is expected behavior.
Do you have a test case that is related to @christian's problem with opcache and the
opcache.interned_strings_buffer setting?
------------------------------------------------------------------------
[2015-12-23 08:57:15] viking at xakep dot ru
No, it not that bug. So this is one, but floating reproduction. Always reproduce after first crash
of php_fpm
TestClass.php >>
<?php
class TestClass {
public function __get($field)
{}
public function someMethodName()
{
return $this->someMethodName;
}
}
?>
-----------------------
baseClass.php >>
spl_autoload_register(function($className){
$fileName = $className . '.php';
include $fileName;
});
class baseClass extends TestClass{
const TEST_CONST = 'testConst';
private function testConst()
{
if ( true) {
$this->{self::TEST_CONST}();
}
}
}
$class = new baseClass();
?>
php 5.6.12 on 3.10.0-229.7.2.el7.x86_64
------------------------------------------------------------------------
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=70428
--
Edit this bug report at https://bugs.php.net/bug.php?id=70428&edit=1