Hi, I noticed this while testing the displayport output attached to the nvidia GPU on a Thinkpad P50 while the intel GPU was driving the LCD panel (and was the primary GPU according to Xorg). This was while logging into gnome-3 with Xorg-1.19-rc2, from gdm (also running on top of Xorg-1.19-rc2).
[ 23.892394] ====================================================== [ 23.892395] [ INFO: possible circular locking dependency detected ] [ 23.892397] 4.9.0-rc1+ #51 Not tainted [ 23.892398] ------------------------------------------------------- [ 23.892399] Xorg/1252 is trying to acquire lock: [ 23.892400] ( [ 23.892401] reservation_ww_class_mutex [ 23.892402] ){+.+.+.} [ 23.892403] , at: [ 23.892429] [<ffffffffc042bac4>] i915_gem_do_execbuffer.isra.46+0x1654/0x1c10 [i915] [ 23.892430] but task is already holding lock: [ 23.892431] ( [ 23.892432] &dev->struct_mutex [ 23.892433] ){+.+.+.} [ 23.892433] , at: [ 23.892447] [<ffffffffc0436be3>] i915_mutex_lock_interruptible+0x23/0x40 [i915] [ 23.892448] which lock already depends on the new lock. [ 23.892450] the existing dependency chain (in reverse order) is: [ 23.892451] -> #1 [ 23.892451] ( [ 23.892452] &dev->struct_mutex [ 23.892453] ){+.+.+.} [ 23.892453] : [ 23.892454] [ 23.892458] [<ffffffffaf1127e6>] lock_acquire+0xf6/0x1f0 [ 23.892459] [ 23.892470] [<ffffffffc0228ba5>] drm_gem_object_unreference_unlocked+0x45/0xe0 [drm] [ 23.892471] [ 23.892502] [<ffffffffc06198d5>] validate_fini_no_ticket+0x85/0xf0 [nouveau] [ 23.892503] [ 23.892525] [<ffffffffc061abb2>] nouveau_gem_ioctl_pushbuf+0x312/0x10c0 [nouveau] [ 23.892526] [ 23.892533] [<ffffffffc0229f2a>] drm_ioctl+0x37a/0x4e0 [drm] [ 23.892534] [ 23.892556] [<ffffffffc0611994>] nouveau_drm_ioctl+0x74/0xc0 [nouveau] [ 23.892557] [ 23.892559] [<ffffffffaf2beab3>] do_vfs_ioctl+0xa3/0x6f0 [ 23.892560] [ 23.892562] [<ffffffffaf2bf179>] SyS_ioctl+0x79/0x90 [ 23.892562] [ 23.892565] [<ffffffffaf90a941>] entry_SYSCALL_64_fastpath+0x1f/0xc2 [ 23.892566] -> #0 [ 23.892567] ( [ 23.892567] reservation_ww_class_mutex [ 23.892568] ){+.+.+.} [ 23.892569] : [ 23.892569] [ 23.892571] [<ffffffffaf1121ee>] __lock_acquire+0x10fe/0x1290 [ 23.892572] [ 23.892574] [<ffffffffaf1127e6>] lock_acquire+0xf6/0x1f0 [ 23.892574] [ 23.892576] [<ffffffffaf905e96>] mutex_lock_nested+0x86/0x3f0 [ 23.892577] [ 23.892592] [<ffffffffc042bac4>] i915_gem_do_execbuffer.isra.46+0x1654/0x1c10 [i915] [ 23.892592] [ 23.892605] [<ffffffffc042c4bf>] i915_gem_execbuffer2+0xcf/0x260 [i915] [ 23.892606] [ 23.892613] [<ffffffffc0229f2a>] drm_ioctl+0x37a/0x4e0 [drm] [ 23.892614] [ 23.892616] [<ffffffffaf2beab3>] do_vfs_ioctl+0xa3/0x6f0 [ 23.892617] [ 23.892619] [<ffffffffaf2bf179>] SyS_ioctl+0x79/0x90 [ 23.892619] [ 23.892621] [<ffffffffaf90a941>] entry_SYSCALL_64_fastpath+0x1f/0xc2 [ 23.892622] other info that might help us debug this: [ 23.892624] Possible unsafe locking scenario: [ 23.892626] CPU0 CPU1 [ 23.892627] ---- ---- [ 23.892628] lock( [ 23.892629] &dev->struct_mutex [ 23.892630] ); [ 23.892632] lock( [ 23.892633] reservation_ww_class_mutex [ 23.892634] ); [ 23.892634] lock( [ 23.892635] &dev->struct_mutex [ 23.892636] ); [ 23.892636] lock( [ 23.892637] reservation_ww_class_mutex [ 23.892638] ); [ 23.892639] *** DEADLOCK *** [ 23.892641] 1 lock held by Xorg/1252: [ 23.892641] #0: [ 23.892642] ( [ 23.892643] &dev->struct_mutex [ 23.892643] ){+.+.+.} [ 23.892644] , at: [ 23.892658] [<ffffffffc0436be3>] i915_mutex_lock_interruptible+0x23/0x40 [i915] [ 23.892659] stack backtrace: [ 23.892661] CPU: 0 PID: 1252 Comm: Xorg Not tainted 4.9.0-rc1+ #51 [ 23.892662] Hardware name: LENOVO 20EQS3R300/20EQS3R300, BIOS N1EET57W (1.30 ) 08/03/2016 [ 23.892663] ffff9e02032c79d0 ffffffffaf46b523 ffffffffb0bd6d30 ffffffffb0bd6d30 [ 23.892667] ffff9e02032c7a10 ffffffffaf10f85e 00000000af1f8000 ffff9262af1f8ce0 [ 23.892669] ffff9262af1f8000 ffff9262af1f8ca8 0000000000000001 0000000000000000 [ 23.892672] Call Trace: [ 23.892675] [<ffffffffaf46b523>] dump_stack+0x86/0xc3 [ 23.892677] [<ffffffffaf10f85e>] print_circular_bug+0x1be/0x210 [ 23.892679] [<ffffffffaf1121ee>] __lock_acquire+0x10fe/0x1290 [ 23.892681] [<ffffffffaf626fe1>] ? reservation_object_get_fences_rcu+0x201/0x4d0 [ 23.892683] [<ffffffffaf1127e6>] lock_acquire+0xf6/0x1f0 [ 23.892696] [<ffffffffc042bac4>] ? i915_gem_do_execbuffer.isra.46+0x1654/0x1c10 [i915] [ 23.892698] [<ffffffffaf905e96>] mutex_lock_nested+0x86/0x3f0 [ 23.892711] [<ffffffffc042bac4>] ? i915_gem_do_execbuffer.isra.46+0x1654/0x1c10 [i915] [ 23.892722] [<ffffffffc042bac4>] ? i915_gem_do_execbuffer.isra.46+0x1654/0x1c10 [i915] [ 23.892734] [<ffffffffc042a3b2>] ? i915_vma_move_to_active+0x152/0x210 [i915] [ 23.892745] [<ffffffffc042bac4>] i915_gem_do_execbuffer.isra.46+0x1654/0x1c10 [i915] [ 23.892752] [<ffffffffc0228b6a>] ? drm_gem_object_unreference_unlocked+0xa/0xe0 [drm] [ 23.892755] [<ffffffffaf23b993>] ? __might_fault+0x43/0xa0 [ 23.892767] [<ffffffffc042c4bf>] i915_gem_execbuffer2+0xcf/0x260 [i915] [ 23.892774] [<ffffffffc0229f2a>] drm_ioctl+0x37a/0x4e0 [drm] [ 23.892785] [<ffffffffc042c3f0>] ? i915_gem_execbuffer+0x370/0x370 [i915] [ 23.892788] [<ffffffffaf2beab3>] do_vfs_ioctl+0xa3/0x6f0 [ 23.892790] [<ffffffffaf2cc3f5>] ? __fget+0x5/0x200 [ 23.892792] [<ffffffffaf2bf179>] SyS_ioctl+0x79/0x90 [ 23.892795] [<ffffffffaf90a941>] entry_SYSCALL_64_fastpath+0x1f/0xc2 I'm attach the entire dmesg in case it is useful. Note I cannot reproduce this at will I'm afraid. Regards, Hans -------------- next part -------------- A non-text attachment was scrubbed... Name: dmesg.log Type: text/x-log Size: 76975 bytes Desc: not available URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20161109/f1bc6535/attachment-0001.bin>