Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755338AbbDTS27 (ORCPT ); Mon, 20 Apr 2015 14:28:59 -0400 Received: from mail-ob0-f174.google.com ([209.85.214.174]:34848 "EHLO mail-ob0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755132AbbDTS2x (ORCPT ); Mon, 20 Apr 2015 14:28:53 -0400 MIME-Version: 1.0 Date: Mon, 20 Apr 2015 14:28:51 -0400 X-Google-Sender-Auth: Le2TXTok5AfhIWhdighJQNnSnX8 Message-ID: Subject: qxl deadlock splat From: Josh Boyer To: Dave Airlie Cc: DRI mailing list , "Linux-Kernel@Vger. Kernel. Org" Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 8510 Lines: 155 Hi Dave, Below is a qxl lockdep spew that I got with Linus' tree a few days ago. I actually suspect this is present in older kernels too as the DRM merge hasn't landed yet. If you have any ideas, I'd appreciate it. I tried to look at the locking a bit, but I'm not familiar with the ww ticket locking. josh [ +8.261799] ====================================================== [ +0.000001] [ INFO: possible circular locking dependency detected ] [ +0.000001] 4.1.0-0.rc0.git2.1.fc23.x86_64 #1 Not tainted [ +0.000001] ------------------------------------------------------- [ +0.000001] gnome-shell/1012 is trying to acquire lock: [ +0.000001] (reservation_ww_class_acquire){+.+.+.}, at: [] qxl_release_reserve_list+0x55/0x120 [qxl] [ +0.000008] but task is already holding lock: [ +0.000001] (reservation_ww_class_mutex){+.+.+.}, at: [] qxl_crtc_page_flip+0xbb/0x230 [qxl] [ +0.000004] which lock already depends on the new lock. [ +0.000002] the existing dependency chain (in reverse order) is: [ +0.000001] -> #1 (reservation_ww_class_mutex){+.+.+.}: [ +0.000002] [] lock_acquire+0xc7/0x2a0 [ +0.000005] [] __ww_mutex_lock+0x7f/0x770 [ +0.000004] [] ttm_eu_reserve_buffers+0x365/0x640 [ttm] [ +0.000007] [] qxl_release_reserve_list+0x55/0x120 [qxl] [ +0.000005] [] qxl_draw_opaque_fb+0xe6/0x3c0 [qxl] [ +0.000005] [] qxl_fb_imageblit_internal+0x4d/0x70 [qxl] [ +0.000018] [] qxl_fb_imageblit+0x1a7/0x1c0 [qxl] [ +0.000006] [] soft_cursor+0x1ac/0x230 [ +0.000003] [] bit_cursor+0x68b/0x6c0 [ +0.000002] [] fbcon_cursor+0x10d/0x180 [ +0.000001] [] hide_cursor+0x2c/0x90 [ +0.000004] [] redraw_screen+0x188/0x250 [ +0.000003] [] vc_do_resize+0x4c3/0x4f0 [ +0.000003] [] vc_resize+0x1f/0x30 [ +0.000003] [] fbcon_init+0x3cc/0x610 [ +0.000002] [] visual_init+0xbc/0x120 [ +0.000003] [] do_bind_con_driver+0x17e/0x3c0 [ +0.000003] [] do_take_over_console+0xb4/0x1b0 [ +0.000003] [] do_fbcon_takeover+0x63/0xd0 [ +0.000004] [] fbcon_event_notify+0x6dd/0x7e0 [ +0.000003] [] notifier_call_chain+0x3e/0xb0 [ +0.000003] [] __blocking_notifier_call_chain+0x51/0x70 [ +0.000003] [] blocking_notifier_call_chain+0x16/0x20 [ +0.000003] [] fb_notifier_call_chain+0x1b/0x20 [ +0.000004] [] register_framebuffer+0x222/0x370 [ +0.000003] [] drm_fb_helper_initial_config+0x264/0x3c0 [drm_kms_helper] [ +0.000008] [] qxl_fbdev_init+0xd4/0x100 [qxl] [ +0.000005] [] qxl_modeset_init+0x229/0x260 [qxl] [ +0.000013] [] qxl_driver_load+0x811/0x840 [qxl] [ +0.000003] [] drm_dev_register+0xb5/0x110 [drm] [ +0.000008] [] drm_get_pci_dev+0x8d/0x200 [drm] [ +0.000006] [] qxl_pci_probe+0x1b/0x40 [qxl] [ +0.000003] [] local_pci_probe+0x45/0xa0 [ +0.000002] [] pci_device_probe+0xf9/0x150 [ +0.000017] [] driver_probe_device+0x209/0x4b0 [ +0.000004] [] __driver_attach+0xa3/0xb0 [ +0.000001] [] bus_for_each_dev+0x73/0xc0 [ +0.000002] [] driver_attach+0x1e/0x20 [ +0.000002] [] bus_add_driver+0x188/0x260 [ +0.000002] [] driver_register+0x64/0xf0 [ +0.000002] [] __pci_register_driver+0x64/0x70 [ +0.000002] [] drm_pci_init+0xfa/0x130 [drm] [ +0.000007] [] acpi_cpufreq_resume+0x28/0x70 [acpi_cpufreq] [ +0.000004] [] do_one_initcall+0xd8/0x210 [ +0.000004] [] do_init_module+0x61/0x1ce [ +0.000003] [] load_module+0x2359/0x2710 [ +0.000003] [] SyS_init_module+0x145/0x190 [ +0.000002] [] system_call_fastpath+0x12/0x76 [ +0.000003] -> #0 (reservation_ww_class_acquire){+.+.+.}: [ +0.000002] [] __lock_acquire+0x1ce9/0x2050 [ +0.000002] [] lock_acquire+0xc7/0x2a0 [ +0.000002] [] ttm_eu_reserve_buffers+0xcc/0x640 [ttm] [ +0.000004] [] qxl_release_reserve_list+0x55/0x120 [qxl] [ +0.000003] [] qxl_draw_dirty_fb+0x184/0x480 [qxl] [ +0.000003] [] qxl_crtc_page_flip+0x100/0x230 [qxl] [ +0.000003] [] drm_mode_page_flip_ioctl+0x1ab/0x360 [drm] [ +0.000007] [] drm_ioctl+0x1df/0x6a0 [drm] [ +0.000005] [] do_vfs_ioctl+0x308/0x560 [ +0.000003] [] SyS_ioctl+0x81/0xa0 [ +0.000002] [] system_call_fastpath+0x12/0x76 [ +0.000002] other info that might help us debug this: [ +0.000001] Possible unsafe locking scenario: [ +0.000001] CPU0 CPU1 [ +0.000001] ---- ---- [ +0.000001] lock(reservation_ww_class_mutex); [ +0.000003] lock(reservation_ww_class_acquire); [ +0.000002] lock(reservation_ww_class_mutex); [ +0.000002] lock(reservation_ww_class_acquire); [ +0.000003] *** DEADLOCK *** [ +0.000003] 3 locks held by gnome-shell/1012: [ +0.000001] #0: (crtc_ww_class_acquire){+.+.+.}, at: [] drm_modeset_lock_crtc+0x4c/0x110 [drm] [ +0.000038] #1: (crtc_ww_class_mutex){+.+.+.}, at: [] drm_modeset_lock+0x3d/0x110 [drm] [ +0.000013] #2: (reservation_ww_class_mutex){+.+.+.}, at: [] qxl_crtc_page_flip+0xbb/0x230 [qxl] [ +0.000007] stack backtrace: [ +0.000003] CPU: 0 PID: 1012 Comm: gnome-shell Not tainted 4.1.0-0.rc0.git2.1.fc23.x86_64 #1 [ +0.000001] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [ +0.000000] 0000000000000000 00000000139e8b9c ffff88002c54f918 ffffffff81882fc7 [ +0.000000] 0000000000000000 ffffffff82c0f040 ffff88002c54f968 ffffffff8110e37d [ +0.000000] 00000000001d9640 ffff88002c54f9d8 ffff88002e82dbf8 0000000000000003 [ +0.000000] Call Trace: [ +0.000000] [] dump_stack+0x4c/0x65 [ +0.000000] [] print_circular_bug+0x1cd/0x230 [ +0.000000] [] __lock_acquire+0x1ce9/0x2050 [ +0.000000] [] ? __mutex_unlock_slowpath+0xc3/0x1c0 [ +0.000000] [] lock_acquire+0xc7/0x2a0 [ +0.000000] [] ? qxl_release_reserve_list+0x55/0x120 [qxl] [ +0.000000] [] ? trace_hardirqs_on_caller+0x13d/0x1e0 [ +0.000000] [] ttm_eu_reserve_buffers+0xcc/0x640 [ttm] [ +0.000000] [] ? qxl_release_reserve_list+0x55/0x120 [qxl] [ +0.000000] [] qxl_release_reserve_list+0x55/0x120 [qxl] [ +0.000000] [] qxl_draw_dirty_fb+0x184/0x480 [qxl] [ +0.000000] [] ? sched_clock_cpu+0x98/0xc0 [ +0.000000] [] qxl_crtc_page_flip+0x100/0x230 [qxl] [ +0.000000] [] drm_mode_page_flip_ioctl+0x1ab/0x360 [drm] [ +0.000000] [] drm_ioctl+0x1df/0x6a0 [drm] [ +0.000000] [] ? inode_has_perm.isra.48+0x55/0xa0 [ +0.000000] [] do_vfs_ioctl+0x308/0x560 [ +0.000000] [] SyS_ioctl+0x81/0xa0 [ +0.000000] [] system_call_fastpath+0x12/0x76 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/