Skip to contentSkip to conversation

runner: Make sure oom-killer doesn't kill the runner

PATCH In review Petri Latvala 3 participants 4 messages Apr 11, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 runner: Make sure oom-killer doesn't kill the runner

Tests that eat all of the RAM and then some to invoke the oom-killer deliberately sometimes cause extra casualties. Make sure the runner stays alive.

---
 runner/executor.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
runner/executor.c +18 -0
index 0e91b7ab..7e5fbe8f 100644
@@ -1221,6 +1221,22 @@ static void write_abort_file(int resdirfd,
 	}
 }
 
+static void oom_immortal(void)
+{
+	int fd;
+	const char never_kill[] = "-1000";
+
+	fd = open("/proc/self/oom_score_adj", O_WRONLY);
+	if (fd < 0) {
+		fprintf(stderr, "Warning: Cannot adjust oom score.\n");
+		return;
+	}
+	if (write(fd, never_kill, sizeof(never_kill)) != sizeof(never_kill))
+		fprintf(stderr, "Warning: Adjusting oom score failed.\n");
+
+	close(fd);
+}
+
 bool execute(struct execute_state *state,
 	     struct settings *settings,
 	     struct job_list *job_list)
@@ -1268,6 +1284,8 @@ bool execute(struct execute_state *state,
 		close(timefd);
 	}
 
+	oom_immortal();
+
 	init_watchdogs(settings);
 
 	if (!uname(&unamebuf)) {
Signature · 6 lines
2.19.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Reviewed-by on v1 1/1
#1 lore raw

Quoting Petri Latvala (2019-04-11 10:40:12)

Quoted 5 lines

Tests that eat all of the RAM and then some to invoke the oom-killer deliberately sometimes cause extra casualties. Make sure the runner stays alive.

-Chris
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#2 lore raw

[igt-dev] ✓ Fi.CI.BAT: success for runner: Make sure oom-killer doesn't kill the runner

In reply to Petri Latvala
== Series Details ==

== Series Details ==

Series: runner: Make sure oom-killer doesn't kill the runner
URL : https://patchwork.freedesktop.org/series/59330/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5909 -> IGTPW_2842
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

* igt@i915_selftest@live_contexts:
- fi-bdw-gvtdvm: PASS -> DMESG-FAIL [fdo#110235 ]

* igt@i915_selftest@live_execlists:
- fi-apl-guc: PASS -> INCOMPLETE [fdo#103927] / [fdo#109720]

* igt@kms_pipe_crc_basic@read-crc-pipe-c-frame-sequence:
- fi-glk-dsi: PASS -> FAIL [fdo#103191]

* igt@runner@aborted:
- fi-apl-guc: NOTRUN -> FAIL [fdo#108622] / [fdo#109720]

#### Possible fixes ####

* igt@i915_selftest@live_hangcheck:
- fi-bxt-dsi: INCOMPLETE [fdo#103927] -> PASS

[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#108622]: https://bugs.freedesktop.org/show_bug.cgi?id=108622
[fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720
[fdo#110235 ]: https://bugs.freedesktop.org/show_bug.cgi?id=110235

Participating hosts (49 -> 42)
------------------------------

Missing (7): fi-ilk-m540 fi-byt-j1900 fi-byt-squawks fi-bsw-cyan fi-gdg-551 fi-icl-y fi-bdw-samus

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

* IGT: IGT_4943 -> IGTPW_2842

CI_DRM_5909: af07fbb536d0728e381cc001cac5bc259c41fe02 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2842: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2842/
IGT_4943: 5941f371b0fe25084d4b1c49882faa8d41d44c9f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2842/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#3 lore raw

[igt-dev] ✓ Fi.CI.IGT: success for runner: Make sure oom-killer doesn't kill the runner

In reply to Petri Latvala
== Series Details ==

== Series Details ==

Series: runner: Make sure oom-killer doesn't kill the runner
URL : https://patchwork.freedesktop.org/series/59330/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5909_full -> IGTPW_2842_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_bad_reloc@negative-reloc-bsd2:
- shard-iclb: NOTRUN -> SKIP [fdo#109276] +12

* igt@gem_exec_suspend@basic-s3:
- shard-kbl: PASS -> INCOMPLETE [fdo#103665]

* igt@gem_mocs_settings@mocs-reset-dirty-render:
- shard-iclb: NOTRUN -> SKIP [fdo#110206]

* igt@gem_pread@pagefault-pread:
- shard-iclb: NOTRUN -> SKIP [fdo#109277] +1

* igt@gem_pwrite@huge-cpu-backwards:
- shard-iclb: NOTRUN -> SKIP [fdo#109290]

* igt@gem_workarounds@suspend-resume-context:
- shard-apl: PASS -> DMESG-WARN [fdo#110376]

* igt@i915_pm_lpsp@screens-disabled:
- shard-iclb: NOTRUN -> SKIP [fdo#109301]

* igt@i915_pm_rc6_residency@rc6-accuracy:
- shard-snb: PASS -> SKIP [fdo#109271]

* igt@i915_pm_rpm@modeset-non-lpsp:
- shard-iclb: NOTRUN -> SKIP [fdo#109308]

* igt@i915_pm_rpm@modeset-pc8-residency-stress:
- shard-apl: NOTRUN -> SKIP [fdo#109271] +25

* igt@i915_suspend@sysfs-reader:
- shard-apl: PASS -> DMESG-WARN [fdo#108566] +2

* igt@kms_atomic_transition@1x-modeset-transitions-nonblocking-fencing:
- shard-apl: PASS -> FAIL [fdo#109660]
- shard-kbl: NOTRUN -> FAIL [fdo#109660]

* igt@kms_atomic_transition@6x-modeset-transitions-nonblocking-fencing:
- shard-iclb: NOTRUN -> SKIP [fdo#109278] +3
- shard-glk: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +1

* igt@kms_available_modes_crc@available_mode_test_crc:
- shard-iclb: NOTRUN -> FAIL [fdo#106641]

* igt@kms_busy@basic-modeset-f:
- shard-apl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +1

* igt@kms_chamelium@dp-hpd-storm-disable:
- shard-iclb: NOTRUN -> SKIP [fdo#109284] +1

* igt@kms_content_protection@legacy:
- shard-kbl: NOTRUN -> FAIL [fdo#110321] / [fdo#110336]

* igt@kms_cursor_crc@cursor-128x128-suspend:
- shard-apl: NOTRUN -> DMESG-WARN [fdo#108566]

* igt@kms_cursor_crc@cursor-512x170-random:
- shard-iclb: NOTRUN -> SKIP [fdo#109279]

* igt@kms_cursor_legacy@2x-long-cursor-vs-flip-atomic:
- shard-iclb: NOTRUN -> SKIP [fdo#109274] +3

* igt@kms_fbcon_fbt@psr:
- shard-iclb: NOTRUN -> FAIL [fdo#103833]

* igt@kms_flip@absolute-wf_vblank-interruptible:
- shard-iclb: PASS -> INCOMPLETE [fdo#107713]

* igt@kms_force_connector_basic@force-load-detect:
- shard-iclb: NOTRUN -> SKIP [fdo#109285]

* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-indfb-draw-render:
- shard-iclb: NOTRUN -> SKIP [fdo#109280] +17

* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render:
- shard-iclb: PASS -> FAIL [fdo#103167] +4

* igt@kms_frontbuffer_tracking@fbcpsr-1p-rte:
- shard-iclb: NOTRUN -> FAIL [fdo#109247] +1

* igt@kms_frontbuffer_tracking@fbcpsr-farfromfence:
- shard-glk: NOTRUN -> SKIP [fdo#109271] +13

* igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-mmap-cpu:
- shard-iclb: PASS -> FAIL [fdo#109247] +11

* igt@kms_invalid_dotclock:
- shard-iclb: NOTRUN -> SKIP [fdo#109310]

* igt@kms_lease@setcrtc_implicit_plane:
- shard-kbl: NOTRUN -> FAIL [fdo#110281]

* igt@kms_pipe_crc_basic@read-crc-pipe-d:
- shard-kbl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +6

* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes:
- shard-kbl: PASS -> DMESG-WARN [fdo#108566]

* igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb:
- shard-glk: NOTRUN -> FAIL [fdo#108145]

* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max:
- shard-apl: NOTRUN -> FAIL [fdo#108145]

* igt@kms_plane_scaling@pipe-a-scaler-with-pixel-format:
- shard-glk: PASS -> SKIP [fdo#109271] / [fdo#109278]

* igt@kms_psr2_su@frontbuffer:
- shard-iclb: PASS -> SKIP [fdo#109642]

* igt@kms_psr@psr2_primary_mmap_cpu:
- shard-iclb: PASS -> SKIP [fdo#109441] +1

* igt@kms_psr@psr2_sprite_blt:
- shard-iclb: NOTRUN -> SKIP [fdo#109441] +1

* igt@kms_psr@sprite_mmap_gtt:
- shard-iclb: PASS -> FAIL [fdo#107383] / [fdo#110215] +1

* igt@kms_rotation_crc@multiplane-rotation-cropping-bottom:
- shard-kbl: PASS -> DMESG-FAIL [fdo#105763]

* igt@kms_setmode@basic:
- shard-apl: PASS -> FAIL [fdo#99912]
- shard-kbl: PASS -> FAIL [fdo#99912]

* igt@perf@unprivileged-single-ctx-counters:
- shard-iclb: NOTRUN -> SKIP [fdo#109289] +2

* igt@prime_nv_api@i915_nv_double_export:
- shard-iclb: NOTRUN -> SKIP [fdo#109291]

* igt@prime_nv_pcopy@test3_4:
- shard-kbl: NOTRUN -> SKIP [fdo#109271] +37

* igt@tools_test@tools_test:
- shard-iclb: PASS -> SKIP [fdo#109352]

#### Possible fixes ####

* igt@i915_pm_rpm@fences:
- shard-iclb: INCOMPLETE [fdo#107713] / [fdo#108840] -> PASS

* igt@i915_selftest@live_workarounds:
- shard-iclb: DMESG-FAIL [fdo#108954] -> PASS

* igt@kms_busy@extended-modeset-hang-oldfb-render-c:
- shard-apl: INCOMPLETE [fdo#103927] -> PASS

* igt@kms_flip@dpms-vs-vblank-race:
- shard-apl: FAIL [fdo#103060] -> PASS

* igt@kms_flip@flip-vs-expired-vblank:
- shard-glk: FAIL [fdo#105363] -> PASS

* igt@kms_flip_tiling@flip-x-tiled:
- shard-iclb: FAIL [fdo#108303] -> PASS

* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-pwrite:
- shard-iclb: FAIL [fdo#103167] -> PASS +7

* igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-shrfb-draw-mmap-gtt:
- shard-iclb: FAIL [fdo#109247] -> PASS +9

* igt@kms_psr@cursor_mmap_gtt:
- shard-iclb: FAIL [fdo#107383] / [fdo#110215] -> PASS +2

* igt@kms_psr@no_drrs:
- shard-iclb: FAIL [fdo#108341] -> PASS

* igt@kms_psr@psr2_cursor_mmap_cpu:
- shard-iclb: SKIP [fdo#109441] -> PASS

* igt@kms_universal_plane@universal-plane-pipe-b-functional:

    - shard-glk:          FAIL [fdo#110037] -> PASS
    - shard-apl:          FAIL [fdo#110037] -> PASS
    - shard-kbl:          FAIL [fdo#110037] -> PASS

* igt@kms_vblank@pipe-c-ts-continuation-suspend:
- shard-apl: DMESG-WARN [fdo#108566] -> PASS +7

[fdo#103060]: https://bugs.freedesktop.org/show_bug.cgi?id=103060
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#103833]: https://bugs.freedesktop.org/show_bug.cgi?id=103833
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
[fdo#106641]: https://bugs.freedesktop.org/show_bug.cgi?id=106641
[fdo#107383]: https://bugs.freedesktop.org/show_bug.cgi?id=107383
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108303]: https://bugs.freedesktop.org/show_bug.cgi?id=108303
[fdo#108341]: https://bugs.freedesktop.org/show_bug.cgi?id=108341
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#108840]: https://bugs.freedesktop.org/show_bug.cgi?id=108840
[fdo#108954]: https://bugs.freedesktop.org/show_bug.cgi?id=108954
[fdo#109247]: https://bugs.freedesktop.org/show_bug.cgi?id=109247
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109277]: https://bugs.freedesktop.org/show_bug.cgi?id=109277
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109279]: https://bugs.freedesktop.org/show_bug.cgi?id=109279
[fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
[fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109290]: https://bugs.freedesktop.org/show_bug.cgi?id=109290
[fdo#109291]: https://bugs.freedesktop.org/show_bug.cgi?id=109291
[fdo#109301]: https://bugs.freedesktop.org/show_bug.cgi?id=109301
[fdo#109308]: https://bugs.freedesktop.org/show_bug.cgi?id=109308
[fdo#109310]: https://bugs.freedesktop.org/show_bug.cgi?id=109310
[fdo#109352]: https://bugs.freedesktop.org/show_bug.cgi?id=109352
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#109660]: https://bugs.freedesktop.org/show_bug.cgi?id=109660
[fdo#110037]: https://bugs.freedesktop.org/show_bug.cgi?id=110037
[fdo#110206]: https://bugs.freedesktop.org/show_bug.cgi?id=110206
[fdo#110215]: https://bugs.freedesktop.org/show_bug.cgi?id=110215
[fdo#110281]: https://bugs.freedesktop.org/show_bug.cgi?id=110281
[fdo#110321]: https://bugs.freedesktop.org/show_bug.cgi?id=110321
[fdo#110336]: https://bugs.freedesktop.org/show_bug.cgi?id=110336
[fdo#110376]: https://bugs.freedesktop.org/show_bug.cgi?id=110376
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912

Participating hosts (10 -> 6)
------------------------------

Missing (4): pig-skl-6260u shard-skl pig-hsw-4770r pig-glk-j5005

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

* IGT: IGT_4943 -> IGTPW_2842
* Piglit: piglit_4509 -> None

CI_DRM_5909: af07fbb536d0728e381cc001cac5bc259c41fe02 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2842: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2842/
IGT_4943: 5941f371b0fe25084d4b1c49882faa8d41d44c9f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2842/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev