Bug #69995 [Opn->Nab]: Opcache no longer works
| From: | chx@php.net | Date: | Mon, 06 Jul 2015 03:00:29 +0000 |
| Subject: | Bug #69995 [Opn->Nab]: Opcache no longer works | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-194145@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=69995&edit=1
ID: 69995
Updated by: chx@php.net
Reported by: chx@php.net
Summary: Opcache no longer works
-Status: Open
+Status: Not a bug
Type: Bug
Package: opcache
Operating System: Unix
PHP Version: 5.6.10
Block user comment: N
Private report: N
New Comment:
Please ignore.
Previous Comments:
------------------------------------------------------------------------
[2015-07-05 02:34:11] ben at dougherty dot net dot au
The sample script chx gave wasn't always broken/working for me but here is a minimalist version
around the Drupal core patch he mentioned that never works: http://privatepaste.com/8904019d51
It's broken on:
PHP 5.6.10-1+deb.sury.org~trusty+1 (cli)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
Here's a full strace: http://privatepaste.com/c28af303c2 and the php.ini
settings: http://privatepaste.com/ce0c4bed5d
Works fine on:
PHP 5.5.9-1ubuntu4.9 (cli) (built: Apr 17 2015 11:44:57)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
------------------------------------------------------------------------
[2015-07-05 00:31:50] chx@php.net
Sorry, I forgot to add
Expected
bool(true)
bool(true)
Instead we got
bool(true)
bool(false)
as
and it's not in the opcache_get_status dump either. Also, as I mentioned, https://www.drupal.org/files/issues/2513326_34.patch
longer hits.
------------------------------------------------------------------------
[2015-07-05 00:29:56] chx@php.net
Description:
------------
opcache seems broken, plain and simple. The INI settings are the same to PHP 5.5 where the test
script worked.
PHP 5.6.10-1+deb.sury.org~trusty+1 (cli)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
When strace'ing we have found that after the stat to test.php working versions issued
fcntl(3, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=1}) = 0
fcntl(3, F_SETLK, {type=F_UNLCK, whence=SEEK_SET, start=0, len=1}) = 0
where
open("/tmp/.ZendSem.amvda2", O_RDWR|O_CREAT|O_EXCL, 0600) = 3
but this more seems a corollary than a cause, still I thought I'll mention it.
Test script:
---------------
<?php
var_dump(opcache_compile_file('test.php'));
var_dump(opcache_is_script_cached("test.php"));
$scripts = opcache_get_status(TRUE);
var_dump($scripts);
?>
test.php can be either empty or just <?php . It also broke https://www.drupal.org/files/issues/2513326_34.patch
(but that's a hack) I got a report it working with 5.6.4; I haven't run the reproduction
scripts with 5.6.4.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69995&edit=1