Skip to content

php-cli queue:work segfaults (SIGSEGV) on SIGTERM/SIGINT graceful shutdown (v1.12.0-1.12.4) #2479

@abkrim

Description

@abkrim

What happens

A long-lived Laravel queue:work launched via frankenphp php-cli crashes with SIGSEGV (exit 139, core dumped) when it receives SIGTERM or SIGINT to shut down gracefully. The crash happens at signal-driven shutdown.

Voluntary exit is clean: Laravel's --max-time makes the worker exit 0 every cycle. Only signal-driven shutdown segfaults. This leaves any systemd-managed worker in failed (Result=core-dump) after systemctl stop.

Reproduction

Inside a Laravel app; the queue can be empty (no job in flight):

frankenphp php-cli artisan queue:work --sleep=3 --tries=3 &
P=$!; sleep 4; kill -TERM $P; wait $P; echo $?   # -> 139

Same result with kill -INT.

Versions tested (all segfault)

  • v1.12.0 (PHP 8.5.3)
  • v1.12.1 (PHP 8.5.3)
  • v1.12.4 (PHP 8.5.7, Caddy 2.11.4), static frankenphp-linux-x86_64 — still rc 139 on both TERM and INT

Environment

Can provide a core/backtrace if helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions