Bug #79729 [Asn->Fbk]: Strings missing last character (Apache + OPcache)

From: Date: Wed, 28 Oct 2020 11:52:40 +0000
Subject: Bug #79729 [Asn->Fbk]: Strings missing last character (Apache + OPcache)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-229974@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79729&edit=1 ID: 79729 Updated by: cmb@php.net Reported by: ca at lsp dot net Summary: Strings missing last character (Apache + OPcache) -Status: Assigned +Status: Feedback Type: Bug Package: opcache Operating System: Windows Server 2016 Standard PHP Version: 7.3.21 Assigned To: cmb Block user comment: N Private report: N New Comment: Sorry for the late reply. I'm still somewhat at a loss regarding this issue, since your former comment[1] (and also the email report) didn't reveal anything. I assume that all these issues have the same root cause. However, while I was focused on some kind of memory corruption, I might have been on the wrong track. > - C:/app = test app for branch "develop" > - C:/app-review/12345-foo = review app for branch "12345-foo" > > So could these issues be related to the fact that there are > multiple MyDB.php files? I wonder if I have to enable > opcache.revalidate_path to prevent the wrong file from being > loaded by OPcache? This might be something. opcache.revalidate_path is only relevant if you're using the include path (and possibly changing it during script execution), so yes, please enable that INI setting. Yet another potential issue *might* be issues with the virtual CWD, especially if there are reparse points (such as symlink, junctions, etc.) involved. Are there? [1] <https://bugs.php.net/bug.php?id=79729#1598950932> Previous Comments: ------------------------------------------------------------------------ [2020-09-01 09:02:12] ca at lsp dot net Yesterday, we started observing (new) issues despite opcache.optimization_level=0: 1. Error: Class ***\DebugBar contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (***\DebugBarInterface::sendDataInHeaders) - even though DebugBar *does* implement that method. 2. Warning: Use of undefined constant FILE_DIR - assumed 'FILE_DIR' (this will throw an Error in a future version of PHP) - even though this constant *is* defined in a file included using require_once. Again, these issues appeared without any deployment (i.e. changes to the code), but a common denominiator could be that the system had hardly been used in the days preceding these issues. Calling opcache_reset() did not fix these issues, but disabling OPcache and enabling it again did. PS: The system is actually a Hyper-V virtual machine, running on our own hardware. Not that this should make any difference. ------------------------------------------------------------------------ [2020-07-29 08:32:15] cmb@php.net > This needs to be documented, and preferably also improved. This has been done with <https://github.com/php/php-src/pull/5875>. > […] and will report back in a couple of weeks (if the error does > not occur again). Please report back regardless of the outcome. For the time being, I'm suspending this ticket. ------------------------------------------------------------------------ [2020-07-17 08:11:42] cmb@php.net > Thanks, I have set opcache.optimization_level=0 now and will > report back in a couple of weeks (if the error does not occur > again). Thanks. That might help to track to issue down. Anyhow, my former comment regarding apache2handler startup behavior[1] is wrong. Actually, when running at most a single httpd instance, the message "Opcode handlers are unusable due to ASLR." is not supposed to occur, ever. Thus, this issue may have been reported by a PHP CLI process. > This needs to be documented, and preferably also improved. This holds, though. [1] <https://bugs.php.net/bug.php?id=79729#1594126606> ------------------------------------------------------------------------ [2020-07-13 14:34:34] ca at lsp dot net Thanks, I have set opcache.optimization_level=0 now and will report back in a couple of weeks (if the error does not occur again). ------------------------------------------------------------------------ [2020-07-13 13:25:18] cmb@php.net That might have the same root cause as the truncated identifiers (memory corruption). Did that happen with opcache.optimization_level=0? ------------------------------------------------------------------------ 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=79729 -- Edit this bug report at https://bugs.php.net/bug.php?id=79729&edit=1

« previous php.bugs (#229974) next »