Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Bug]: SIGBUS core dumps in Laravel Horizon on Alpine ARM64 with PHP 8.5 and dd_writer_loop in backtrace

オープン
#3,975 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
静か
技術スタック
aws, docker, laravel, linux, php

調査の方向性

説明されている PHP CLI 環境でクラッシュを再現します。環境は、ARM64 上の Alpine Linux 3.23、PHP 8.5.6、Laravel Horizon または scheduler、および一覧にある Datadog 拡張機能です。まず core dump と GDB backtrace から始め、その後 coms.c:1168 のエントリーポイント dd_writer_loop を調査します。SIGBUS の原因を特定し、影響を受ける CLI プロセスで core dump が繰り返し生成されるのを防止できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

🐛 bug cat:app-crash
Bug report

We are seeing repeated native PHP crashes in a Laravel Horizon container when ddtrace and datadog-profiling are loaded.

The crashes generate large core.* files in the Laravel app working directory (/var/www). Each core dump is around 360–386 MB, and the container accumulated around 11 GB of core dumps before we noticed the issue.

This appears to affect PHP CLI processes used by Laravel Horizon and the scheduler, not the regular web container running the same Laravel application.

Environment

  • Runtime: Docker container running in AWS ECS
  • OS/base: Alpine Linux 3.23
  • Architecture: ARM aarch64
  • PHP binary: 8.5
  • Application: Laravel app
  • Queue worker: Laravel Horizon

PHP Version

PHP 8.5.6 (cli) (built: May 7 2026 16:54:58) (NTS)
Copyright (c) The PHP Group
Built by Alpine Linux aports
Zend Engine v4.5.6, Copyright (c) Zend Technologies
with Zend OPcache v8.5.6, Copyright (c), by Zend Technologies
with ddtrace v1.21.0, Copyright Datadog, by Datadog
with datadog-profiling v1.21.0, Copyright Datadog, by Datadog
with ddappsec v1.21.0, Copyright Datadog, by Datadog

After running gdb in one of the dump file, this is the output:

Reading symbols from /usr/bin/php85...
(No debugging symbols found in /usr/bin/php85)
warning: Can't open file /dev/shm/ddtl0-Rrui1dV7OsQ (deleted) during file-backed mapping note processing
warning: Can't open file /memfd:anon-handle (deleted) during file-backed mapping note processing
warning: Can't open file /dev/zero (deleted) during file-backed mapping note processing
warning: Can't open file /dev/shm/ddtl0-J25GpquRtnQ (deleted) during file-backed mapping note processing
[New LWP 8618]
[New LWP 8620]
[New LWP 8621]
[New LWP 8619]
Core was generated by `/usr/bin/php85 '' '' '' '' '' '' '' '' '' '' '' '' '' '''.
Program terminated with signal SIGBUS, Bus error.
#0 0x000000aaaabca2de in ?? ()
[Current thread is 1 (LWP 8618)]

Backtrace:

#0 0x000000aaaabca2de in ?? ()
#1 0x0000aaaabc9aca24 in execute_ex ()
#2 0x0000aaaabc9acc4c in zend_execute ()
#3 0x0000aaaabcacf828 in zend_execute_script ()
#4 0x0000aaaabc8e8ef8 in php_execute_script_ex ()
#5 0x0000aaaabcad21c4 in ?? ()
#6 0x0000aaaabcad0d90 in ?? ()
#7 0x0000ffffb8e96f9c in libc_start_main_stage2 (main=0xaaaabcad0b04, argc=15, argv=0xffffcc186158) at src/env/__libc_start_main.c:95
#8 0x0000000000000000 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread backtrace includes a Datadog writer thread:

(gdb) thread apply all bt
Thread 4 (LWP 8619):
#0 __syscall_cp_asm () at src/thread/aarch64/syscall_cp.s:28
#1 0x0000ffffb8ed848c in __syscall_cp_c (...) at src/thread/pthread_cancel.c:33
#2 0x0000ffffb8ed7618 in __futex4_cp (...) at src/thread/__timedwait.c:24
#3 __timedwait_cp (...) at src/thread/__timedwait.c:52
#4 0x0000ffffb8ed890c in __pthread_cond_timedwait (...) at src/thread/pthread_cond_timedwait.c:100
#5 0x0000ffffb4a5e160 in dd_writer_loop (_=) at /go/src/github.com/DataDog/apm-reliability/dd-trace-php/tmp/build_extension/tracer/coms.c:1168
#6 0x0000ffffb8ed946c in start (p=0xffff9f489b80) at src/thread/pthread_create.c:207
#7 0x0000ffffb8ed7864 in __clone () at src/thread/aarch64/clone.s:28

PHP version

8.5.6

Tracer or profiler version

1.21.0

Installed extensions

[PHP Modules]
apcu
bcmath
Core
ctype
curl
datadog-profiling
date
ddappsec
ddtrace
dom
fileinfo
filter
gd
hash
iconv
igbinary
intl
json
lexbor
libxml
mbstring
mongodb
msgpack
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_pgsql
pdo_sqlite
Phar
posix
random
readline
redis
Reflection
session
SimpleXML
soap
sockets
sodium
SPL
standard
tokenizer
uri
xml
xmlreader
xmlwriter
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache
datadog-profiling
ddappsec
ddtrace

Output of phpinfo()

No response

Upgrading from

No response

主要言語
PHP
スター
558
フォーク
190
平均マージ
2日 2時間
マージ済み PR(30日)
92

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

DataDog/dd-trace-php のほかの issue

DataDog/dd-trace-php の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。