Bug 106453 - [CI][drv_selftest] WARN_ON(debug_locks && !lock_is_held(&(&i915->drm.struct_mutex)->dep_map))
Summary: [CI][drv_selftest] WARN_ON(debug_locks && !lock_is_held(&(&i915->drm.struct_m...
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Intel GFX Bugs mailing list
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-09 09:38 UTC by Tomi Sarvela
Modified: 2018-05-16 07:09 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Tomi Sarvela 2018-05-09 09:38:10 UTC
Recent DRM-Tip change unearthed a drv_selftest issue. Dmesg splat below.


[   59.833521] Setting dangerous option mock_selftests - tainting kernel
[   59.850298] ------------[ cut here ]------------
[   59.850300] WARN_ON(debug_locks && !lock_is_held(&(&i915->drm.struct_mutex)->dep_map))
[   59.850369] WARNING: CPU: 7 PID: 1421 at drivers/gpu/drm/i915/i915_timeline.c:16 i915_timeline_init+0xe7/0xf0 [i915]
[   59.850370] Modules linked in: i915(+) snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic x86_pkg_temp_thermal intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel broadcom bcm_phy_lib tg3 snd_hda_codec snd_hwdep lpc_ich snd_hda_core snd_pcm mei_me mei prime_numbers [last unloaded: i915]
[   59.850400] CPU: 7 PID: 1421 Comm: drv_selftest Tainted: G     U            4.17.0-rc4-CI-CI_DRM_4160+ #1
[   59.850401] Hardware name: Dell Inc. XPS 8300  /0Y2MRG, BIOS A06 10/17/2011
[   59.850437] RIP: 0010:i915_timeline_init+0xe7/0xf0 [i915]
[   59.850438] RSP: 0018:ffffc900003f3bc0 EFLAGS: 00010282
[   59.850441] RAX: 0000000000000000 RBX: ffff8802119dc030 RCX: 0000000000000001
[   59.850442] RDX: 0000000080000001 RSI: ffffffff821219a1 RDI: 00000000ffffffff
[   59.850444] RBP: ffff88020f8f0900 R08: 0000000000000001 R09: 0000000000000000
[   59.850445] R10: 0000000000000000 R11: 0000000000000000 R12: ffff8802119dc008
[   59.850446] R13: ffff88020f8f0900 R14: ffff8802119dc030 R15: ffffc900003f3ea0
[   59.850448] FS:  00007f6ce2da1980(0000) GS:ffff88022fbc0000(0000) knlGS:0000000000000000
[   59.850450] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   59.850451] CR2: 00007f6ce24247a0 CR3: 000000020fb68002 CR4: 00000000000606e0
[   59.850452] Call Trace:
[   59.850490]  mock_engine+0xbc/0x210 [i915]
[   59.850525]  mock_gem_device+0x3f8/0x5d0 [i915]
[   59.850560]  intel_breadcrumbs_mock_selftests+0x7/0x50 [i915]
[   59.850600]  __run_selftests+0x14d/0x190 [i915]
[   59.850602]  ? 0xffffffffa0685000
[   59.850639]  i915_mock_selftests+0x27/0x50 [i915]
[   59.850677]  i915_init+0x7/0x68 [i915]
[   59.850679]  ? 0xffffffffa0685000
[   59.850682]  do_one_initcall+0x58/0x370
[   59.850686]  ? do_init_module+0x1d/0x1ea
[   59.850689]  ? rcu_read_lock_sched_held+0x6f/0x80
[   59.850692]  ? kmem_cache_alloc_trace+0x282/0x2e0
[   59.850696]  do_init_module+0x56/0x1ea
[   59.850699]  load_module+0x2435/0x2b20
[   59.850711]  ? __se_sys_finit_module+0xd3/0xf0
[   59.850713]  __se_sys_finit_module+0xd3/0xf0
[   59.850720]  do_syscall_64+0x55/0x190
[   59.850723]  entry_SYSCALL_64_after_hwframe+0x49/0xbe
[   59.850725] RIP: 0033:0x7f6ce2452839
[   59.850726] RSP: 002b:00007fff65ebb4d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[   59.850729] RAX: ffffffffffffffda RBX: 00005635e7067cf0 RCX: 00007f6ce2452839
[   59.850730] RDX: 0000000000000000 RSI: 00005635e706d190 RDI: 0000000000000004
[   59.850732] RBP: 00005635e706d190 R08: 0000000000000004 R09: 0000000000000000
[   59.850733] R10: 00007fff65ebb640 R11: 0000000000000246 R12: 0000000000000000
[   59.850734] R13: 00005635e7068c00 R14: 0000000000000000 R15: 000000000000003f
[   59.850741] Code: 8d bf c8 00 00 00 be ff ff ff ff e8 64 54 c7 e0 85 c0 0f 85 4b ff ff ff 48 c7 c6 a0 61 58 a0 48 c7 c7 50 bc 56 a0 e8 f9 2c c1 e0 <0f> 0b e9 31 ff ff ff 66 90 8b 05 fa c4 e1 e1 55 48 89 fd 53 85 
[   59.850808] irq event stamp: 276174
[   59.850812] hardirqs last  enabled at (276173): [<ffffffff810f8226>] console_unlock+0x426/0x640
[   59.850814] hardirqs last disabled at (276174): [<ffffffff81a0111c>] error_entry+0x7c/0x100
[   59.850816] softirqs last  enabled at (276126): [<ffffffff817e49fc>] peernet2id+0x4c/0x70
[   59.850818] softirqs last disabled at (276124): [<ffffffff817e49dd>] peernet2id+0x2d/0x70
[   59.850852] WARNING: CPU: 7 PID: 1421 at drivers/gpu/drm/i915/i915_timeline.c:16 i915_timeline_init+0xe7/0xf0 [i915]
[   59.850853] ---[ end trace 870a4f089b494697 ]---
[   59.850988] ------------[ cut here ]------------
[   59.850989] WARN_ON(debug_locks && !lock_is_held(&(&i915->drm.struct_mutex)->dep_map))
[   59.851031] WARNING: CPU: 7 PID: 1421 at drivers/gpu/drm/i915/i915_timeline.c:16 i915_timeline_init+0xe7/0xf0 [i915]
[   59.851032] Modules linked in: i915(+) snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic x86_pkg_temp_thermal intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel broadcom bcm_phy_lib tg3 snd_hda_codec snd_hwdep lpc_ich snd_hda_core snd_pcm mei_me mei prime_numbers [last unloaded: i915]
[   59.851058] CPU: 7 PID: 1421 Comm: drv_selftest Tainted: G     U  W         4.17.0-rc4-CI-CI_DRM_4160+ #1
[   59.851060] Hardware name: Dell Inc. XPS 8300  /0Y2MRG, BIOS A06 10/17/2011
[   59.851092] RIP: 0010:i915_timeline_init+0xe7/0xf0 [i915]
[   59.851094] RSP: 0018:ffffc900003f3bc0 EFLAGS: 00010282
[   59.851096] RAX: 0000000000000000 RBX: ffff88021fed3448 RCX: 0000000000000001
[   59.851098] RDX: 0000000080000001 RSI: ffffffff821219a1 RDI: 00000000ffffffff
[   59.851099] RBP: ffff88020f8f0900 R08: 0000000000000001 R09: 0000000000000000
[   59.851101] R10: 0000000000000000 R11: 0000000000000000 R12: ffff8802119dc008
[   59.851102] R13: ffff88021fed3448 R14: ffff8802119dc030 R15: ffffc900003f3ea0
[   59.851104] FS:  00007f6ce2da1980(0000) GS:ffff88022fbc0000(0000) knlGS:0000000000000000
[   59.851105] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   59.851107] CR2: 00007f6ce24247a0 CR3: 000000020fb68002 CR4: 00000000000606e0
[   59.851108] Call Trace:
[   59.851143]  mock_engine+0x151/0x210 [i915]
[   59.851176]  mock_gem_device+0x3f8/0x5d0 [i915]
[   59.851210]  intel_breadcrumbs_mock_selftests+0x7/0x50 [i915]
[   59.851249]  __run_selftests+0x14d/0x190 [i915]
[   59.851251]  ? 0xffffffffa0685000
[   59.851287]  i915_mock_selftests+0x27/0x50 [i915]
[   59.851325]  i915_init+0x7/0x68 [i915]
[   59.851328]  ? 0xffffffffa0685000
[   59.851329]  do_one_initcall+0x58/0x370
[   59.851332]  ? do_init_module+0x1d/0x1ea
[   59.851334]  ? rcu_read_lock_sched_held+0x6f/0x80
[   59.851336]  ? kmem_cache_alloc_trace+0x282/0x2e0
[   59.851340]  do_init_module+0x56/0x1ea
[   59.851343]  load_module+0x2435/0x2b20
[   59.851355]  ? __se_sys_finit_module+0xd3/0xf0
[   59.851357]  __se_sys_finit_module+0xd3/0xf0
[   59.851364]  do_syscall_64+0x55/0x190
[   59.851366]  entry_SYSCALL_64_after_hwframe+0x49/0xbe
[   59.851368] RIP: 0033:0x7f6ce2452839
[   59.851369] RSP: 002b:00007fff65ebb4d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[   59.851372] RAX: ffffffffffffffda RBX: 00005635e7067cf0 RCX: 00007f6ce2452839
[   59.851373] RDX: 0000000000000000 RSI: 00005635e706d190 RDI: 0000000000000004
[   59.851375] RBP: 00005635e706d190 R08: 0000000000000004 R09: 0000000000000000
[   59.851376] R10: 00007fff65ebb640 R11: 0000000000000246 R12: 0000000000000000
[   59.851377] R13: 00005635e7068c00 R14: 0000000000000000 R15: 000000000000003f
[   59.851384] Code: 8d bf c8 00 00 00 be ff ff ff ff e8 64 54 c7 e0 85 c0 0f 85 4b ff ff ff 48 c7 c6 a0 61 58 a0 48 c7 c7 50 bc 56 a0 e8 f9 2c c1 e0 <0f> 0b e9 31 ff ff ff 66 90 8b 05 fa c4 e1 e1 55 48 89 fd 53 85 
[   59.851463] irq event stamp: 276242
[   59.851465] hardirqs last  enabled at (276241): [<ffffffff810f8226>] console_unlock+0x426/0x640
[   59.851467] hardirqs last disabled at (276242): [<ffffffff81a0111c>] error_entry+0x7c/0x100
[   59.851469] softirqs last  enabled at (276126): [<ffffffff817e49fc>] peernet2id+0x4c/0x70
[   59.851471] softirqs last disabled at (276124): [<ffffffff817e49dd>] peernet2id+0x2d/0x70
[   59.851504] WARNING: CPU: 7 PID: 1421 at drivers/gpu/drm/i915/i915_timeline.c:16 i915_timeline_init+0xe7/0xf0 [i915]
[   59.851506] ---[ end trace 870a4f089b494698 ]---
Comment 1 Chris Wilson 2018-05-09 09:49:40 UTC
commit 1d7a99f5148fdcdb9d40367d6d0668a34df161d4
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue May 8 22:10:56 2018 +0100

    drm/i915/selftests: Create mock_engine() under struct_mutex
    
    Calling mock_engine() calls i915_timeline_init() and that requires
    struct_mutex to be held as it adds itself to the global list of
    timelines. This error was introduced by commit a89d1f921c15 ("drm/i915:
    Split i915_gem_timeline into individual timelines") but the issue was
    masked in CI by the earlier lockdep spam.
    
    Fixes: a89d1f921c15 ("drm/i915: Split i915_gem_timeline into individual timelines")
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
    Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
    Cc: Michel Thierry <michel.thierry@intel.com>
    Reviewed-by: Michel Thierry <michel.thierry@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20180508211056.17151-1-chris@chris-wilson.co.uk


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.