Skip to content

v5.0.0-beta3 FrankenPHP crashes on HTTP/2 when PHP keeps running after fastcgi_finish_request() #712

Closed

Description

@jaydrogers

Steps To Reproduce

This only affects v5.0.0-beta3. The same steps on v5.0.0-beta2 work fine.

  1. Create a test app with a script that finishes the request and then keeps running:

    mkdir -p fp-repro/public
    printf '<?php echo "ok";\nfastcgi_finish_request();\nusleep(10000);\n' > fp-repro/public/index.php
  2. Start the beta3 image with HTTPS enabled:

    docker run -d --name fp-beta3 -e SSL_MODE=full \
      -v "$PWD/fp-repro:/var/www/html" \
      serversideup/php:8.4-frankenphp-v5.0.0-beta3
  3. Wait a few seconds for it to boot, then send one HTTP/2 request:

    docker exec fp-beta3 curl -sk --http2 https://localhost:8443/
  4. Check the container:

    docker inspect -f '{{.State.Status}} exit={{.State.ExitCode}}' fp-beta3
    docker logs fp-beta3 2>&1 | tail -3

To compare, repeat steps 2 to 4 with serversideup/php:8.4-frankenphp-v5.0.0-beta2, or send the request with --http1.1 instead of --http2.

Outcome

On beta3, curl gets a 200, then the container exits with code 2:

exited exit=2
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xc5580e]

Results for the script above:

Image FrankenPHP HTTP/1.1 HTTP/2
8.4-frankenphp-v5.0.0-beta2 v2.11.4 OK OK
8.4-frankenphp-v5.0.0-beta3 v2.11.6 OK crash

It reproduced 3 out of 3 times. Calling frankenphp_finish_request() instead of fastcgi_finish_request() crashes the same way. If the script ends right after the finish call (no usleep), it doesn't crash.

This takes down every Laravel app on beta3 behind HTTP/2. Symfony's Response::send() calls fastcgi_finish_request() and Laravel keeps running terminate callbacks afterward, so every request crashes the container. That includes Traefik proxying to port 8443 over HTTPS (Traefik uses HTTP/2 to the backend) and Caddy serving browsers directly in SSL_MODE=full.

Expected: the response finishes and the worker keeps serving requests, as on beta2.

Affected Docker Images

  • serversideup/php:8.4-frankenphp-v5.0.0-beta3 (sha256:e0431a3c04cd0f7142eeb3f380b31aa5ba1e11f0b7c79b481a9e64261f193cae)
  • serversideup/php:beta-8.4-frankenphp, which points at beta3 as of 2026-10-01

Not affected: serversideup/php:8.4-frankenphp-v5.0.0-beta2 (sha256:e224c74882a97560f6a0c73f47eb4f2d25a7d0251cedc264b56fb00bef43e2ba)

Anything else?

  • Docker 29.8.2, linux/amd64.
  • The FrankenPHP bump from v2.11.4 to v2.11.6 is the likely cause, so this may need a report or fix upstream in FrankenPHP.
  • Workaround: pin serversideup/php:8.4-frankenphp-v5.0.0-beta2.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions