Open toby-griffiths opened 1 week ago
It's just happened again now, and this is the output of lslocks
…
docker compose exec php lslocks
COMMAND PID TYPE SIZE MODE M START END PATH
frankenphp 1 FLOCK 16K WRITE 0 0 0 /data/mercure.db
(undefined) -1 OFDLCK READ 0 0 0
(undefined) -1 OFDLCK READ 0 0 0
frankenphp 1 POSIX READ 0 1 1 /memfd:opcache_lock (deleted)
frankenphp 1 FLOCK READ* 0 0 0 /app/var/cache/dev/App_KernelDevDebugContainer.php.lock
frankenphp 1 FLOCK WRITE 0 0 0 /app/var/cache/dev/App_KernelDevDebugContainer.php.lock
… in case it helps.
Should I perhaps move this issue to https://github.com/dunglas/frankenphp?
Same here In the meantime, I have rolled back the PHP version in the Dockerfile to 8.3.7
FrankenPHP issue: https://github.com/dunglas/frankenphp/issues/886
@aratinau are you using Blackfire?
I don't use blackfire But it's only after a project modification that there's a problem. If I down and up the project, everything works again and the modification is taken into account.
Thanks! Could you tell me the versions of FrankenPHP you use please (the one that works and the one that doesn't)?
Sure!
The version that works
FROM dunglas/frankenphp:1-php8.3.7 AS frankenphp_upstream
The version that doesn't work (but it was 8.3.8)
FROM dunglas/frankenphp:1-php8.3 AS frankenphp_upstream
Thanks. Could you check the exact version of FrankenPHP itself please? I'm trying to figure if it's a problem introduced by FrankenPHP or by PHP.
Ok
The version that works
FrankenPHP v1.2.0 PHP 8.3.7 Caddy v2.8.4 h1:q3pe0wpBj1OcHFZ3n/1nl4V4bxBrYoSoab7rL9BMYNk=
The version that doesn't work
FrankenPHP v1.2.1 PHP 8.3.8 Caddy v2.8.4 h1:q3pe0wpBj1OcHFZ3n/1nl4V4bxBrYoSoab7rL9BMYNk=
@dunglas I may be able to get Blackfire working to profile, if that helps? Although I see you've linked to https://github.com/docker/for-mac/issues/7004 in https://github.com/dunglas/frankenphp/issues/886, so is this still helpful?
@aratinau thanks! I can see what could cause the issue in 1.2.1 (https://github.com/dunglas/frankenphp/compare/v1.2.0...v1.2.1), so it's likely a PHP issue (https://github.com/php/php-src/compare/php-8.3.7...php-8.3.8).
Would you mind reporting the problem to PHP, please?
@toby-griffiths no, as it doesn't look related to Blackfire.
Could you try to not share the cache directory as a volume (to not use VirtioFS) to see if this works as a workaround?
This seems to be this PHP bug: https://github.com/php/php-src/issues/14592
@toby-griffiths no, as it doesn't look related to Blackfire.
Could you try to not share the cache directory as a volume (to not use VirtioFS) to see if this works as a workaround?
@dunglas I already have the following in my compose.override.yaml
file…
# …
services:
php:
# …
volumes:
- ./:/app
- /app/var
… and I'm still experiencing the issue.
Could someone does that please? https://github.com/php/php-src/issues/14592#issuecomment-2192553039
I don't manage to reproduce the issue (latest version of Docker for Mac, FrankenPHP, and PHP).
Could someone provide me with a minimal reproducer (a Git repo would be perfect)? Thanks.
@dunglas I might be able to next week, but looking at this comment it looks like the issue might be with Docker for Mac, or MacOS, perhaps?
To reproduce on a Mac:
docker exec -it symfony-docker-php-1 composer require api
docker exec -it symfony-docker-php-1 composer require --dev symfony/maker-bundle
docker exec -it symfony-docker-php-1 bin/console make:entity
ApiResource: yes
name: Address
new property: label
type: string
length: 255
nullable: yesdocker exec -it symfony-docker-php-1 bin/console doctrine:schema:update --force
#[ApiFilter(SearchFilter::class, properties: ["label" => "partial"])]
I'm using this Docker set up for a few of my projects and every now and then they just start locking up, and timing out.
I've done a little debugging and it looks like this this line in the
\Symfony\Component\HttpKernel\Kernel::initializeContainer()
method that's causing the problem…I can guess that this is used to prevent 2 processes attempting to update the container at the same time, but I don't know how to determine the cause of the lock not being released, and whether this is a Symfony issue, or a Docker (for Mac) issue.
Here's my Docker info…
… and my Docker compose config…
Could someone advise how I might diagnose the issue here?
Please let me know if you need more info.