Bug 110836

Summary: [CI][SHARDS] igt@gem_ctx_(clone|param)@vm - dmesg-warn - GEM_BUG_ON(i915_vma_is_pinned(vma))
Product: DRI Reporter: Martin Peres <martin.peres>
Component: DRM/IntelAssignee: Intel GFX Bugs mailing list <intel-gfx-bugs>
Status: RESOLVED FIXED QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: normal    
Priority: high CC: intel-gfx-bugs, lakshminarayana.vudum
Version: XOrg git   
Hardware: Other   
OS: All   
Whiteboard: ReadyForDev
i915 platform: BYT, HSW, IVB i915 features: GEM/Other

Description Martin Peres 2019-06-04 14:00:40 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5032/shard-hsw5/igt@gem_ctx_param@vm.html

<5> [1022.740920] Setting dangerous option reset - tainting kernel
<3> [1022.741237] i915_vma_destroy:849 GEM_BUG_ON(i915_vma_is_pinned(vma))
<4> [1022.741306] ------------[ cut here ]------------
<2> [1022.741307] kernel BUG at drivers/gpu/drm/i915/i915_vma.c:849!
<4> [1022.741323] invalid opcode: 0000 [#1] PREEMPT SMP PTI
<4> [1022.741328] CPU: 2 PID: 4918 Comm: kworker/2:5 Tainted: G     U            5.2.0-rc2-CI-CI_DRM_6182+ #1
<4> [1022.741334] Hardware name: MSI MS-7924/Z97M-G43(MS-7924), BIOS V1.12 02/15/2016
<4> [1022.741379] Workqueue: events gen6_ppgtt_cleanup_work [i915]
<4> [1022.741414] RIP: 0010:i915_vma_destroy+0x204/0x3a0 [i915]
<4> [1022.741418] Code: 7b 41 f0 e0 48 8b 35 93 84 1b 00 49 c7 c0 86 89 34 a0 b9 51 03 00 00 48 c7 c2 60 43 2f a0 48 c7 c7 5f 4a 22 a0 e8 dc 06 f7 e0 <0f> 0b 48 8d bb 10 02 00 00 e8 0e 56 2b e1 84 c0 75 3d 48 b8 00 01
<4> [1022.741430] RSP: 0018:ffffc90000897e38 EFLAGS: 00010282
<4> [1022.741434] RAX: 000000000000000c RBX: ffff888400465840 RCX: 0000000000000000
<4> [1022.741439] RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffff88840d92ea48
<4> [1022.741444] RBP: ffff8883fbee97a8 R08: 0000000000003129 R09: ffff88840dbcb000
<4> [1022.741449] R10: ffffc90000897e50 R11: ffff88840d92ea48 R12: ffff88840ff39740
<4> [1022.741454] R13: ffff88840ff3da00 R14: 0000000000000000 R15: 0000000000000000
<4> [1022.741459] FS:  0000000000000000(0000) GS:ffff88840ff00000(0000) knlGS:0000000000000000
<4> [1022.741464] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
<4> [1022.741469] CR2: 00007ffc877f4c38 CR3: 0000000005210001 CR4: 00000000001606e0
<4> [1022.741474] Call Trace:
<4> [1022.741505]  gen6_ppgtt_cleanup_work+0x2e/0x40 [i915]
<4> [1022.741512]  process_one_work+0x245/0x610
<4> [1022.741517]  worker_thread+0x37/0x380
<4> [1022.741521]  ? process_one_work+0x610/0x610
<4> [1022.741526]  kthread+0x119/0x130
<4> [1022.741530]  ? kthread_park+0x80/0x80
<4> [1022.741535]  ret_from_fork+0x3a/0x50
<4> [1022.741540] Modules linked in: vgem snd_hda_codec_hdmi i915 mei_hdcp x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul snd_hda_codec_realtek snd_hda_codec_generic ghash_clmulni_intel snd_hda_intel snd_hda_codec snd_hwdep snd_hda_core r8169 snd_pcm lpc_ich realtek mei_me mei prime_numbers
[...]
<0> [1022.773042] ---------------------------------
<4> [1022.773072] ---[ end trace a299d1083fc9b621 ]---
Comment 1 CI Bug Log 2019-06-04 14:01:03 UTC
The CI Bug Log issue associated to this bug has been updated.

### New filters associated

* HSW: igt@gem_ctx_(clone|param)@vm - dmesg-warn - GEM_BUG_ON(i915_vma_is_pinned(vma))
  - https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5032/shard-hsw1/igt@gem_ctx_clone@vm.html
  - https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5032/shard-hsw5/igt@gem_ctx_param@vm.html
Comment 2 Chris Wilson 2019-06-04 15:46:18 UTC
https://patchwork.freedesktop.org/series/61595/
Comment 3 Chris Wilson 2019-06-06 15:20:34 UTC
commit 1fe2d6f94f96e35f0d71721eb899f5f72d5b68bd
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Jun 4 16:24:08 2019 +0100

    drm/i915: Skip context_barrier emission for unused contexts
    
    The intent was to skip unused HW contexts by checking ce->state.
    However, this only works for execlists where the ppGTT pointers is
    stored inside the HW context. For gen7, the ppGTT is alongside the
    logical state and must be updated on all active engines but, crucially,
    only on active engines. As we need different checks, and to keep
    context_barrier_task() agnostic, pass in the predicate.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110836
    Fixes: 62c8e423450d ("drm/i915: Skip unused contexts for context_barrier_task()")
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
    Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
    Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20190604152408.24468-1-chris@chris-wilson.co.uk
Comment 4 Chris Wilson 2019-06-10 10:43:20 UTC
*** Bug 110875 has been marked as a duplicate of this bug. ***
Comment 5 CI Bug Log 2019-06-10 10:45:06 UTC
A CI Bug Log filter associated to this bug has been updated:

{- HSW: igt@gem_ctx_(clone|param)@vm - dmesg-warn - GEM_BUG_ON(i915_vma_is_pinned(vma)) -}
{+ BYT IVB HSW: igt@gem_ctx_(clone|param)@vm - dmesg-warn - GEM_BUG_ON(i915_vma_is_pinned(vma)) +}


  No new failures caught with the new filter
Comment 6 CI Bug Log 2019-08-14 13:50:34 UTC
The CI Bug Log issue associated to this bug has been archived.

New failures matching the above filters will not be associated to this bug anymore.
Comment 7 Martin Peres 2019-08-14 13:51:00 UTC
(In reply to Chris Wilson from comment #3)
> commit 1fe2d6f94f96e35f0d71721eb899f5f72d5b68bd
> Author: Chris Wilson <chris@chris-wilson.co.uk>
> Date:   Tue Jun 4 16:24:08 2019 +0100
> 
>     drm/i915: Skip context_barrier emission for unused contexts
>     
>     The intent was to skip unused HW contexts by checking ce->state.
>     However, this only works for execlists where the ppGTT pointers is
>     stored inside the HW context. For gen7, the ppGTT is alongside the
>     logical state and must be updated on all active engines but, crucially,
>     only on active engines. As we need different checks, and to keep
>     context_barrier_task() agnostic, pass in the predicate.
>     
>     Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110836
>     Fixes: 62c8e423450d ("drm/i915: Skip unused contexts for
> context_barrier_task()")
>     Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>     Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>     Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
>     Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>     Link:
> https://patchwork.freedesktop.org/patch/msgid/20190604152408.24468-1-
> chris@chris-wilson.co.uk

Thanks! It fixed the issue :)

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.