From: Petri Latvala <petri.latvala@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t v3] runner: Show kernel state on detecting test timeout
Date: Mon, 14 Oct 2019 09:58:35 +0300 [thread overview]
Message-ID: <20191014065835.GJ4019@platvala-desk.ger.corp.intel.com> (raw)
In-Reply-To: <20191011132237.28035-1-chris@chris-wilson.co.uk>
On Fri, Oct 11, 2019 at 02:22:37PM +0100, Chris Wilson wrote:
> When our watchdog expires and we declare the test has timed out, we send
> it a signal to terminate. The test will produce a backtrace upon receipt
> of that signal, but often times (especially as we do test and debug the
> kernel), the test is hung inside the kernel. So we need the kernel state
> to see where the live/deadlock is occuring. Enter sysrq-t to show the
> backtraces of all processes (as the one we are searching for may be
> sleeping).
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Petri Latvala <petri.latvala@intel.com>
> ---
> runner/executor.c | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
> diff --git a/runner/executor.c b/runner/executor.c
> index 1a00237fc..2bb828278 100644
> --- a/runner/executor.c
> +++ b/runner/executor.c
> @@ -638,6 +638,25 @@ static const char *get_cmdline(pid_t pid, char *buf, ssize_t len)
> return buf;
> }
>
> +static bool sysrq(char cmd)
> +{
> + bool success = false;
> + int fd;
> +
> + fd = open("/proc/sysrq-trigger", O_WRONLY);
> + if (fd >= 0) {
> + success = write(fd, &cmd, 1) == 1;
> + close(fd);
> + }
Where does the dump go? Are we able to grab it in the test's dmesg?
--
Petri Latvala
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-10-14 6:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-11 13:18 [igt-dev] [PATCH i-g-t] runner: Show kernel state on detecting test timeout Chris Wilson
2019-10-11 13:20 ` [igt-dev] [PATCH i-g-t v2] " Chris Wilson
2019-10-11 13:22 ` [igt-dev] [PATCH i-g-t v3] " Chris Wilson
2019-10-14 6:58 ` Petri Latvala [this message]
2019-10-14 7:12 ` Chris Wilson
2019-10-14 12:53 ` Petri Latvala
2019-10-11 15:19 ` [igt-dev] ✓ Fi.CI.BAT: success for runner: Show kernel state on detecting test timeout (rev3) Patchwork
2019-10-11 23:40 ` [igt-dev] ✓ Fi.CI.IGT: " 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=20191014065835.GJ4019@platvala-desk.ger.corp.intel.com \
--to=petri.latvala@intel.com \
--cc=chris@chris-wilson.co.uk \
--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