From 8328d8bdb35f4910c2d1b4cf6949198d70c4892d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Andr=C3=A9=20Vadla=20Ravn=C3=A5s?= Date: Thu, 14 Mar 2024 09:37:50 +0100 Subject: [PATCH] test-agent: Move thread suspend awareness test to slow mode 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. --- tests/test-agent.vala | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test-agent.vala b/tests/test-agent.vala index 90f0a582a..41ead5ec1 100644 --- a/tests/test-agent.vala +++ b/tests/test-agent.vala @@ -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 (" "); + h.done (); + return; + } + var session = yield h.load_agent (); try {