Skip to content

Segmentation fault when building Symfony cache on Alpine #12234

Closed
@dunglas

Description

@dunglas

Description

When building the Symfony cache using FrankenPHP and PHP ZTS provided by the official Alpine PHP image, a segmentation fault occurs on this line: https://github.com/symfony/symfony/blob/517128f8795d28990134010259585c6d623d087f/src/Symfony/Component/ErrorHandler/DebugClassLoader.php#L296

Symfony basically includes a lot of files to build the Dependency Injection Container cache, but this always fails on the same class/file:

<?php

include '/app/vendor/composer/../symfony/framework-bundle/DependencyInjection/Configuration.php';

The issue occurs with Alpine but not with the Debian image. It happens even if opcache is disabled or not installed.

Quick reproducer:

composer create-project symfony/skeleton reproducer
cd reproducer
docker run -p 80:80 -p 443:443 -v $PWD:/app dunglas/frankenphp:latest-alpine

PHP Version

PHP 8.2.10 ZTS

Operating System

Alpine Linux 3.18

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions