Bug 86992 - [all Regression]igt/gem_ctx_exec/reset-pin-leak causes system hang
Summary: [all Regression]igt/gem_ctx_exec/reset-pin-leak causes system hang
Status: CLOSED FIXED
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:
Keywords: bisect_pending
Depends on:
Blocks:
 
Reported: 2014-12-04 03:25 UTC by Guo Jinxian
Modified: 2017-10-06 14:33 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg (96.37 KB, text/plain)
2014-12-04 03:25 UTC, Guo Jinxian
no flags Details

Description Guo Jinxian 2014-12-04 03:25:46 UTC
Created attachment 110438 [details]
dmesg

==System Environment==
--------------------------
Regression: Yes.
Good commit on -next-queued: a259953ea9b7c86e437e0a620d37aad150a00b8f(2014_11_25)

Non-working platforms: BYT

==kernel==
--------------------------
origin/drm-intel-nightly: 2014_12_04(fails)
origin/drm-intel-next-queued:6c930688cb04e81ca71092baf585f7ea1c670368(fails)
    drm/i915/skl: Update the DDI translation values for DP/eDP 1.3
origin/drm-intel-fixes: b0616c5306b342ceca07044dbc4f917d95c4f825(works)
    drm/i915: Unlock panel even when LVDS is disabled

==Bug detailed description==
-----------------------------
igt/gem_ctx_exec/reset-pin-leak causes system hang

Output:
root@x-bytm02:/GFX/Test/Intel_gpu_tools/intel-gpu-tools/tests# ./gem_ctx_exec --run-subtest reset-pin-leak
IGT-Version: 1.8-g4e5c16c (x86_64) (Linux: 3.18.0-rc7_drm-intel-nightly_691817_20141202+ x86_64)
Test assertion failure function __real_main174, file gem_ctx_exec.c:224:
Failed assertion: exec(fd, handle, I915_EXEC_RENDER, ctx_id) == 0
Last errno: 14, Bad address
Subtest reset-pin-leak: FAIL (24.082s)
Warning on condition flags != 0 in fucntion check_stop_rings, file drmtest.c:112
i915_ring_stop flags on exit 0x400000ff, can't quiescent gpu cleanly


==Reproduce steps==
---------------------------- 
1. ./gem_ctx_exec --run-subtest reset-pin-leak
Comment 1 Guo Jinxian 2014-12-04 05:23:07 UTC
The failure is able to reproduce on IVB too.
Comment 2 lu hua 2014-12-04 07:49:12 UTC
I meet this hang on all platforms.
Comment 3 Daniel Vetter 2014-12-05 20:43:19 UTC
commit f4cbb3a5f707ae4155beaf103adf50351f6509a0
Author: John Harrison <John.C.Harrison@Intel.com>
Date:   Fri Dec 5 13:49:34 2014 +0000

    drm/i915: Zero fill the request structure
    
    There is a general theory that kzmalloc is better/safer than kmalloc, especially
    for interesting data structures. This change updates the request structure
    allocation to be zero filled.
    
    This also fixes crashes in the reset code. Quoting Mika's patch:
    
    "Clean the request structure on alloc. Otherwise we might end up
    referencing uninitialized fields.  This is apparent when we try to
    cleanup the preallocated request on ring reset, before any request has
    been submitted to the ring.  The request->ctx is foobar and we end up
    freeing the foobarness."
    
    Note that this fixes a regression introduced in
    
    commit 9eba5d4a1d79d5094321469479b4dbe418f60110
    Author: John Harrison <John.C.Harrison@Intel.com>
    Date:   Mon Nov 24 18:49:23 2014 +0000
    
        drm/i915: Ensure OLS & PLR are always in sync
    
    References: https://bugs.freedesktop.org/show_bug.cgi?id=86959
    References: https://bugs.freedesktop.org/show_bug.cgi?id=86962
    References: https://bugs.freedesktop.org/show_bug.cgi?id=86992
    Change-Id: I68715ef758025fab8db763941ef63bf60d7031e2
    For: VIZ-4377
    Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
    Reviewed-by: Thomas Daniel <Thomas.Daniel@intel.com>
    Cc: Mika Kuoppala <mika.kuoppala@intel.com>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Comment 4 Guo Jinxian 2014-12-08 03:04:13 UTC
Verified on latest -nightly(bfdd01aa1825aa0068f9236b21362b550f6d630f)

[root@x-hsw27 tests]# ./gem_ctx_exec --run-subtest reset-pin-leak
IGT-Version: 1.8-g819e68f (x86_64) (Linux: 3.18.0-rc7_drm-intel-nightly_bfdd01_20141208+ x86_64)
Subtest reset-pin-leak: SUCCESS (119.690s)
Comment 5 Elizabeth 2017-10-06 14:33:19 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.