public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] runner: Add signal sender name when dying
@ 2019-09-18 10:35 Chris Wilson
  2019-09-18 10:45 ` Petri Latvala
  2019-09-18 12:41 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
  0 siblings, 2 replies; 5+ messages in thread
From: Chris Wilson @ 2019-09-18 10:35 UTC (permalink / raw)
  To: igt-dev; +Cc: Petri Latvala

We want to know who sent us the fatal signal, for there are plenty of
fingers to go around.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Petri Latvala <petri.latvala@intel.com>
---
 runner/executor.c | 29 +++++++++++++++++++++++++++--
 1 file changed, 27 insertions(+), 2 deletions(-)

diff --git a/runner/executor.c b/runner/executor.c
index c1cfcce83..f7183293d 100644
--- a/runner/executor.c
+++ b/runner/executor.c
@@ -609,6 +609,26 @@ static bool kill_child(int sig, pid_t child)
 	return true;
 }
 
+static const char *get_cmdline(pid_t pid, char *buf, size_t len)
+{
+	int fd;
+
+	if (snprintf(buf, len, "/proc/%d/cmdline", pid) > len)
+		return "unknown";
+
+	fd = open(buf, O_RDONLY);
+	if (fd < 0)
+		return "unknown";
+
+	len = read(fd, buf, len - 1);
+	close(fd);
+	if (len < 0)
+		return "unknown";
+
+	buf[len] = '\0';
+	return buf;
+}
+
 /*
  * Returns:
  *  =0 - Success
@@ -886,9 +906,14 @@ static int monitor_output(pid_t child,
 				}
 			} else {
 				/* We're dying, so we're taking them with us */
-				if (settings->log_level >= LOG_LEVEL_NORMAL)
-					outf("Abort requested via %s, terminating children\n",
+				if (settings->log_level >= LOG_LEVEL_NORMAL) {
+					char comm[80];
+
+					outf("Abort requested by %s [%d] via %s, terminating children\n",
+					     get_cmdline(siginfo.ssi_pid, comm, sizeof(comm)),
+					     siginfo.ssi_pid,
 					     strsignal(siginfo.ssi_signo));
+				}
 
 				aborting = true;
 				timeout = 2;
-- 
2.23.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t] runner: Add signal sender name when dying
  2019-09-18 10:35 [igt-dev] [PATCH i-g-t] runner: Add signal sender name when dying Chris Wilson
@ 2019-09-18 10:45 ` Petri Latvala
  2019-09-18 10:49   ` Chris Wilson
  2019-09-18 12:41 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
  1 sibling, 1 reply; 5+ messages in thread
From: Petri Latvala @ 2019-09-18 10:45 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

On Wed, Sep 18, 2019 at 11:35:18AM +0100, Chris Wilson wrote:
> We want to know who sent us the fatal signal, for there are plenty of
> fingers to go around.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Petri Latvala <petri.latvala@intel.com>
> ---
>  runner/executor.c | 29 +++++++++++++++++++++++++++--
>  1 file changed, 27 insertions(+), 2 deletions(-)
> 
> diff --git a/runner/executor.c b/runner/executor.c
> index c1cfcce83..f7183293d 100644
> --- a/runner/executor.c
> +++ b/runner/executor.c
> @@ -609,6 +609,26 @@ static bool kill_child(int sig, pid_t child)
>  	return true;
>  }
>  
> +static const char *get_cmdline(pid_t pid, char *buf, size_t len)
> +{
> +	int fd;
> +
> +	if (snprintf(buf, len, "/proc/%d/cmdline", pid) > len)
> +		return "unknown";
> +
> +	fd = open(buf, O_RDONLY);
> +	if (fd < 0)
> +		return "unknown";
> +
> +	len = read(fd, buf, len - 1);
> +	close(fd);
> +	if (len < 0)
> +		return "unknown";
> +
> +	buf[len] = '\0';
> +	return buf;
> +}

Are you intentionally only printing argv[0]? argv items are
\0-separated in /proc/*/cmdline.



-- 
Petri Latvala
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t] runner: Add signal sender name when dying
  2019-09-18 10:45 ` Petri Latvala
@ 2019-09-18 10:49   ` Chris Wilson
  2019-09-18 11:23     ` Petri Latvala
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Wilson @ 2019-09-18 10:49 UTC (permalink / raw)
  To: Petri Latvala; +Cc: igt-dev

Quoting Petri Latvala (2019-09-18 11:45:33)
> On Wed, Sep 18, 2019 at 11:35:18AM +0100, Chris Wilson wrote:
> > We want to know who sent us the fatal signal, for there are plenty of
> > fingers to go around.
> > 
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Petri Latvala <petri.latvala@intel.com>
> > ---
> >  runner/executor.c | 29 +++++++++++++++++++++++++++--
> >  1 file changed, 27 insertions(+), 2 deletions(-)
> > 
> > diff --git a/runner/executor.c b/runner/executor.c
> > index c1cfcce83..f7183293d 100644
> > --- a/runner/executor.c
> > +++ b/runner/executor.c
> > @@ -609,6 +609,26 @@ static bool kill_child(int sig, pid_t child)
> >       return true;
> >  }
> >  
> > +static const char *get_cmdline(pid_t pid, char *buf, size_t len)
> > +{
> > +     int fd;
> > +
> > +     if (snprintf(buf, len, "/proc/%d/cmdline", pid) > len)
> > +             return "unknown";
> > +
> > +     fd = open(buf, O_RDONLY);
> > +     if (fd < 0)
> > +             return "unknown";
> > +
> > +     len = read(fd, buf, len - 1);
> > +     close(fd);
> > +     if (len < 0)
> > +             return "unknown";
> > +
> > +     buf[len] = '\0';
> > +     return buf;
> > +}
> 
> Are you intentionally only printing argv[0]? argv items are
> \0-separated in /proc/*/cmdline.

Yes, we only want a human friendly process name, or do we need the full
cmdline because it's java??? If it's java, I'm running away.
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t] runner: Add signal sender name when dying
  2019-09-18 10:49   ` Chris Wilson
@ 2019-09-18 11:23     ` Petri Latvala
  0 siblings, 0 replies; 5+ messages in thread
From: Petri Latvala @ 2019-09-18 11:23 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

On Wed, Sep 18, 2019 at 11:49:57AM +0100, Chris Wilson wrote:
> Quoting Petri Latvala (2019-09-18 11:45:33)
> > On Wed, Sep 18, 2019 at 11:35:18AM +0100, Chris Wilson wrote:
> > > We want to know who sent us the fatal signal, for there are plenty of
> > > fingers to go around.
> > > 
> > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > > Cc: Petri Latvala <petri.latvala@intel.com>
> > > ---
> > >  runner/executor.c | 29 +++++++++++++++++++++++++++--
> > >  1 file changed, 27 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/runner/executor.c b/runner/executor.c
> > > index c1cfcce83..f7183293d 100644
> > > --- a/runner/executor.c
> > > +++ b/runner/executor.c
> > > @@ -609,6 +609,26 @@ static bool kill_child(int sig, pid_t child)
> > >       return true;
> > >  }
> > >  
> > > +static const char *get_cmdline(pid_t pid, char *buf, size_t len)
> > > +{
> > > +     int fd;
> > > +
> > > +     if (snprintf(buf, len, "/proc/%d/cmdline", pid) > len)
> > > +             return "unknown";
> > > +
> > > +     fd = open(buf, O_RDONLY);
> > > +     if (fd < 0)
> > > +             return "unknown";
> > > +
> > > +     len = read(fd, buf, len - 1);
> > > +     close(fd);
> > > +     if (len < 0)
> > > +             return "unknown";
> > > +
> > > +     buf[len] = '\0';
> > > +     return buf;
> > > +}
> > 
> > Are you intentionally only printing argv[0]? argv items are
> > \0-separated in /proc/*/cmdline.
> 
> Yes, we only want a human friendly process name, or do we need the full
> cmdline because it's java??? If it's java, I'm running away.


Well...


-- 
Petri Latvala
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✓ Fi.CI.BAT: success for runner: Add signal sender name when dying
  2019-09-18 10:35 [igt-dev] [PATCH i-g-t] runner: Add signal sender name when dying Chris Wilson
  2019-09-18 10:45 ` Petri Latvala
@ 2019-09-18 12:41 ` Patchwork
  1 sibling, 0 replies; 5+ messages in thread
From: Patchwork @ 2019-09-18 12:41 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: runner: Add signal sender name when dying
URL   : https://patchwork.freedesktop.org/series/66854/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6915 -> IGTPW_3475
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/66854/revisions/1/mbox/

Known issues
------------

  Here are the changes found in IGTPW_3475 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@prime_vgem@basic-fence-read:
    - fi-icl-u3:          [PASS][1] -> [DMESG-WARN][2] ([fdo#107724]) +1 similar issue
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6915/fi-icl-u3/igt@prime_vgem@basic-fence-read.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3475/fi-icl-u3/igt@prime_vgem@basic-fence-read.html

  
#### Possible fixes ####

  * igt@gem_ctx_create@basic-files:
    - fi-bxt-dsi:         [INCOMPLETE][3] ([fdo#103927]) -> [PASS][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6915/fi-bxt-dsi/igt@gem_ctx_create@basic-files.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3475/fi-bxt-dsi/igt@gem_ctx_create@basic-files.html

  * igt@gem_mmap_gtt@basic-write-no-prefault:
    - fi-icl-u3:          [DMESG-WARN][5] ([fdo#107724]) -> [PASS][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6915/fi-icl-u3/igt@gem_mmap_gtt@basic-write-no-prefault.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3475/fi-icl-u3/igt@gem_mmap_gtt@basic-write-no-prefault.html

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       [FAIL][7] ([fdo#111096]) -> [PASS][8]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6915/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3475/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html

  * igt@kms_prop_blob@basic:
    - {fi-icl-u4}:        [DMESG-WARN][9] ([fdo#105602]) -> [PASS][10]
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6915/fi-icl-u4/igt@kms_prop_blob@basic.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3475/fi-icl-u4/igt@kms_prop_blob@basic.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
  [fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
  [fdo#111045]: https://bugs.freedesktop.org/show_bug.cgi?id=111045
  [fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
  [fdo#111381]: https://bugs.freedesktop.org/show_bug.cgi?id=111381


Participating hosts (56 -> 48)
------------------------------

  Missing    (8): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-icl-u2 fi-bsw-cyan fi-icl-y fi-byt-clapper fi-bdw-samus 


Build changes
-------------

  * CI: CI-20190529 -> None
  * IGT: IGT_5190 -> IGTPW_3475

  CI-20190529: 20190529
  CI_DRM_6915: c72f7d5ea4386172247558b74c1f8012b35800b7 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_3475: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3475/
  IGT_5190: 0e9510b83502af3e230870df2d66d4f68918d3a4 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3475/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

end of thread, other threads:[~2019-09-18 12:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-18 10:35 [igt-dev] [PATCH i-g-t] runner: Add signal sender name when dying Chris Wilson
2019-09-18 10:45 ` Petri Latvala
2019-09-18 10:49   ` Chris Wilson
2019-09-18 11:23     ` Petri Latvala
2019-09-18 12:41 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox