fix(crashtracking): resolve frames out-of-process on Linux#9237
Conversation
The Linux/non-Linux resolve mode selection compared `os.platform`, the function reference, against the string 'linux'. That comparison is always false, so Linux always fell through to 'EnabledWithInprocessSymbols' instead of the intended 'EnabledWithSymbolsInReceiver'. Out-of-process symbolication is the only supported path on Linux (per the adjacent comment and the crashtracking team's original guidance), so in-process symbolication during a live crash could leave the crash report unwritten. Call `platform()` so the real platform is evaluated. Add a unit test asserting resolve_frames matches the running platform, which fails against the old code on Linux.
Overall package sizeSelf size: 6.6 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.3.1 | 122.62 kB | 437.94 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
🎉 All green!🧪 All tests passed 🔗 Commit SHA: f664043 | Docs | Datadog PR Page | Give us feedback! |
BenchmarksBenchmark execution time: 2026-07-07 17:35:59 Comparing candidate commit f664043 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 2259 metrics, 27 unstable metrics.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9237 +/- ##
=======================================
Coverage 96.52% 96.52%
=======================================
Files 905 905
Lines 119282 119282
Branches 20576 20558 -18
=======================================
+ Hits 115132 115136 +4
+ Misses 4150 4146 -4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The Linux/non-Linux resolve mode selection compared `os.platform`, the function reference, against the string 'linux'. That comparison is always false, so Linux always fell through to 'EnabledWithInprocessSymbols' instead of the intended 'EnabledWithSymbolsInReceiver'. Out-of-process symbolication is the only supported path on Linux (per the adjacent comment and the crashtracking team's original guidance), so in-process symbolication during a live crash could leave the crash report unwritten. Call `platform()` so the real platform is evaluated. Add a unit test asserting resolve_frames matches the running platform, which fails against the old code on Linux.
The Linux/non-Linux resolve mode selection compared `os.platform`, the function reference, against the string 'linux'. That comparison is always false, so Linux always fell through to 'EnabledWithInprocessSymbols' instead of the intended 'EnabledWithSymbolsInReceiver'. Out-of-process symbolication is the only supported path on Linux (per the adjacent comment and the crashtracking team's original guidance), so in-process symbolication during a live crash could leave the crash report unwritten. Call `platform()` so the real platform is evaluated. Add a unit test asserting resolve_frames matches the running platform, which fails against the old code on Linux.
The Linux/non-Linux resolve mode selection compared `os.platform`, the function reference, against the string 'linux'. That comparison is always false, so Linux always fell through to 'EnabledWithInprocessSymbols' instead of the intended 'EnabledWithSymbolsInReceiver'. Out-of-process symbolication is the only supported path on Linux (per the adjacent comment and the crashtracking team's original guidance), so in-process symbolication during a live crash could leave the crash report unwritten. Call `platform()` so the real platform is evaluated. Add a unit test asserting resolve_frames matches the running platform, which fails against the old code on Linux.
The Linux/non-Linux resolve mode selection compared `os.platform`, the function reference, against the string 'linux'. That comparison is always false, so Linux always fell through to 'EnabledWithInprocessSymbols' instead of the intended 'EnabledWithSymbolsInReceiver'. Out-of-process symbolication is the only supported path on Linux (per the adjacent comment and the crashtracking team's original guidance), so in-process symbolication during a live crash could leave the crash report unwritten. Call `platform()` so the real platform is evaluated. Add a unit test asserting resolve_frames matches the running platform, which fails against the old code on Linux.
What does this PR do?
Fixes crash-report symbolication mode selection on Linux. The resolve
mode was chosen with
require('os').platform === 'linux'— comparing theplatformfunction reference to a string, which is alwaysfalse.As a result Linux always used
EnabledWithInprocessSymbolsinstead ofthe intended
EnabledWithSymbolsInReceiver(out-of-process symbolication,which the adjacent comment notes is the only supported path on Linux).
The fix imports
platformfromnode:osand callsplatform() === 'linux'.A unit test now asserts
resolve_framesmatches the running platform, sothe regression is caught on Linux CI.
Motivation
Correctness fix found while investigating flaky SSI crashtracking system
tests. On Linux, crash reports should be symbolicated out-of-process by
the receiver; the buggy comparison silently forced in-process
symbolication instead. Latent since #7525 (2026-02-23).
Additional Notes
fix the flaky
test_docker_ssi_crash…test_crash[js-app]/test_telemetry[js-app]/test_install_supported_runtime[js-app]system tests. Investigation showed those failures are clustered at the
pipeline level — an entire
DOCKER_SSIstage intermittently reports nodata to the test-agent across all Node versions and both arches, and the
same pipelines also fail an asm-js-owned test. That is a scenario/CI
infrastructure flake, not a dd-trace-js code defect, and is tracked
separately.
a report exists), so this bug affects symbol quality on Linux, not
whether a report is generated.
mocha crashtracker.spec.js-> 16 passing; the new test failsagainst the old code on Linux. End-to-end Linux/Docker crash
symbolication was not exercised locally.