php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69995 Opcache no longer works
Submitted: 2015-07-05 00:29 UTC Modified: 2015-07-06 03:00 UTC
From: chx@php.net Assigned:
Status: Not a bug Package: opcache
PHP Version: 5.6.10 OS: Unix
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: chx@php.net
New email:
PHP Version: OS:

 

 [2015-07-05 00:29 UTC] 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.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-07-05 00:31 UTC] 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 02:34 UTC] 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-06 03:00 UTC] chx@php.net
-Status: Open +Status: Not a bug
 [2015-07-06 03:00 UTC] chx@php.net
Please ignore.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 10:01:28 2024 UTC