Skip to content

Commit

Permalink
test-agent: Move thread suspend awareness test to slow mode
Browse files Browse the repository at this point in the history
For now, until the deadlock it reproduces has been fixed. What happens
is that the suspended thread holds Gum's dlmalloc lock in the moment
when it gets suspended. So when the thread that suspended it carries on
and calls a hooked function, it ends up needing to allocate memory, and
deadlocks trying to get the dlmalloc lock.
  • Loading branch information
oleavr committed Mar 14, 2024
1 parent cb5eaff commit 8328d8b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test-agent.vala
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,12 @@ Interceptor.attach(Module.getExportByName('/usr/lib/system/libsystem_kernel.dyli
}

private static async void thread_suspend_awareness (Harness h) {
if (!GLib.Test.slow ()) {
stdout.printf ("<skipping, run in slow mode> ");
h.done ();
return;
}

var session = yield h.load_agent ();

try {
Expand Down

0 comments on commit 8328d8b

Please sign in to comment.