All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t 0/2] Fix igt_runner hang and resource leak associated with pw-reserve
@ 2026-10-07 14:16 Gustavo Sousa
  2026-10-07 14:16 ` [PATCH i-g-t 1/2] lib/igt_core: Check if helper proc was alive before kill() Gustavo Sousa
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Gustavo Sousa @ 2026-10-07 14:16 UTC (permalink / raw)
  To: igt-dev; +Cc: Gustavo Sousa

When running igt_runner on an interactive SSH session we realized that
the runner would hang when testlists contained test cases that would
unbind/rebind (or unload/reload) the driver multiple times.

Some debugging revealed that the hangs were caused by pw-reserve
processes created by IGT not being properly terminated.  Let's fix
that.

Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>

diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index dbb90756babc..18053db8ff46 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -1898,13 +1898,10 @@ static void pipewire_reserve_wait(void)
 		setenv("HOME", homedir, 1);
 		setenv("XDG_RUNTIME_DIR",xdg_dir, 1);
 
-		/*
-		 * pw-reserve will run in background. It will only exit when
-		 * igt_kill_children() is called later on. So, it shouldn't
-		 * call igt_waitchildren(). Instead, just exit with the return
-		 * code from pw-reserve.
-		 */
-		exit(system("pw-reserve -n Audio0 -r"));
+		if (execlp("pw-reserve", "pw-reserve", "-n", "Audio0", "-r", NULL)) {
+			igt_warn("Failed to start pw-reserve: %s\n", strerror(errno));
+			exit(1);
+		}
 	}
 }
 

Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
---
Gustavo Sousa (2):
      lib/igt_core: Check if helper proc was alive before kill()
      lib/igt_aux: Call pw-reserve with execlp()

 lib/igt_aux.c  | 11 ++++-------
 lib/igt_core.c | 20 +++++++++-----------
 2 files changed, 13 insertions(+), 18 deletions(-)
---
base-commit: faad2cd0e3e8eb2e18111c2358823a7bdfb56d94
change-id: 20261006-stop-pw-reserve-ae63047af2d4

Best regards,
--  
Gustavo Sousa <gustavo.sousa@intel.com>


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-10-13 18:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-07 14:16 [PATCH i-g-t 0/2] Fix igt_runner hang and resource leak associated with pw-reserve Gustavo Sousa
2026-10-07 14:16 ` [PATCH i-g-t 1/2] lib/igt_core: Check if helper proc was alive before kill() Gustavo Sousa
2026-10-09 22:55   ` [i-g-t,1/2] " Daniel Charles
2026-10-13 17:56     ` Gustavo Sousa
2026-10-13 18:39       ` Daniel Charles
2026-10-13 18:53         ` Gustavo Sousa
2026-10-07 14:16 ` [PATCH i-g-t 2/2] lib/igt_aux: Call pw-reserve with execlp() Gustavo Sousa
2026-10-07 14:34 ` [PATCH i-g-t 0/2] Fix igt_runner hang and resource leak associated with pw-reserve Gustavo Sousa
2026-10-07 16:31 ` ✓ i915.CI.BAT: success for " Patchwork
2026-10-07 16:40 ` ✓ Xe.CI.BAT: " Patchwork
2026-10-07 19:36 ` ✓ Xe.CI.FULL: " Patchwork
2026-10-07 22:27 ` ✗ i915.CI.Full: failure " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.