php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79603 RTD collision with opcache
Submitted: 2020-05-15 13:16 UTC Modified: 2020-05-18 12:22 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: nikic@php.net Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 7.4.6 OS:
Private report: No CVE-ID: None
 [2020-05-15 13:16 UTC] nikic@php.net
Description:
------------
It is possible to cause RTD key collisions through opcache. Here is a reproducer using file cache, though the same would also work through SHM:

file1.php:
<?php
return function() {};

file2.php:
<?php
$file = 'file1.php';
var_dump(include $file);
touch($file);
var_dump(include $file);

Then run file1.php first and file2.php second under -d opcache.file_cache_only=1.

Actual result:
--------------
Fatal error: Runtime definition key collision for function {closure}. This is a bug

Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-05-18 12:20 UTC] nate at northern dot co
This might be related to a segfault I'm experiencing. I have a repo with an example here: https://github.com/natewiebe13/php-preload-segfault
 [2020-05-18 12:22 UTC] nikic@php.net
@nate: Based on the class involved, this is almost certainly bug #79548, which will be fixed in the next release.
 [2020-05-19 10:23 UTC] nikic@php.net
The following pull request has been associated:

Patch Name: Retry on RTD key collision
On GitHub:  https://github.com/php/php-src/pull/5597
Patch:      https://github.com/php/php-src/pull/5597.patch
 [2020-05-20 09:25 UTC] nikic@php.net
Automatic comment on behalf of nikita.ppv@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=4f47ba99f002d50e11c111b8625d81f79b2bf52f
Log: Fix bug #79603, by retrying on RTD key collision
 [2020-05-20 09:25 UTC] nikic@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 18:01:28 2024 UTC