Bug 103183 - [CI] igt@perf@short-reads -fail - Failed assertion: ret == -1
Summary: [CI] igt@perf@short-reads -fail - Failed assertion: ret == -1
Status: REOPENED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: DRI git
Hardware: Other All
: high critical
Assignee: Intel GFX Bugs mailing list
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard: ReadyForDev
Keywords:
: 106917 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-10-10 08:07 UTC by Marta Löfstedt
Modified: 2018-12-20 15:17 UTC (History)
2 users (show)

See Also:
i915 platform: KBL, SKL
i915 features: Perf/OA


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marta Löfstedt 2017-10-10 08:07:20 UTC
CI_DRM_3199 APL-shards igt@perf@short-reads

Fail:
(perf:2494) CRITICAL: Test assertion failure function test_short_reads, file perf.c:3125:
(perf:2494) CRITICAL: Failed assertion: ret == -1
(perf:2494) CRITICAL: error: 8 != -1
Subtest short-reads failed.

https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3199/shard-apl5/igt@perf@short-reads.html
Comment 1 mwa 2017-10-18 21:50:07 UTC
8bytes is exactly the size of the report header, so probably just a case of being unlucky with the read() giving us a REPORT_LOST, which just so happens to fit into the non-protected region so we don't get an EFAULT.

First thought would just be:

diff --git a/tests/perf.c b/tests/perf.c
index ad62319e..fe8e32bf 100644
--- a/tests/perf.c
+++ b/tests/perf.c
@@ -3121,7 +3121,13 @@ test_short_reads(void)
        /* A read that can't return a single record because it would result
         * in a fault on buffer overrun should result in an EFAULT error...
         */
-       ret = read(stream_fd, pages + page_size - 16, page_size);
+       do {
+               header = (void *)(pages + page_size - 16);
+               ret = read(stream_fd,
+                          header,
+                          page_size);
+       } while (header->type == DRM_I915_PERF_RECORD_OA_REPORT_LOST);
+
        igt_assert_eq(ret, -1);
        igt_assert_eq(errno, EFAULT);
Comment 2 Marta Löfstedt 2017-11-17 09:18:05 UTC
Last seen:shard-kbl: CI_DRM_3236: 2017-10-14 / 114 runs ago
shard-apl: CI_DRM_3206: 2017-10-11 / 145 runs ago
Comment 3 Marta Löfstedt 2017-12-04 08:15:05 UTC
Reproduced GLK-shards:

https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3445/shard-glkb1/igt@perf@short-reads.html

(perf:12770) CRITICAL: Test assertion failure function test_short_reads, file perf.c:3125:
(perf:12770) CRITICAL: Failed assertion: ret == -1
(perf:12770) CRITICAL: error: 8 != -1
Subtest short-reads failed.
Comment 4 Elizabeth 2018-03-05 20:07:05 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/igt@perf@short-reads.html
All green in CI and no new reports since December, can this be closed? Thank you.
Comment 5 Marta Löfstedt 2018-03-06 06:25:36 UTC
(In reply to Elizabeth from comment #4)
> https://intel-gfx-ci.01.org/tree/drm-tip/igt@perf@short-reads.html
> All green in CI and no new reports since December, can this be closed? Thank
> you.

The cut-off time for a CI generated bug is 1 month. Unless there is a real fix merged.
Comment 6 Lionel Landwerlin 2018-03-14 17:36:37 UTC
Sure, feel free to close.
One kernel patch that might have fixed this is :

commit 41d3fdcd15d5ecf29cc73e8b79c2327ebb54b960
Author: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Date:   Thu Mar 1 11:06:13 2018 +0000

    drm/i915/perf: fix perf stream opening lock
Comment 7 Marta Löfstedt 2018-04-16 07:13:20 UTC
Re-opened due to SKL:

https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_19/fi-skl-6260u/igt@perf@short-reads.html

(perf:1333) CRITICAL: Test assertion failure function test_short_reads, file ../tests/perf.c:2693:
(perf:1333) CRITICAL: Failed assertion: ret == -1
(perf:1333) CRITICAL: error: 8 != -1
Subtest short-reads failed.
Comment 8 Lakshmi 2018-09-04 09:36:06 UTC
This issue was seen last time two weeks ago. This issue occurs once in a week or two with drmtip/igt/CI DRM FULL. Do not close this issue until we get consistent results. Need to wait few weeks/months to close this issue.
Comment 9 Martin Peres 2018-09-07 07:37:25 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_105/fi-kbl-r/igt@perf@short-reads.html
	
(perf:1577) CRITICAL: Test assertion failure function test_short_reads, file ../tests/perf.c:2697:
(perf:1577) CRITICAL: Failed assertion: ret == -1
(perf:1577) CRITICAL: error: 8 != -1
Subtest short-reads failed.(pe
Comment 10 Martin Peres 2018-09-07 07:37:59 UTC
*** Bug 106917 has been marked as a duplicate of this bug. ***
Comment 11 Martin Peres 2018-12-20 15:17:01 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_157/fi-bxt-j4205/igt@perf@short-reads.html

Starting subtest: short-reads
(perf:2171) CRITICAL: Test assertion failure function test_short_reads, file ../tests/perf.c:2704:
(perf:2171) CRITICAL: Failed assertion: ret == -1
(perf:2171) CRITICAL: error: 8 != -1
Subtest short-reads failed.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.