Closed ben221199 closed 3 months ago
Seems like a regression of an opcache bug. You didn't provide phpinfo output, so we have no idea what versions you are running. Can you please provide that output?
The screenshot isn't immediately useful, but 8.2.19 came out quite awhile ago. What version of frankenphp are you running? Have you tried upgrading to the latest versions?
I used FROM dunglas/frankenphp:latest-php8.2-alpine
. I will look which version that is currently in my image.
dunglas/frankenphp:latest-php8.2-alpine
I want to update my site, but also want to keep the current version to see if this happens again. Therefore, I change the Docker image to 1.1.5-php8.2-alpine
. (I could have choosen 1.1.5-php8.2.19-alpine
too, because it is likely the same image.)
This is most likely a memory corruption issue and not a Frankenphp issue. Without more information and some way to reproduce this, I'm going to go ahead and close this. We're still here though.
Fair enough. I will look if I can find more information about it.
Okay, it happened again multiple times and it was a different function every time. I'm wondering how I can setup something for reproduction without my repository.
@withinboredom Do you have some commands I can run that give you some information about what is happening? Then we can likely know if this an PHP or an FrankenPHP bug.
This seems like a memory corruption issue, either by php, or an extension. It plagued certain versions of opcache + 8.1/8.2 zts builds. I haven't seen it with 8.3.
This is unlikely to be a frankenphp bug. I recommend updating frankenphp and potentially updating to php 8.3.
I changed dunglas/frankenphp:1.1.5-php8.2-alpine
to dunglas/frankenphp:1.1.5-php8.3-alpine
. I will see what that will do.
What happened?
I run a Docker container with Laravel and FrankenPHP in its Docker image. Everything works fine and the issue isn't there anymore when I kill the running container and spawn a new (identical) one.
After some time, something happens to the container, but I don't know exactly what. In Blade,
{{ $var }}
is converted to<?php e($var); ?>
when cached. This functione
is defined in thehelpers.php
file. On line 124 in this function, thehtmlspecialchars
is called with 4 parameters, according to the source code.However, this is not what happens in my container at some point. In the beginning, it just calls
htmlspecialchars
, but when the container is older, it somehow callsrmdir
orsession_set_cookie_params
, or another random function. The namehtmlspecialchars
isn't even seen in the logs. It looks like callinghtmlspecialchars()
is totally replaced withrmdir()
, even when the source code stays the same.Could this be a memory leak?
NOTE: The container runs in production.
Build Type
Docker (Alpine)
Worker Mode
Yes
Operating System
GNU/Linux
CPU Architecture
x86_64
PHP configuration
Relevant log output