Skip to content

[Profiler] Fix alpine deadlock 2#8021

Merged
gleocadie merged 4 commits intomasterfrom
gleocadie/fix-alpine-deadlock-2
Jan 7, 2026
Merged

[Profiler] Fix alpine deadlock 2#8021
gleocadie merged 4 commits intomasterfrom
gleocadie/fix-alpine-deadlock-2

Conversation

@gleocadie
Copy link
Collaborator

@gleocadie gleocadie commented Dec 30, 2025

Summary of changes

Prevent calling into dl_iterate_phdr while unwinding.

Reason for change

libunwind calls dl_iterate_phdr to get unwinding information for each library. Calling into dl_iterate_phdr while unwinding may lead to dead lock.

#0  __syscall_cp_c (nr=202, u=125628101208320, v=128, w=-1, x=0, y=0, z=0) at ./arch/x86_64/syscall_arch.h:61
#1  0x0000724212545c3b in __futex4_cp (to=0x0, val=-1, op=128, addr=0x72421258a900 <lock>) at src/thread/__timedwait.c:24
#2  __timedwait_cp (addr=addr@entry=0x72421258a900 <lock>, val=val@entry=-1, clk=clk@entry=0, at=at@entry=0x0, priv=priv@entry=128) at src/thread/__timedwait.c:52
#3  0x0000724212545ce0 in __timedwait (addr=addr@entry=0x72421258a900 <lock>, val=-1, clk=clk@entry=0, at=at@entry=0x0, priv=128) at src/thread/__timedwait.c:68
#4  0x000072421254849e in __pthread_rwlock_timedrdlock (at=<optimized out>, rw=<optimized out>) at src/thread/pthread_rwlock_timedrdlock.c:18
#5  __pthread_rwlock_timedrdlock (rw=rw@entry=0x72421258a900 <lock>, at=at@entry=0x0) at src/thread/pthread_rwlock_timedrdlock.c:3
#6  0x0000724212548427 in __pthread_rwlock_rdlock (rw=rw@entry=0x72421258a900 <lock>) at src/thread/pthread_rwlock_rdlock.c:5
--Type <RET> for more, q to quit, c to continue without paging--
#7  0x00007242125507ab in dl_iterate_phdr (callback=0x724191d60b00 <_ULx86_64_dwarf_callback>, data=0x7200f66ba220) at ldso/dynlink.c:2362
#8  0x00007242124e6724 in dl_iterate_phdr (callback=0x724191d60b00 <_ULx86_64_dwarf_callback>, data=0x7200f66ba220) at /project/profiler/src/ProfilerEngine/Datadog.Linux.ApiWrapper/functions_to_wrap.c:383
#9  0x0000724191d61212 in _ULx86_64_dwarf_find_proc_info (as=0x724191edf760 <local_addr_space>, ip=ip@entry=125628100813076, pi=pi@entry=0x7200f66bad88, need_unwind_info=need_unwind_info@entry=1, arg=0x7200f66ba881) at /project/obj/libunwind-prefix/src/libunwind/src/dwarf/Gfind_proc_info-lsb.c:807
#10 0x0000724191d5cb27 in fetch_proc_info (c=0x7200f66bac30, ip=125628100813076) at /project/obj/libunwind-prefix/src/libunwind/src/dwarf/Gparser.c:473
#11 0x0000724191d5e1ea in find_reg_state (sr=0x7200f66ba4c0, c=0x7200f66bac30) at /project/obj/libunwind-prefix/src/libunwind/src/dwarf/Gparser.c:1024
#12 _ULx86_64_dwarf_step (c=c@entry=0x7200f66bac30) at /project/obj/libunwind-prefix/src/libunwind/src/dwarf/Gparser.c:1069
#13 0x0000724191d5b7d7 in _ULx86_64_step (cursor=cursor@entry=0x7200f66bac30) at /project/obj/libunwind-prefix/src/libunwind/src/x86_64/Gstep.c:75
#14 0x0000724191d5c58a in trace_init_addr (rsp=<optimized out>, rbp=<optimized out>, rip=<optimized out>, cfa=<optimized out>, cursor=0x7200f66bac30, f=0x7200f650dde0) at /project/obj/libunwind-prefix/src/libunwind/src/x86_64/Gtrace.c:249
#15 trace_lookup (rsp=<optimized out>, rbp=<optimized out>, rip=<optimized out>, cfa=<optimized out>, cache=0x724191169f40, cursor=0x7200f66bac30) at /project/obj/libunwind-prefix/src/libunwind/src/x86_64/Gtrace.c:331
#16 _ULx86_64_tdep_trace (cursor=cursor@entry=0x7200f66bac30, buffer=buffer@entry=0x724191f2a4c0, size=size@entry=0x7200f66ba86c) at /project/obj/libunwind-prefix/src/libunwind/src/x86_64/Gtrace.c:449
#17 0x0000724191d5ab29 in unw_backtrace2 (buffer=0x724191f2a4c0, size=1024, uc2=0x7200f66bb540, flag=1) at /project/obj/libunwind-prefix/src/libunwind/src/mi/backtrace.c:111
#18 0x0000724191caecf6 in TimerCreateCpuProfiler::Collect (this=0x724191f99dd0, ctx=0x7200f66bb540) at /project/profiler/src/ProfilerEngine/Datadog.Profiler.Native.Linux/TimerCreateCpuProfiler.cpp:257
#19 0x0000724191cab041 in ProfilerSignalManager::CallCustomHandler (this=0x724191ed2810 <ProfilerSignalManager::Get(int)::signalManagers+5616>, signal=27, info=0x7200f66bb670, context=0x7200f66bb540) at /project/profiler/src/ProfilerEngine/Datadog.Profiler.Native.Linux/ProfilerSignalManager.cpp:208
#20 ProfilerSignalManager::SignalHandler (signal=27, info=0x7200f66bb670, context=0x7200f66bb540) at /project/profiler/src/ProfilerEngine/Datadog.Profiler.Native.Linux/ProfilerSignalManager.cpp:199
#21 <signal handler called>
#22 0x000072421252a114 in __mmap (start=start@entry=0x0, len=len@entry=16384, prot=prot@entry=3, flags=flags@entry=34, fd=fd@entry=-1, off=off@entry=0) at src/mman/mmap.c:17
#23 0x000072421251845c in alloc_group (req=<optimized out>, sc=25) at src/malloc/mallocng/malloc.c:249
#24 alloc_slot (sc=sc@entry=25, req=req@entry=2496) at src/malloc/mallocng/malloc.c:291
#25 0x0000724212518783 in __libc_malloc_impl (n=2496) at src/malloc/mallocng/malloc.c:369
#26 0x0000724212355c2c in operator new(unsigned long) () from /usr/lib/libstdc++.so.6

At frame #26, the thread took the malloc lock. The profiler interrupted the thread (frame #21). The libunwind calls dl_iterate_phdr (#8) but the thread is blocked trying to acquire a lock. This lock is hold by another thread which called dlopen but got block while calling into malloc.

The LibrariesInfoCache was designed to prevent that situation but it actually failed.
When starting the profiler LibrariesInfoCache instance registers a custom dl_iterate_phdr to libunwind. This function should be called instead of the one from the C runtime. Why it's not called though ?
Libunwind is designed for remote and local unwinding. All libunwind symbols will have a prefix: _<remote or local><arch>_<symbol_name>
Local: _ULx86_64_xxxxxx
Remote: _U86_64_xxxxxxx

If we include libunwind.h, by default, the compilation unit will use the remote symbol(s). So when we register our custom dl_iterate_phdr, we registered our function to the remote symbol specifying the function libunwind must call.
When we call unw_backtrace2, by default, it use the local symbol, but since this symbol does not have a pointer to our custom implementation, it will call the default one (C Runtime dl_iterate_phdr).

To avoid that, we have to add #define UNW_LOCAL_ONLY before #include <libunwind.h>. This will make sure we use the local symbol(s) instead.

Implementation details

  • Add #define UNW_LOCAL_ONLY before including libunwind.h.

Test coverage

  • Add test to check that C runtime dl_iterate_phdr is not called
  • Add test to check that the LibrariesInfoCache serves the same info as dl_iterate_phdr

Other details

@gleocadie gleocadie force-pushed the gleocadie/fix-alpine-deadlock-2 branch from cf94f93 to 66dbc18 Compare December 30, 2025 13:09
@github-actions github-actions bot added the area:profiler Issues related to the continous-profiler label Dec 30, 2025
@dd-trace-dotnet-ci-bot
Copy link

dd-trace-dotnet-ci-bot bot commented Dec 30, 2025

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8021) and master.

✅ No regressions detected - check the details below

Full Metrics Comparison

FakeDbCommand

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration68.28 ± (68.29 - 68.50) ms69.36 ± (69.49 - 69.82) ms+1.6%✅⬆️
.NET Framework 4.8 - Bailout
duration71.99 ± (71.89 - 72.11) ms72.91 ± (72.85 - 73.15) ms+1.3%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1003.84 ± (1004.86 - 1010.51) ms1015.00 ± (1016.35 - 1023.56) ms+1.1%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms21.98 ± (21.94 - 22.01) ms22.29 ± (22.25 - 22.33) ms+1.4%✅⬆️
process.time_to_main_ms78.73 ± (78.59 - 78.86) ms82.73 ± (82.47 - 82.98) ms+5.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.91 ± (10.91 - 10.92) MB10.93 ± (10.92 - 10.93) MB+0.1%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms21.96 ± (21.94 - 21.98) ms22.17 ± (22.14 - 22.19) ms+0.9%✅⬆️
process.time_to_main_ms79.88 ± (79.77 - 79.98) ms82.30 ± (82.11 - 82.50) ms+3.0%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.95 ± (10.94 - 10.95) MB10.95 ± (10.95 - 10.96) MB+0.1%✅⬆️
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms233.06 ± (228.71 - 237.41) ms225.54 ± (221.67 - 229.41) ms-3.2%
process.time_to_main_ms471.10 ± (470.60 - 471.59) ms480.35 ± (479.57 - 481.14) ms+2.0%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.19 ± (48.17 - 48.21) MB48.22 ± (48.20 - 48.24) MB+0.1%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.0%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms20.63 ± (20.61 - 20.66) ms20.93 ± (20.90 - 20.97) ms+1.5%✅⬆️
process.time_to_main_ms67.93 ± (67.80 - 68.06) ms70.80 ± (70.58 - 71.02) ms+4.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.62 ± (10.61 - 10.62) MB10.64 ± (10.63 - 10.64) MB+0.2%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms20.53 ± (20.51 - 20.55) ms20.83 ± (20.81 - 20.85) ms+1.5%✅⬆️
process.time_to_main_ms68.89 ± (68.83 - 68.96) ms71.69 ± (71.54 - 71.84) ms+4.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.71 ± (10.70 - 10.72) MB10.73 ± (10.73 - 10.74) MB+0.2%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms247.40 ± (245.65 - 249.16) ms243.55 ± (240.65 - 246.45) ms-1.6%
process.time_to_main_ms441.81 ± (441.35 - 442.26) ms444.92 ± (444.20 - 445.64) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed48.71 ± (48.67 - 48.74) MB48.58 ± (48.55 - 48.61) MB-0.3%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)-0.0%
.NET 8 - Baseline
process.internal_duration_ms18.81 ± (18.79 - 18.84) ms18.98 ± (18.95 - 19.00) ms+0.9%✅⬆️
process.time_to_main_ms67.03 ± (66.91 - 67.15) ms68.50 ± (68.37 - 68.62) ms+2.2%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.68 ± (7.67 - 7.69) MB7.66 ± (7.65 - 7.66) MB-0.3%
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms18.80 ± (18.78 - 18.83) ms19.07 ± (19.04 - 19.09) ms+1.4%✅⬆️
process.time_to_main_ms67.95 ± (67.90 - 68.01) ms69.64 ± (69.56 - 69.72) ms+2.5%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.73 ± (7.72 - 7.74) MB7.73 ± (7.72 - 7.75) MB+0.0%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms178.04 ± (177.08 - 179.01) ms181.19 ± (180.11 - 182.26) ms+1.8%✅⬆️
process.time_to_main_ms426.52 ± (425.87 - 427.16) ms429.13 ± (428.50 - 429.77) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed36.30 ± (36.27 - 36.32) MB36.33 ± (36.30 - 36.37) MB+0.1%✅⬆️
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)+0.1%✅⬆️

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration192.80 ± (193.00 - 193.91) ms194.15 ± (194.11 - 194.93) ms+0.7%✅⬆️
.NET Framework 4.8 - Bailout
duration196.55 ± (196.49 - 197.00) ms197.20 ± (197.12 - 197.69) ms+0.3%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1107.89 ± (1108.72 - 1115.98) ms1118.88 ± (1120.33 - 1128.91) ms+1.0%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms187.49 ± (187.10 - 187.87) ms188.39 ± (188.04 - 188.73) ms+0.5%✅⬆️
process.time_to_main_ms80.44 ± (80.27 - 80.62) ms81.14 ± (80.92 - 81.36) ms+0.9%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.08 ± (16.05 - 16.10) MB16.17 ± (16.13 - 16.20) MB+0.5%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)-0.4%
.NET Core 3.1 - Bailout
process.internal_duration_ms187.02 ± (186.66 - 187.38) ms188.36 ± (187.95 - 188.76) ms+0.7%✅⬆️
process.time_to_main_ms81.74 ± (81.58 - 81.90) ms82.27 ± (82.14 - 82.41) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.12 ± (16.09 - 16.14) MB16.19 ± (16.16 - 16.22) MB+0.4%✅⬆️
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (21 - 21)+0.0%✅⬆️
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms416.42 ± (413.10 - 419.73) ms421.82 ± (418.62 - 425.01) ms+1.3%✅⬆️
process.time_to_main_ms472.26 ± (471.66 - 472.86) ms475.56 ± (475.03 - 476.10) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed58.84 ± (58.73 - 58.94) MB58.69 ± (58.58 - 58.80) MB-0.3%
runtime.dotnet.threads.count29 ± (29 - 30)29 ± (29 - 29)-0.1%
.NET 6 - Baseline
process.internal_duration_ms191.63 ± (191.31 - 191.95) ms193.98 ± (193.58 - 194.37) ms+1.2%✅⬆️
process.time_to_main_ms69.75 ± (69.59 - 69.90) ms70.35 ± (70.18 - 70.52) ms+0.9%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.18 ± (16.05 - 16.30) MB16.20 ± (16.09 - 16.31) MB+0.1%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.4%✅⬆️
.NET 6 - Bailout
process.internal_duration_ms191.53 ± (191.16 - 191.89) ms191.83 ± (191.37 - 192.29) ms+0.2%✅⬆️
process.time_to_main_ms70.87 ± (70.76 - 70.98) ms71.10 ± (70.98 - 71.21) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.24 ± (16.11 - 16.37) MB16.40 ± (16.32 - 16.48) MB+1.0%✅⬆️
runtime.dotnet.threads.count20 ± (19 - 20)20 ± (20 - 20)+0.3%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms452.01 ± (449.54 - 454.47) ms452.01 ± (449.26 - 454.76) ms+0.0%✅⬆️
process.time_to_main_ms445.65 ± (445.15 - 446.16) ms447.00 ± (446.44 - 447.57) ms+0.3%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed58.32 ± (58.19 - 58.44) MB58.38 ± (58.25 - 58.51) MB+0.1%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (29 - 30)-0.1%
.NET 8 - Baseline
process.internal_duration_ms190.47 ± (190.13 - 190.81) ms191.28 ± (190.90 - 191.66) ms+0.4%✅⬆️
process.time_to_main_ms69.40 ± (69.24 - 69.57) ms69.87 ± (69.66 - 70.08) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.74 ± (11.71 - 11.77) MB11.73 ± (11.70 - 11.75) MB-0.1%
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)+0.1%✅⬆️
.NET 8 - Bailout
process.internal_duration_ms189.73 ± (189.48 - 189.98) ms190.97 ± (190.63 - 191.30) ms+0.7%✅⬆️
process.time_to_main_ms70.38 ± (70.27 - 70.48) ms71.02 ± (70.86 - 71.18) ms+0.9%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.78 ± (11.74 - 11.81) MB11.76 ± (11.74 - 11.79) MB-0.1%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+0.5%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms368.03 ± (366.64 - 369.41) ms368.18 ± (366.73 - 369.62) ms+0.0%✅⬆️
process.time_to_main_ms429.86 ± (429.27 - 430.45) ms432.79 ± (431.91 - 433.67) ms+0.7%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed48.00 ± (47.98 - 48.03) MB47.93 ± (47.90 - 47.96) MB-0.1%
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)-0.1%
Comparison explanation

Execution-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:

  • Welch test with statistical test for significance of 5%
  • Only results indicating a difference greater than 5% and 5 ms are considered.

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 charts
FakeDbCommand (.NET Framework 4.8)
gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8021) - mean (70ms)  : 67, 72
    master - mean (68ms)  : 67, 70

    section Bailout
    This PR (8021) - mean (73ms)  : 71, 75
    master - mean (72ms)  : 71, 73

    section CallTarget+Inlining+NGEN
    This PR (8021) - mean (1,020ms)  : 968, 1072
    master - mean (1,008ms)  : 968, 1048

Loading
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 (8021) - mean (111ms)  : 106, 117
    master - mean (106ms)  : 104, 108

    section Bailout
    This PR (8021) - mean (110ms)  : 107, 114
    master - mean (107ms)  : 106, 108

    section CallTarget+Inlining+NGEN
    This PR (8021) - mean (741ms)  : 672, 810
    master - mean (731ms)  : 669, 793

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8021) - mean (98ms)  : 92, 103
    master - mean (93ms)  : 91, 96

    section Bailout
    This PR (8021) - mean (98ms)  : 95, 101
    master - mean (94ms)  : 93, 95

    section CallTarget+Inlining+NGEN
    This PR (8021) - mean (713ms)  : 669, 758
    master - mean (713ms)  : 682, 744

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8021) - mean (94ms)  : 91, 98
    master - mean (92ms)  : 90, 94

    section Bailout
    This PR (8021) - mean (95ms)  : 94, 97
    master - mean (93ms)  : 92, 94

    section CallTarget+Inlining+NGEN
    This PR (8021) - mean (638ms)  : 620, 656
    master - mean (630ms)  : 618, 643

Loading
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 (8021) - mean (195ms)  : 190, 199
    master - mean (193ms)  : 189, 198

    section Bailout
    This PR (8021) - mean (197ms)  : 195, 200
    master - mean (197ms)  : 194, 199

    section CallTarget+Inlining+NGEN
    This PR (8021) - mean (1,125ms)  : 1059, 1190
    master - mean (1,112ms)  : 1061, 1164

Loading
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 (8021) - mean (278ms)  : 273, 283
    master - mean (277ms)  : 272, 282

    section Bailout
    This PR (8021) - mean (279ms)  : 274, 284
    master - mean (277ms)  : 273, 282

    section CallTarget+Inlining+NGEN
    This PR (8021) - mean (927ms)  : 876, 979
    master - mean (918ms)  : 871, 966

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8021) - mean (273ms)  : 268, 277
    master - mean (270ms)  : 264, 275

    section Bailout
    This PR (8021) - mean (271ms)  : 266, 276
    master - mean (270ms)  : 266, 274

    section CallTarget+Inlining+NGEN
    This PR (8021) - mean (928ms)  : 888, 967
    master - mean (926ms)  : 889, 963

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8021) - mean (271ms)  : 265, 276
    master - mean (270ms)  : 265, 275

    section Bailout
    This PR (8021) - mean (272ms)  : 265, 278
    master - mean (270ms)  : 266, 273

    section CallTarget+Inlining+NGEN
    This PR (8021) - mean (831ms)  : 810, 852
    master - mean (829ms)  : 799, 860

Loading

@pr-commenter
Copy link

pr-commenter bot commented Dec 30, 2025

Benchmarks

Benchmark execution time: 2026-01-06 15:39:36

Comparing candidate commit adcb8f9 in PR branch gleocadie/fix-alpine-deadlock-2 with baseline commit f0a17cd in branch master.

Found 8 performance improvements and 6 performance regressions! Performance is the same for 157 metrics, 15 unstable metrics.

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody net6.0

  • 🟩 execution_time [-19.733ms; -14.237ms] or [-9.089%; -6.557%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody netcoreapp3.1

  • 🟥 execution_time [+17.013ms; +22.954ms] or [+8.681%; +11.713%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody netcoreapp3.1

  • 🟥 execution_time [+12.183ms; +16.367ms] or [+6.108%; +8.206%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟩 execution_time [-19.599ms; -15.405ms] or [-9.532%; -7.493%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net6.0

  • 🟩 execution_time [-91.176µs; -83.664µs] or [-6.097%; -5.594%]
  • 🟩 throughput [+39.691op/s; +43.346op/s] or [+5.936%; +6.483%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net6.0

  • 🟥 execution_time [+76.346µs; +80.254µs] or [+7.504%; +7.889%]
  • 🟥 throughput [-71.946op/s; -68.542op/s] or [-7.319%; -6.973%]

scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net6.0

  • 🟩 execution_time [-16.517ms; -11.036ms] or [-7.830%; -5.232%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark netcoreapp3.1

  • 🟩 throughput [+151.924op/s; +311.637op/s] or [+8.126%; +16.669%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog netcoreapp3.1

  • 🟥 execution_time [+99.200ms; +100.676ms] or [+96.883%; +98.324%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope netcoreapp3.1

  • 🟩 execution_time [-15.173ms; -14.740ms] or [-7.138%; -6.934%]

scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net6.0

  • 🟩 execution_time [-20.989ms; -15.238ms] or [-9.742%; -7.073%]

scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin netcoreapp3.1

  • 🟥 execution_time [+11.393ms; +15.325ms] or [+5.809%; +7.814%]

@gleocadie gleocadie force-pushed the gleocadie/fix-alpine-deadlock-2 branch from 66dbc18 to 9e59ae3 Compare December 30, 2025 15:09
@gleocadie gleocadie force-pushed the gleocadie/fix-alpine-deadlock-2 branch from 9e7b84d to cb6d035 Compare January 6, 2026 08:31
@gleocadie gleocadie marked this pull request as ready for review January 6, 2026 08:46
@gleocadie gleocadie requested a review from a team as a code owner January 6, 2026 08:46
@gleocadie gleocadie force-pushed the gleocadie/fix-alpine-deadlock-2 branch from 098c845 to 7e061b0 Compare January 6, 2026 12:55
@datadog-datadog-prod-us1

This comment has been minimized.

@gleocadie gleocadie force-pushed the gleocadie/fix-alpine-deadlock-2 branch from 7e061b0 to adcb8f9 Compare January 6, 2026 14:36
Copy link
Contributor

@chrisnas chrisnas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gleocadie gleocadie merged commit b70d8ff into master Jan 7, 2026
155 of 157 checks passed
@gleocadie gleocadie deleted the gleocadie/fix-alpine-deadlock-2 branch January 7, 2026 08:29
@github-actions github-actions bot added this to the vNext-v3 milestone Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:profiler Issues related to the continous-profiler identified-by:customer type:bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants