Skip to content

[Bug]: PHP-FPM SIGABRT with SSI and AppSec enabled since 1.25.x #4192

Description

@Yacine58

Bug report

Summary

When Datadog PHP automatic instrumentation (Single Step Instrumentation / SSI) uses PHP tracer 1.25.x with AppSec enabled, PHP-FPM worker processes may abort with SIGABRT during startup or runtime. The Kubernetes pod and ArgoCD application can nevertheless remain Healthy/Running because the PHP-FPM master process remains alive and replaces the failed workers.

Disabling AppSec resolves the crash while PHP APM traces continue to be emitted.

Impact

The Kubernetes workload remains available and ArgoCD reports it as Healthy/Running. However, PHP-FPM worker processes may abort with SIGABRT, which can cause worker restarts, excessive logs, incomplete APM telemetry, and potentially intermittent request failures.

Environment

  • Kubernetes (AWS EKS)
  • Datadog Operator / DatadogAgent v2alpha1
  • Automatic instrumentation: SSI / Admission Controller
  • PHP runtime: PHP-FPM, PHP 8.5.9 NTS
  • Zend OPcache: enabled
  • Datadog Agent versions tested: 7.81.2 and 7.83.1
  • PHP tracer affected: 1.25.x
  • Datadog site: datadoghq.eu

Actual behavior

When Datadog PHP automatic instrumentation (Single Step Instrumentation / SSI) uses PHP tracer 1.25.x with AppSec enabled, PHP-FPM worker processes may abort with SIGABRT during startup or runtime. The Kubernetes pod and ArgoCD application can nevertheless remain Healthy/Running because the PHP-FPM master process remains alive and replaces the failed workers.
Observed error:

mutex.cc : RAW: Check w->waitp->cond == nullptr failed:
Mutex::Fer while waiting on Condition

The PHP-FPM process terminates with SIGABRT.

Expected behavior

PHP-FPM pods should start normally when PHP APM and AppSec are both enabled through SSI.

Investigation

The crash was reproduced with Datadog Agent 7.81.2 and 7.83.1, so it does not appear tied to the Agent version.
PHP tracer 1.24.2 was stable in the same environment.
The issue occurs with the PHP tracer 1.25.x line when AppSec is enabled.
PHP-FPM uses a master process that forks workers. We suspect an interaction between this fork model and the sidecar/AppSec communication changes introduced in tracer 1.25.0.

Confirmed workaround

The crash no longer occurs with PHP tracer 1.25.1 when AppSec is disabled through SSI:

With this configuration:

PHP-FPM pods start normally.
PHP APM traces are still produced.
AppSec is disabled for the affected PHP workloads.

Questions

Is this a known regression involving PHP tracer 1.25.x, AppSec, and PHP-FPM?
Is the Mutex::Fer while waiting on Condition SIGABRT related to sidecar/AppSec implementation or fork handling?
Is DD_APPSEC_ENABLED=false the recommended workaround?
Is there a more targeted workaround that preserves AppSec?
Is there a planned fix or version in which AppSec can safely be re-enabled for PHP-FPM?
We can provide sanitized crash logs and DatadogAgent SSI configuration through our existing Datadog Support ticket. ``````

PHP version

8.5.9 NTS

Tracer or profiler version

1.25.1

Installed extensions

dd_library_loader 1.25.1
ddtrace 1.25.1
ddappsec 1.25.1
datadog-profiling 1.25.1
Zend OPcache 8.5.9

Output of phpinfo()

No response

Upgrading from

No response

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

    🐛 bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions