[PATCH 07/17] staputil: serialize executable lookups on the debuginfod client
Aaron Merey
amerey@redhat.com
Mon Nov 23 04:14:21 GMT 2026
Parallel executable lookups call debuginfod_find_executable on the
same client. Both requests reset the client's progressfn_cancel flag.
Serialize the call in find_executable.
WARNING: ThreadSanitizer: data race
Write of size 1 at 0xffff9844bd4c by thread T18:
#0 debuginfod_query_server_by_buildid ... debuginfod-client.c:1830
#1 debuginfod_find_executable ... debuginfod-client.c:2696
#2 find_executable ... staputil.cxx:651
Previous write of size 1 at 0xffff9844bd4c by thread T17:
#0 debuginfod_query_server_by_buildid ... debuginfod-client.c:1830
Assisted-by: Codex <noreply@openai.com>
---
staputil.cxx | 2 ++
1 file changed, 2 insertions(+)
diff --git a/staputil.cxx b/staputil.cxx
index be162d58c..2a8b6ca7c 100644
--- a/staputil.cxx
+++ b/staputil.cxx
@@ -642,6 +642,8 @@ string find_executable(const string& name, const string& sysroot,
if (retpath == "")
{
// Query debuginfod for the executable.
+ static mutex client_mutex;
+ lock_guard<mutex> g (client_mutex);
static unique_ptr <debuginfod_client, void (*)(debuginfod_client*)>
client (debuginfod_begin(), &debuginfod_end);
--
2.56.1
More information about the Systemtap
mailing list