APL: igt@prime_mmap_coherency@write - dmesg-warn - WARNING: possible circular locking dependency detected, is trying to acquire lock at: i915_request_wait, but task is already holding lock at: i915_gem_begin_cpu_access
https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_474/fi-apl-guc/igt@prime_mmap_coherency@write.html
6> [58.125704] Console: switching to colour dummy device 80x25
<6> [58.125851] [IGT] prime_mmap_coherency: executing
<6> [58.172952] [IGT] prime_mmap_coherency: starting subtest write
<4> [58.208596]
<4> [58.208607] ======================================================
<4> [58.208612] WARNING: possible circular locking dependency detected
<4> [58.208619] 5.6.0-gd0fda5c2cf3f1-drmtip_474+ #1 Tainted: G U
<4> [58.208625] ------------------------------------------------------
<4> [58.208630] prime_mmap_cohe/1017 is trying to acquire lock:
<4> [58.208636] ffff954913b8bd68 (>->reset.mutex){+.+.}, at: i915_request_wait+0xc9/0x890 [i915]
<4> [58.208763]
but task is already holding lock:
<4> [58.208768] ffff954914b70ed0 (reservation_ww_class_mutex){+.+.}, at: i915_gem_begin_cpu_access+0x7f/0x240 [i915]
<4> [58.208862]
which lock already depends on the new lock.
<4> [58.208869]
the existing dependency chain (in reverse order) is:
<4> [58.208875]
-> #6 (reservation_ww_class_mutex){+.+.}:
<4> [58.208887] __ww_mutex_lock.constprop.15+0xc3/0x1090
<4> [58.208893] ww_mutex_lock+0x39/0x70
<4> [58.208900] dma_resv_lockdep+0x10e/0x1f5
<4> [58.208907] do_one_initcall+0x58/0x300
<4> [58.208913] kernel_init_freeable+0x17b/0x1dc
<4> [58.208919] kernel_init+0x5/0x100
<4> [58.208924] ret_from_fork+0x3a/0x50
<4> [58.208929]
-> #5 (reservation_ww_class_acquire){+.+.}:
<4> [58.208938] dma_resv_lockdep+0xec/0x1f5
<4> [58.208943] do_one_initcall+0x58/0x300
<4> [58.208948] kernel_init_freeable+0x17b/0x1dc
<4> [58.208954] kernel_init+0x5/0x100
<4> [58.208959] ret_from_fork+0x3a/0x50
<4> [58.208963]
-> #4 (&mm->mmap_sem#2){++++}:
<4> [58.208973] __might_fault+0x63/0x90
<4> [58.208979] _copy_to_user+0x1e/0x80
<4> [58.208985] perf_read+0x200/0x2b0
<4> [58.208990] vfs_read+0x96/0x160
<4> [58.208995] ksys_read+0x9f/0xe0
<4> [58.209000] do_syscall_64+0x4f/0x240
<4> [58.209006] entry_SYSCALL_64_after_hwframe+0x49/0xbe
<4> [58.209013]
-> #3 (&cpuctx_mutex){+.+.}:
<4> [58.209021] __mutex_lock+0x9a/0x9c0
<4> [58.209027] perf_event_init_cpu+0xa4/0x140
<4> [58.209033] perf_event_init+0x1c9/0x1f9
<4> [58.209038] start_kernel+0x362/0x4eb
<4> [58.209043] secondary_startup_64+0xb6/0xc0
<4> [58.209048]
-> #2 (pmus_lock){+.+.}:
<4> [58.209055] __mutex_lock+0x9a/0x9c0
<4> [58.209061] perf_event_init_cpu+0x6b/0x140
<4> [58.209067] cpuhp_invoke_callback+0x9b/0x9d0
<4> [58.209073] _cpu_up+0xa2/0x140
<4> [58.209078] do_cpu_up+0x61/0xa0
<4> [58.209083] smp_init+0x57/0x96
<4> [58.209088] kernel_init_freeable+0x87/0x1dc
<4> [58.209093] kernel_init+0x5/0x100
<4> [58.209099] ret_from_fork+0x3a/0x50
<4> [58.209103]
-> #1 (cpu_hotplug_lock.rw_sem){++++}:
<4> [58.209111] cpus_read_lock+0x34/0xd0
<4> [58.209117] stop_machine+0x12/0x30
<4> [58.209213] bxt_vtd_ggtt_insert_entries__BKL+0x36/0x50 [i915]
<4> [58.209309] uc_fw_bind_ggtt+0xc6/0x270 [i915]
<4> [58.209403] intel_uc_fw_upload+0x85/0x5a0 [i915]
<4> [58.209497] __uc_init_hw+0x3b7/0x970 [i915]
<4> [58.209579] intel_gt_init_hw+0xe3/0x220 [i915]
<4> [58.209664] intel_gt_reset+0x33e/0x420 [i915]
<4> [58.209750] intel_gt_reset_global+0xec/0x160 [i915]
<4> [58.209836] intel_gt_handle_error+0x199/0x3e0 [i915]
<4> [58.209915] i915_wedged_set+0x5b/0xc0 [i915]
<4> [58.209923] simple_attr_write+0xb0/0xd0
<4> [58.209929] full_proxy_write+0x51/0x80
<4> [58.209934] vfs_write+0xb9/0x1d0
<4> [58.209939] ksys_write+0x9f/0xe0
<4> [58.209944] do_syscall_64+0x4f/0x240
<4> [58.209950] entry_SYSCALL_64_after_hwframe+0x49/0xbe
<4> [58.209955]
-> #0 (>->reset.mutex){+.+.}:
<4> [58.209964] __lock_acquire+0x1328/0x15d0
<4> [58.209970] lock_acquire+0xa7/0x1c0
<4> [58.210063] i915_request_wait+0xf8/0x890 [i915]
<4> [58.210159] i915_gem_object_wait+0x27c/0x540 [i915]
<4> [58.210249] i915_gem_object_set_to_cpu_domain+0x2f/0x150 [i915]
<4> [58.210339] i915_gem_begin_cpu_access+0x15f/0x240 [i915]
<4> [58.210347] dma_buf_begin_cpu_access+0x1e/0x60
<4> [58.210353] dma_buf_ioctl+0x190/0x200
<4> [58.210359] ksys_ioctl+0x7b/0x90
<4> [58.210364] __x64_sys_ioctl+0x11/0x20
<4> [58.210370] do_syscall_64+0x4f/0x240
<4> [58.210376] entry_SYSCALL_64_after_hwframe+0x49/0xbe
<4> [58.210381]
other info that might help us debug this:
<4> [58.210388] Chain exists of:
>->reset.mutex --> reservation_ww_class_acquire --> reservation_ww_class_mutex
<4> [58.210400] Possible unsafe locking scenario:
<4> [58.210405] CPU0 CPU1
<4> [58.210410] ---- ----
<4> [58.210414] lock(reservation_ww_class_mutex);
<4> [58.210419] lock(reservation_ww_class_acquire);
<4> [58.210426] lock(reservation_ww_class_mutex);
<4> [58.210432] lock(>->reset.mutex);
<4> [58.210436]
*** DEADLOCK ***