Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Gustavo Sousa <gustavo.sousa@intel.com>
To: <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t 0/2] Fix igt_runner hang and resource leak associated with pw-reserve
Date: Wed, 7 Oct 2026 11:34:38 -0300	[thread overview]
Message-ID: <87fqyha8ap.fsf@intel.com> (raw)
In-Reply-To: <20261007-stop-pw-reserve-v1-0-abbd3b879612@intel.com>

Gustavo Sousa <gustavo.sousa@intel.com> writes:

> 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>
>

Please disregard the patch text below.  This should have been only a
cover letter.  Something clearly went wrong when I was editing the cover
letter. Sorry about that.

That said, I think the real patches (patch #1 and #2) are still
reviewable, so I'll wait for feedback on them instead of sending another
version only with the text below removed.

Hopefully this doesn't confuse CI!

--
Gustavo Sousa

> 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>

  parent reply	other threads:[~2026-10-07 14:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Gustavo Sousa [this message]
2026-10-07 16:31 ` ✓ i915.CI.BAT: success for Fix igt_runner hang and resource leak associated with pw-reserve 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fqyha8ap.fsf@intel.com \
    --to=gustavo.sousa@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox