Skip to contentSkip to conversation

igt_kmod: handle EPIPE on kmsg

PATCH In review Lucas De Marchi 3 participants 4 messages Sep 28, 2019 – Sep 29, 2019 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 igt_kmod: handle EPIPE on kmsg

If kmsg rotates due to a huge log, the read() will fail with EPIPE since the seek() we did is not valid anymore. When we get an EPIPE, the kernel will set our pointer to the last entry available, so just retry another read.

---
 lib/igt_kmod.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
lib/igt_kmod.c +8 -1
index 01faca39..c3da4667 100644
@@ -391,8 +391,15 @@ static void kmsg_dump(int fd)
 		if (r < 0) {
 			if (errno == EINTR)
 				continue;
+
+			if (errno == EPIPE) {
+				igt_warn("kmsg truncated: too many messages. You may want to increase log_buf_len in kmcdline\n");
+				continue;
+			}
+
 			if (errno != EAGAIN)
-				igt_warn("kmsg truncated due to unknown error: %m\n");
+				igt_warn("kmsg truncated: unknown error (%m)\n");
+
 			break;
 		}
 
Signature · 6 lines
2.23.0

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

[igt-dev] ✓ Fi.CI.BAT: success for igt_kmod: handle EPIPE on kmsg

== Series Details ==

== Series Details ==

Series: igt_kmod: handle EPIPE on kmsg
URL : https://patchwork.freedesktop.org/series/67360/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6973 -> IGTPW_3509
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_ctx_create@basic-files:
- fi-bxt-dsi: [PASS][1] -> [INCOMPLETE][2] ([fdo#103927])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/fi-bxt-dsi/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3509/fi-bxt-dsi/igt@[email protected]

* igt@gem_exec_reloc@basic-cpu-read-noreloc:
- fi-icl-u3: [PASS][3] -> [DMESG-WARN][4] ([fdo#107724])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/fi-icl-u3/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3509/fi-icl-u3/igt@[email protected]

* igt@kms_chamelium@dp-edid-read:
- fi-kbl-7500u: [PASS][5] -> [WARN][6] ([fdo#109483])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/fi-kbl-7500u/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3509/fi-kbl-7500u/igt@[email protected]

#### Possible fixes ####

* igt@gem_mmap@basic-small-bo:
- fi-icl-u3: [DMESG-WARN][7] ([fdo#107724]) -> [PASS][8] +1 similar issue
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/fi-icl-u3/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3509/fi-icl-u3/igt@[email protected]

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

[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#109483]: https://bugs.freedesktop.org/show_bug.cgi?id=109483
[fdo#111736]: https://bugs.freedesktop.org/show_bug.cgi?id=111736

Participating hosts (53 -> 45)
------------------------------

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

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

* CI: CI-20190529 -> None
* IGT: IGT_5206 -> IGTPW_3509

CI-20190529: 20190529
CI_DRM_6973: 7462c58bba0fb6e85bd380591c3fd86e298c0f95 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3509: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3509/index.html
IGT_5206: 5a6c68568def840cd720f18fc66f529a89f84675 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

#2 lore raw

[igt-dev] ✗ Fi.CI.IGT: failure for igt_kmod: handle EPIPE on kmsg

In reply to Lucas De Marchi
== Series Details ==

== Series Details ==

Series: igt_kmod: handle EPIPE on kmsg
URL : https://patchwork.freedesktop.org/series/67360/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_6973_full -> IGTPW_3509_full
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with IGTPW_3509_full absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in IGTPW_3509_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

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

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_schedule@reorder-wide-bsd:
- shard-iclb: [PASS][1] -> [SKIP][2] ([fdo#111325]) +2 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-iclb6/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3509/shard-iclb2/igt@[email protected]

* igt@i915_pm_rpm@gem-evict-pwrite:
- shard-iclb: [PASS][3] -> [INCOMPLETE][4] ([fdo#107713] / [fdo#108840])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-iclb1/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3509/shard-iclb1/igt@[email protected]

* igt@i915_suspend@fence-restore-tiled2untiled:
- shard-apl: [PASS][5] -> [DMESG-WARN][6] ([fdo#108566]) +4 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-apl3/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3509/shard-apl5/igt@[email protected]

* igt@kms_cursor_crc@pipe-b-cursor-64x21-sliding:
- shard-apl: [PASS][7] -> [FAIL][8] ([fdo#103232])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-apl6/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3509/shard-apl7/igt@[email protected]
- shard-kbl: [PASS][9] -> [FAIL][10] ([fdo#103232])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-kbl1/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3509/shard-kbl3/igt@[email protected]

* igt@kms_flip@flip-vs-suspend:
- shard-iclb: [PASS][11] -> [INCOMPLETE][12] ([fdo#107713] / [fdo#109507])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-iclb6/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3509/shard-iclb3/igt@[email protected]

* igt@kms_flip@flip-vs-suspend-interruptible:
- shard-hsw: [PASS][13] -> [INCOMPLETE][14] ([fdo#103540])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-hsw1/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3509/shard-hsw5/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-pwrite:
- shard-iclb: [PASS][15] -> [FAIL][16] ([fdo#103167]) +4 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-iclb2/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-pwrite.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3509/shard-iclb2/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-pwrite.html

* igt@kms_psr@no_drrs:
- shard-iclb: [PASS][17] -> [FAIL][18] ([fdo#108341])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-iclb8/igt@kms_psr@no_drrs.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3509/shard-iclb1/igt@kms_psr@no_drrs.html

* igt@kms_psr@psr2_cursor_render:
- shard-iclb: [PASS][19] -> [SKIP][20] ([fdo#109441]) +1 similar issue
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-iclb2/igt@kms_psr@psr2_cursor_render.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3509/shard-iclb6/igt@kms_psr@psr2_cursor_render.html

* igt@perf@oa-exponents:
- shard-glk: [PASS][21] -> [FAIL][22] ([fdo#105483])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-glk5/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3509/shard-glk7/igt@[email protected]

* igt@prime_busy@hang-bsd2:
- shard-iclb: [PASS][23] -> [SKIP][24] ([fdo#109276]) +20 similar issues
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-iclb2/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3509/shard-iclb6/igt@[email protected]

#### Possible fixes ####

* igt@gem_exec_balancer@smoke:
- shard-iclb: [SKIP][25] ([fdo#110854]) -> [PASS][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-iclb7/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3509/shard-iclb2/igt@[email protected]

* igt@gem_exec_schedule@out-order-bsd2:
- shard-iclb: [SKIP][27] ([fdo#109276]) -> [PASS][28] +14 similar issues
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-iclb8/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3509/shard-iclb1/igt@[email protected]

* igt@gem_exec_schedule@preemptive-hang-bsd:
- shard-iclb: [SKIP][29] ([fdo#111325]) -> [PASS][30] +7 similar issues
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-iclb4/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3509/shard-iclb5/igt@[email protected]

* igt@i915_pm_rpm@system-suspend-execbuf:
- shard-iclb: [DMESG-WARN][31] -> [PASS][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-iclb1/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3509/shard-iclb1/igt@[email protected]

* igt@i915_suspend@sysfs-reader:
- shard-apl: [DMESG-WARN][33] ([fdo#108566]) -> [PASS][34] +3 similar issues
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-apl4/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3509/shard-apl3/igt@[email protected]

* igt@kms_cursor_legacy@all-pipes-torture-move:
- shard-kbl: [DMESG-WARN][35] ([fdo#107122]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-kbl3/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3509/shard-kbl1/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-rgb565-draw-pwrite:
- shard-iclb: [FAIL][37] ([fdo#103167]) -> [PASS][38] +2 similar issues
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-iclb2/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3509/shard-iclb6/igt@[email protected]

* igt@kms_plane_lowres@pipe-a-tiling-x:
- shard-iclb: [FAIL][39] ([fdo#103166]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-iclb6/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3509/shard-iclb4/igt@[email protected]

* igt@kms_psr@psr2_no_drrs:
- shard-iclb: [SKIP][41] ([fdo#109441]) -> [PASS][42] +2 similar issues
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-iclb7/igt@kms_psr@psr2_no_drrs.html
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3509/shard-iclb2/igt@kms_psr@psr2_no_drrs.html

* igt@kms_vblank@pipe-c-query-idle-hang:
- shard-apl: [INCOMPLETE][43] ([fdo#103927]) -> [PASS][44] +1 similar issue
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-apl8/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3509/shard-apl5/igt@[email protected]

* igt@kms_vblank@pipe-c-ts-continuation-suspend:
- shard-iclb: [DMESG-WARN][45] ([fdo#111764]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-iclb1/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3509/shard-iclb5/igt@[email protected]

#### Warnings ####

* igt@gem_ctx_isolation@vcs1-nonpriv:
- shard-iclb: [SKIP][47] ([fdo#109276]) -> [FAIL][48] ([fdo#111329])
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-iclb8/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3509/shard-iclb4/igt@[email protected]

* igt@gem_mocs_settings@mocs-settings-bsd2:
- shard-iclb: [FAIL][49] ([fdo#111330]) -> [SKIP][50] ([fdo#109276])
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/shard-iclb2/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3509/shard-iclb5/igt@[email protected]

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

[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
[fdo#105483]: https://bugs.freedesktop.org/show_bug.cgi?id=105483
[fdo#107122]: https://bugs.freedesktop.org/show_bug.cgi?id=107122
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[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#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109507]: https://bugs.freedesktop.org/show_bug.cgi?id=109507
[fdo#110854]: https://bugs.freedesktop.org/show_bug.cgi?id=110854
[fdo#111325]: https://bugs.freedesktop.org/show_bug.cgi?id=111325
[fdo#111329]: https://bugs.freedesktop.org/show_bug.cgi?id=111329
[fdo#111330]: https://bugs.freedesktop.org/show_bug.cgi?id=111330
[fdo#111764]: https://bugs.freedesktop.org/show_bug.cgi?id=111764
[fdo#111781]: https://bugs.freedesktop.org/show_bug.cgi?id=111781
[fdo#111795 ]: https://bugs.freedesktop.org/show_bug.cgi?id=111795

Participating hosts (16 -> 6)
------------------------------

ERROR: It appears as if the changes made in IGTPW_3509_full prevented too many machines from booting.

Missing (10): shard-skl pig-hsw-4770r shard-tglb1 shard-tglb2 shard-tglb3 shard-tglb4 shard-tglb5 shard-tglb6 pig-glk-j5005 pig-skl-6260u

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

* CI: CI-20190529 -> None
* IGT: IGT_5206 -> IGTPW_3509
* Piglit: piglit_4509 -> None

CI-20190529: 20190529
CI_DRM_6973: 7462c58bba0fb6e85bd380591c3fd86e298c0f95 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3509: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3509/index.html
IGT_5206: 5a6c68568def840cd720f18fc66f529a89f84675 @ 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_3509/index.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

Reviewed-by on v1 1/1
#3 lore raw
In reply to Lucas De Marchi

Quoting Lucas De Marchi (2019-09-28 01:16:09)

Quoted 15 lines

If kmsg rotates due to a huge log, the read() will fail with EPIPE since the seek() we did is not valid anymore. When we get an EPIPE, the kernel will set our pointer to the last entry available, so just retry another read.

---
 lib/igt_kmod.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
lib/igt_kmod.c +0 -0
index 01faca39..c3da4667 100644

lib/igt_kmod.c static void kmsg_dump(int fd) · line 397

Quoted 7 lines
lib/igt_kmod.c +4 -0
@@ -391,8 +391,15 @@ static void kmsg_dump(int fd)
                if (r < 0) {
                        if (errno == EINTR)
                                continue;
+
+                       if (errno == EPIPE) {
+                               igt_warn("kmsg truncated: too many messages. You may want to increase log_buf_len in kmcdline\n");
+                               continue;

devkmsg_read():

        if (user->seq < log_first_seq) {
                /* our last seen message is gone, return error and reset */
                user->idx = log_first_idx;
                user->seq = log_first_seq;
                ret = -EPIPE;
                logbuf_unlock_irq();
                goto out;
        }

so singleshot indeed.

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