From 283933bc9140ca4697a6c406b5682afbf650b6f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C5=82az=CC=87ej=20Pankowski?= <86720177+pblazej@users.noreply.github.com> Date: Thu, 11 Jun 2026 13:04:32 +0200 Subject: [PATCH] Benchmarks: disable jemalloc trait to fix SIGSEGV on macOS 26 The nightly benchmark workflow started failing on Jun 10: the benchmark binary segfaults during the first benchmark (BM-CONN-001), reported by package-benchmark as WaitPIDError / error code [11]. Bisected to the webrtc-xcframework 144.7559.07 -> 144.7559.08 bump (0e6fde4b): the last-good SDK commit passes with .07 and crashes with only the pin flipped to .08. With the .08 binary loaded, jemalloc's malloc-zone hooks (linked by package-benchmark for malloc stats) free a pointer they don't own during CoreFoundation's one-time NSLocale._preferredLanguages init on the NSURLSession work thread: je_free_default -> zone_free -> __CFBasicHashRehash -> CFNotificationCenterAddObserver -> ... -> CFNetwork Accept-Language Disabling the Jemalloc package trait (its only default trait) removes the malloc-zone interposition entirely, which fixes the crash class regardless of what shifts early CF allocations. Malloc metrics read 0 without it; all other metrics are unaffected. Co-Authored-By: Claude Fable 5 --- Benchmarks/Package.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Benchmarks/Package.swift b/Benchmarks/Package.swift index 37347f2a4..a6333f431 100644 --- a/Benchmarks/Package.swift +++ b/Benchmarks/Package.swift @@ -10,7 +10,8 @@ let package = Package( dependencies: [ .package(name: "client-sdk-swift", path: "../"), .package(url: "https://github.com/livekit/livekit-uniffi-xcframework.git", from: "0.0.1"), - .package(url: "https://github.com/ordo-one/benchmark.git", from: "1.29.0"), + // No Jemalloc trait: jemalloc's malloc-zone hooks crash on macOS 26 (malloc metrics read 0 without it) + .package(url: "https://github.com/ordo-one/benchmark.git", from: "1.29.0", traits: []), ], targets: [ .executableTarget(