Description
The crashtracker native module in @datadog/libdatadog@0.9.2 segfaults during binding.init() on ARM64 Alpine (musl libc). Since a segfault (SIGSEGV) is an OS signal, it cannot be caught by JavaScript try/catch, killing the entire Node.js process.
This was introduced in v0.9.0 by #100, which bumped the crashtracker to libdatadog v29 and changed crash unwinding from signal handler-based to ucontext-based.
Reproduction
# Setup QEMU if on x86
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
# Segfaults:
docker run --rm --platform linux/arm64 node:18-alpine sh -c "
npm install @datadog/libdatadog@0.9.2 2>/dev/null &&
node -e \"
const lib = require('@datadog/libdatadog');
const ct = lib.load('crashtracker');
ct.init(
{ additional_files: [], create_alt_stack: true, use_alt_stack: true,
endpoint: { url: { scheme: 'http', authority: 'localhost:8126', path_and_query: '' }, timeout_ms: 3000 },
timeout: { secs: 5, nanos: 0 }, demangle_names: true, signals: [],
resolve_frames: 'EnabledWithSymbolsInReceiver' },
{ args: [], env: [], path_to_receiver_binary: lib.find('crashtracker-receiver', true),
stderr_filename: null, stdout_filename: null },
{ library_name: 'test', library_version: '1.0', family: 'nodejs', tags: [] }
);
console.log('OK');
\"
"
# Output: Segmentation fault (core dumped)
Affected platforms
| Platform |
libc |
v0.9.2 crashtracker |
v0.8.1 crashtracker |
| x64 |
glibc |
✅ OK |
✅ OK |
| x64 |
musl (Alpine) |
✅ OK |
✅ OK |
| ARM64 |
glibc (Debian) |
✅ OK |
✅ OK |
| ARM64 |
musl (Alpine) |
💥 SEGFAULT |
✅ OK |
Impact
This causes SSI (Single Step Instrumentation) auto-inject tests to fail on ARM64 Alpine — the Node.js app is killed during dd-trace initialization before it can start listening.
Workaround
In dd-trace-js, we are guarding against this by skipping crashtracker loading on ARM64 musl:
Description
The crashtracker native module in
@datadog/libdatadog@0.9.2segfaults duringbinding.init()on ARM64 Alpine (musl libc). Since a segfault (SIGSEGV) is an OS signal, it cannot be caught by JavaScript try/catch, killing the entire Node.js process.This was introduced in v0.9.0 by #100, which bumped the crashtracker to libdatadog v29 and changed crash unwinding from signal handler-based to ucontext-based.
Reproduction
Affected platforms
Impact
This causes SSI (Single Step Instrumentation) auto-inject tests to fail on ARM64 Alpine — the Node.js app is killed during dd-trace initialization before it can start listening.
Workaround
In
dd-trace-js, we are guarding against this by skipping crashtracker loading on ARM64 musl: