Skip to content

Commit af7fa27

Browse files
authored
[sanitizer] VReport thread status for failed PTRACE_ATTACH (#111901)
Such threads can cause false leak reports, but often it's hard to diagnose the reason of failed PTRACE_ATTACH. Maybe we can find a clue from `/proc/*/task/*/status`
1 parent 5deadc6 commit af7fa27

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ bool ThreadSuspender::SuspendAllThreads() {
228228
for (tid_t tid : threads) {
229229
if (SuspendThread(tid))
230230
retry = true;
231+
else
232+
VReport(2, "%llu/status: %s\n", tid, thread_lister.LoadStatus(tid));
231233
}
232234
if (retry)
233235
VReport(1, "SuspendAllThreads retry: %d\n", i);

0 commit comments

Comments
 (0)