Bug 73652 - [SNB/IVB/HSW/BYT/BDW]igt/gem_reset_stats causes *ERROR* context hanging too fast, declaring banned!
Summary: [SNB/IVB/HSW/BYT/BDW]igt/gem_reset_stats causes *ERROR* context hanging too f...
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium normal
Assignee: Mika Kuoppala
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
: 73653 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-01-15 07:50 UTC by lu hua
Modified: 2017-10-06 14:40 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg (93.20 KB, text/plain)
2014-01-15 07:50 UTC, lu hua
no flags Details
[PATCH] drm/i915/ppgtt: Limit guilty hunt inside of relevant vm (1.88 KB, patch)
2014-01-15 08:24 UTC, Mika Kuoppala
no flags Details | Splinter Review

Description lu hua 2014-01-15 07:50:29 UTC
Created attachment 92117 [details]
dmesg

System Environment:
--------------------------
Platform: SNB/IVB/HSW/BYT
kernel:   (drm-intel-nightly)07db3e0b8568d81226e2e17dbb1b340668cb2287

Bug detailed description:
-------------------------
Run ./gem_reset_stats --run-subtest ban, <3>[   88.707592] [drm:i915_context_is_banned] *ERROR* context hanging too fast, declaring banned! appears.
It always has this issue.

output:
IGT-Version: 1.5-g1552aa2 (x86_64) (Linux: 3.13.0-rc7_drm-intel-nightly_07db3e_20140115+ x86_64)
4:1 reset status 1 differs from assumed 2
Test assertion failure function test_ban, file gem_reset_stats.c:528:
Last errno: 5, Input/output error
Failed assertion: _assert_reset_status(fd, ctx_good, (1 << 1)) == 0
Subtest ban: FAIL

Reproduce steps:
----------------------------
1. ./gem_reset_stats --run-subtest ban
Comment 1 Mika Kuoppala 2014-01-15 08:22:26 UTC
The error message in dmesg is byproduct of the test. Daniel, do we want to suppress also the message which states that context has been banned access?
Comment 2 Mika Kuoppala 2014-01-15 08:24:46 UTC
Created attachment 92122 [details] [review]
[PATCH] drm/i915/ppgtt: Limit guilty hunt inside of relevant vm

Could you please check if attached patch works with this test?
Comment 3 Mika Kuoppala 2014-01-15 08:27:02 UTC
*** Bug 73653 has been marked as a duplicate of this bug. ***
Comment 4 lu hua 2014-01-16 05:17:48 UTC
(In reply to comment #2)
> Created attachment 92122 [details] [review] [review]
> [PATCH] drm/i915/ppgtt: Limit guilty hunt inside of relevant vm
> 
> Could you please check if attached patch works with this test?

Test this patch:
run: ./gem_reset_stats --run-subtest ban
output:
IGT-Version: 1.5-ga896ef9 (x86_64) (Linux: 3.13.0-rc7_prts_c854dc_20140116 x86_64)
gem_reset_stats: drmtest.c:1126: igt_exit: Assertion `skipped_one || succeeded_one || failed_one' failed.
Aborted (core dumped)

run: ./gem_reset_stats
IGT-Version: 1.5-ga896ef9 (x86_64) (Linux: 3.13.0-rc7_prts_c854dc_20140116 x86_6
Subtest params: SUCCESS
Subtest reset-stats-render: SUCCESS
Subtest reset-stats-ctx-render: SUCCESS
Subtest ban-render: SUCCESS
Subtest ban-ctx-render: SUCCESS
Subtest reset-count-render: SUCCESS
Subtest reset-count-ctx-render: SUCCESS
Subtest unrelated-ctx-render: SUCCESS
Test assertion failure function gem_set_domain, file drmtest.c:535:
Last errno: 5, Input/output error
Failed assertion: drmIoctl((fd), ((((1U) << (((0+8)+8)+14)) | ((('d')) << (0+8))domain)) == 0
Subtest close-pending-render: FAIL
Comment 5 Mika Kuoppala 2014-01-17 10:01:44 UTC
(In reply to comment #4)
> (In reply to comment #2)
> > Created attachment 92122 [details] [review] [review] [review]
> > [PATCH] drm/i915/ppgtt: Limit guilty hunt inside of relevant vm
> > 
> > Could you please check if attached patch works with this test?
> 
> Test this patch:
> run: ./gem_reset_stats --run-subtest ban

The subtest names have changed to include ring, so this one is
now ban-render.

> output:
> IGT-Version: 1.5-ga896ef9 (x86_64) (Linux: 3.13.0-rc7_prts_c854dc_20140116
> x86_64)
> gem_reset_stats: drmtest.c:1126: igt_exit: Assertion `skipped_one ||
> succeeded_one || failed_one' failed.
> Aborted (core dumped)
> 
> run: ./gem_reset_stats
> IGT-Version: 1.5-ga896ef9 (x86_64) (Linux: 3.13.0-rc7_prts_c854dc_20140116
> x86_6
> Subtest params: SUCCESS
> Subtest reset-stats-render: SUCCESS
> Subtest reset-stats-ctx-render: SUCCESS
> Subtest ban-render: SUCCESS
> Subtest ban-ctx-render: SUCCESS

Which seems to work now.

> Subtest reset-count-render: SUCCESS
> Subtest reset-count-ctx-render: SUCCESS
> Subtest unrelated-ctx-render: SUCCESS
> Test assertion failure function gem_set_domain, file drmtest.c:535:
> Last errno: 5, Input/output error
> Failed assertion: drmIoctl((fd), ((((1U) << (((0+8)+8)+14)) | ((('d')) <<
> (0+8))domain)) == 0
> Subtest close-pending-render: FAIL

close-pending-render FAIL is something else.
Comment 6 Mika Kuoppala 2014-01-22 13:33:33 UTC
> > Test assertion failure function gem_set_domain, file drmtest.c:535:
> > Last errno: 5, Input/output error
> > Failed assertion: drmIoctl((fd), ((((1U) << (((0+8)+8)+14)) | ((('d')) <<
> > (0+8))domain)) == 0
> > Subtest close-pending-render: FAIL
> 
> close-pending-render FAIL is something else.
                       ^

This was due to test stopping all rings instead of the ring being tested.
Fix was merged into i-g-t.
Comment 7 Mika Kuoppala 2014-01-24 07:48:52 UTC
*** Bug 74007 has been marked as a duplicate of this bug. ***
Comment 8 Mika Kuoppala 2014-02-05 14:48:44 UTC
Fixed by

commit b6b0fac04de9ae9b1559eddf8e9490f3c9a01885
Author: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Date:   Thu Jan 30 19:04:43 2014 +0200

    drm/i915: Use hangcheck score to find guilty context


The separate set_domain issue will be tracked in:
https://bugs.freedesktop.org/show_bug.cgi?id=74007
Comment 9 lu hua 2014-02-08 06:18:00 UTC
Test on latest igt and -nightly kernel.
This error goes away.
Verified.Fixed.
Comment 10 Elizabeth 2017-10-06 14:40:22 UTC
Closing old verified.


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.