From 52e31be7f4cda02e30a2138f238f9559fa2ff953 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 25 Jul 2026 21:52:01 +0200 Subject: [PATCH] Do not touch the thread compression cache in a load-time job. The job which builds the symbol samples and child samples maps called CompressThread, which updates the lookup cache and can insert into the compression map, while the timeline processing job concurrently reads the map, deliberately using the raw lookup to avoid this exact hazard. All threads are already present in the compression data loaded from the trace, so use the raw lookup as well. --- server/TracyWorker.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 60cea678..efc91a94 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -1927,7 +1927,8 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks, bool allow jobs.emplace_back( std::thread( [this] { for( auto& t : m_data.threads ) { - uint16_t tid = CompressThread( t->id ); + // Don't touch thread compression cache in a thread. + uint16_t tid = m_data.localThreadCompress.DecompressMustRaw( t->id ); auto cit = t->ctxSwitchSamples.begin(); for( auto& v : t->samples ) {