Bug #70795 [Fbk->Csd]: Opcache causes segfaults when Constant Arrays are used under some concurrency
| From: | bastiaan at mollie dot com | Date: | Wed, 28 Oct 2015 09:49:37 +0000 |
| Subject: | Bug #70795 [Fbk->Csd]: Opcache causes segfaults when Constant Arrays are used under some concurrency | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-196853@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=70795&edit=1
ID: 70795
User updated by: bastiaan at mollie dot com
Reported by: bastiaan at mollie dot com
Summary: Opcache causes segfaults when Constant Arrays are
used under some concurrency
-Status: Feedback
+Status: Closed
Type: Bug
Package: opcache
Operating System: Linux debian wheezy
PHP Version: 5.6.14
Block user comment: N
Private report: N
New Comment:
I can confirm that php-5.6.15RC1 indeed fixes this.
Previous Comments:
------------------------------------------------------------------------
[2015-10-26 21:12:11] nikic@php.net
This is likely the same issue as https://bugs.php.net/bug.php?id=70601. Could you
check if 5.6.15RC1 (or 5.6-dev) fixes this issue?
------------------------------------------------------------------------
[2015-10-26 16:42:24] bastiaan at mollie dot com
Description:
------------
Call the script foo.bar, host it with apache2 on localhost and use ab to call the script
concurrently:
ab -c 20 -n 10000 'http://127.0.0.1/foo.php'
Tail the output of /var/log/apache2/*.log
Test script:
---------------
<?php
class Bar
{
const FOO = [
'foo' => 'bar',
];
public function foo($bar)
{
return self::FOO[$bar];
}
}
$foo = new Bar;
usleep(rand(1,1000000));
$bar = $foo->foo('foo');
Expected result:
----------------
status 200 / no segfaults
Actual result:
--------------
A segfault and segfaults to any subsequent requests to the same script.
[Mon Oct 26 17:07:39 2015] [error] [client 127.0.0.1] PHP Fatal error: Out of memory (allocated
262144) (tried to allocate 139794773411952 bytes) in Unknown on line 0
[Mon Oct 26 17:07:39 2015] [notice] child pid 7385 exit signal Segmentation fault (11)
[Mon Oct 26 17:07:39 2015] [notice] child pid 7386 exit signal Segmentation fault (11)
[Mon Oct 26 17:07:39 2015] [notice] child pid 7390 exit signal Segmentation fault (11)
[Mon Oct 26 17:07:39 2015] [notice] child pid 7391 exit signal Segmentation fault (11)
[Mon Oct 26 17:07:39 2015] [notice] child pid 7392 exit signal Segmentation fault (11)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70795&edit=1