[crashtracker] Improve crashtracker message#8182
Conversation
79adda6 to
8f97ee8
Compare
BenchmarksBenchmark execution time: 2026-02-19 16:39:02 Comparing candidate commit f318749 in PR branch Found 7 performance improvements and 13 performance regressions! Performance is the same for 156 metrics, 16 unstable metrics. scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody netcoreapp3.1
scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody netcoreapp3.1
scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody net472
scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs netcoreapp3.1
scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net6.0
scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472
scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1
scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net472
scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net6.0
scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net6.0
scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net6.0
scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net472
scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark netcoreapp3.1
scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net6.0
scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog netcoreapp3.1
scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net6.0
scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore netcoreapp3.1
|
02ee11d to
fbe0535
Compare
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8182) and master. ✅ No regressions detected - check the details below Full Metrics ComparisonFakeDbCommand
HttpMessageHandler
Comparison explanationExecution-time benchmarks measure the whole time it takes to execute a program, and are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are highlighted in **red**. The following thresholds were used for comparing the execution times:
Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard. Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph). Duration chartsFakeDbCommand (.NET Framework 4.8)gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8182) - mean (69ms) : 67, 72
master - mean (69ms) : 67, 71
section Bailout
This PR (8182) - mean (73ms) : 71, 75
master - mean (73ms) : 71, 75
section CallTarget+Inlining+NGEN
This PR (8182) - mean (1,038ms) : 998, 1079
master - mean (1,048ms) : 976, 1119
FakeDbCommand (.NET Core 3.1)gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8182) - mean (116ms) : 114, 118
master - mean (115ms) : 112, 119
section Bailout
This PR (8182) - mean (117ms) : 115, 118
master - mean (116ms) : 115, 118
section CallTarget+Inlining+NGEN
This PR (8182) - mean (775ms) : 711, 839
master - mean (781ms) : 741, 820
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8182) - mean (102ms) : 99, 105
master - mean (102ms) : 99, 104
section Bailout
This PR (8182) - mean (104ms) : 102, 105
master - mean (103ms) : 101, 104
section CallTarget+Inlining+NGEN
This PR (8182) - mean (765ms) : 744, 786
master - mean (759ms) : 738, 781
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8182) - mean (94ms) : 91, 97
master - mean (93ms) : 91, 96
section Bailout
This PR (8182) - mean (95ms) : 93, 97
master - mean (95ms) : 93, 96
section CallTarget+Inlining+NGEN
This PR (8182) - mean (637ms) : 620, 654
master - mean (634ms) : 622, 647
HttpMessageHandler (.NET Framework 4.8)gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8182) - mean (193ms) : 188, 197
master - mean (191ms) : 188, 195
section Bailout
This PR (8182) - mean (196ms) : 192, 199
master - mean (195ms) : 192, 198
section CallTarget+Inlining+NGEN
This PR (8182) - mean (1,147ms) : 1092, 1203
master - mean (1,135ms) : 1093, 1177
HttpMessageHandler (.NET Core 3.1)gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8182) - mean (287ms) : 282, 293
master - mean (287ms) : 282, 293
section Bailout
This PR (8182) - mean (290ms) : 286, 294
master - mean (288ms) : 282, 293
section CallTarget+Inlining+NGEN
This PR (8182) - mean (968ms) : 918, 1017
master - mean (963ms) : 914, 1013
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8182) - mean (269ms) : 263, 274
master - mean (269ms) : 265, 273
section Bailout
This PR (8182) - mean (268ms) : 265, 272
master - mean (269ms) : 264, 275
section CallTarget+Inlining+NGEN
This PR (8182) - mean (920ms) : 883, 956
master - mean (924ms) : 896, 951
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8182) - mean (278ms) : 272, 284
master - mean (279ms) : 272, 286
section Bailout
This PR (8182) - mean (278ms) : 273, 282
master - mean (279ms) : 275, 282
section CallTarget+Inlining+NGEN
This PR (8182) - mean (859ms) : 841, 877
master - mean (857ms) : 837, 877
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3474da7 to
6f2798e
Compare
| std::pair<ddog_crasht_SignalNames, ddog_crasht_SiCodes> GetSignalInfo(int32_t signal, int32_t code) | ||
| { | ||
| // Linux signal numbers -> ddog_crasht_SignalNames (see man 7 signal, CreatedumpCommand.cs GetSignalInfo) | ||
| ddog_crasht_SignalNames signo = DDOG_CRASHT_SIGNAL_NAMES_UNKNOWN; |
There was a problem hiding this comment.
As I understand it, these signal codes are can be different on different platforms? 😅 https://man7.org/linux/man-pages/man7/signal.7.html#:~:text=Signal%20numbering%20for%20standard%20signals
We're mostly OK, but IIRC, mac is different for one of them too? 😅 Don't know if it's an issue or not for us here 🤷♂️
There was a problem hiding this comment.
yeah, crashtracker (nor the profiler) does not work on mac as far as I know (libunwind is unsuable + not sure there a remote unwinding mac version)
But yeah for now we are safe.
And yes, it's PITA the signal codes
| signal = signalValue; | ||
| } | ||
|
|
||
| if (parsedArguments.TryGetValue("--code", out var rawCode) && int.TryParse(rawCode, out var signalCodeValue)) |
There was a problem hiding this comment.
Do we need to validate that the signalCodeValue is actually a valid int? I assume it doesn't really matter, as this is just informational?
There was a problem hiding this comment.
in that case, it's mainly informational
| /// Maps a Windows native exception code (from EXCEPTION_RECORD.ExceptionCode / WER) to a human-readable name. | ||
| /// </summary> | ||
| private static string GetExceptionFromNativeCode(uint code) => | ||
| WindowsExceptionCodeNames.TryGetValue(code, out var name) ? name : "Unknown"; |
There was a problem hiding this comment.
Any reason not to use the switch expression pattern like you did below? Dictionary allocation seems uneccessary given you only seem to call this here, once?
There was a problem hiding this comment.
oh good catch, I forgot to update this
| 29 => "SIGIO", | ||
| 30 => "SIGPWR", | ||
| 31 => "SIGSYS", | ||
| _ => $"signal {signal}" |
There was a problem hiding this comment.
| _ => $"signal {signal}" | |
| _ => FormattableString.Invariant($"signal {signal}"), |
| } | ||
|
|
||
| private bool SetSignal(ICrashReport crashReport, int signal) | ||
| private unsafe bool SetSignal(ICrashReport crashReport, int signal, int? signalCode) |
There was a problem hiding this comment.
Surely this isn't unsafe due to your changes?? 🤔
| private unsafe bool SetSignal(ICrashReport crashReport, int signal, int? signalCode) | |
| private bool SetSignal(ICrashReport crashReport, int signal, int? signalCode) |
6d6666d to
f318749
Compare
Summary of changes
Improve crash reports message.
Reason for change
Today, error message in crash report is handled by the backend: it uses the exception type and message from

metadatato build the message.But in case of a native crash (mainly windows), we do not have much information:


On linux, we do not propagate the the signal code:
The goal of this PR is to collect meaningful information at crash time to generate a (as much as we can) useful error message:
Implementation details
createdumpusing--dd-native-exception-codecommand-line argument--codecommand-line argumentTest coverage
Updating the tests.
Other details