From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751955AbbHMAil (ORCPT ); Wed, 12 Aug 2015 20:38:41 -0400 Received: from v094114.home.net.pl ([79.96.170.134]:60230 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751182AbbHMAii (ORCPT ); Wed, 12 Aug 2015 20:38:38 -0400 From: "Rafael J. Wysocki" To: sedat.dilek@gmail.com Cc: Daniel Vetter , Dave Airlie , Len Brown , Linux ACPI , LKML , intel-gfx , Linus Torvalds , "'Hans de Goede'" Subject: Re: [4.2-rc4] acpi|drm|i915: circular locking dependency: acpi_video_get_backlight_type Date: Thu, 13 Aug 2015 03:05:53 +0200 Message-ID: <1841757.hD0i59Kt8O@vostro.rjw.lan> User-Agent: KMail/4.11.5 (Linux/4.1.0-rc5+; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday, August 10, 2015 08:29:00 PM Sedat Dilek wrote: > On Sat, Aug 1, 2015 at 2:23 PM, Sedat Dilek wrote: > > On Mon, Jul 27, 2015 at 12:33 AM, Sedat Dilek wrote: > >> Hi, > >> > >> this my first build of a 4.2-rcN Linux-kernel and I see this... > >> > > > > Just FYI: > > > > I am *not* seeing this with drm-intel-nightly from below url. > > > > Also, I plan to test Linux v4.2-rc5. > > > > [ CC Linus ] > > Knock Knock Knock. The lock this is related to has been introduced by a commit from Hans (CCed). Unfortunately, I'm out of office this week and I'll be traveling next week, so my personal ability to look into this issue is rather limited ATM. Sorry about that. > This issue still remains here (with CONFIG_DRM_I915=m)... > > [ 18.269792] ====================================================== > [ 18.269798] [ INFO: possible circular locking dependency detected ] > [ 18.269805] 4.2.0-rc6-1-iniza-small #1 Not tainted > [ 18.269810] ------------------------------------------------------- > [ 18.269816] modprobe/727 is trying to acquire lock: > [ 18.269822] (init_mutex){+.+.+.}, at: [] > acpi_video_get_backlight_type+0x17/0x164 [video] > [ 18.269840] > [ 18.269840] but task is already holding lock: > [ 18.269848] (&(&backlight_notifier)->rwsem){++++..}, at: > [] __blocking_notifier_call_chain+0x39/0x70 > [ 18.269864] > [ 18.269864] which lock already depends on the new lock. > [ 18.269864] > [ 18.269875] > [ 18.269875] the existing dependency chain (in reverse order) is: > [ 18.269884] > ... > > Full dmesg log and kernel-config attached. > > Shall I add Rusty and modules/modprobe folks? > > - Sedat - > > > - Sedat - > > > > [1] http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-intel-nightly/2015-08-01-unstable/ > > [2] http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-intel-nightly/2015-08-01-unstable/linux-image-4.2.0-994-generic_4.2.0-994.201508010158_amd64.deb > > > >> [ 24.001043] [drm] Memory usable by graphics device = 2048M > >> [ 24.001118] [drm] Replacing VGA console driver > >> [ 24.011642] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013). > >> [ 24.011646] [drm] Driver supports precise vblank timestamp query. > >> [ 24.012480] vgaarb: device changed decodes: > >> PCI:0000:00:02.0,olddecodes=io+mem,decodes=io+mem:owns=io+mem > >> [ 24.028005] > >> [ 24.028014] ====================================================== > >> [ 24.028020] [ INFO: possible circular locking dependency detected ] > >> [ 24.028027] 4.2.0-rc4-1-iniza-small #1 Not tainted > >> [ 24.028032] ------------------------------------------------------- > >> [ 24.028038] modprobe/740 is trying to acquire lock: > >> [ 24.028043] (init_mutex){+.+.+.}, at: [] > >> acpi_video_get_backlight_type+0x17/0x164 [video] > >> [ 24.028060] > >> [ 24.028060] but task is already holding lock: > >> [ 24.028068] (&(&backlight_notifier)->rwsem){++++..}, at: > >> [] __blocking_notifier_call_chain+0x39/0x70 > >> [ 24.028083] > >> [ 24.028083] which lock already depends on the new lock. > >> [ 24.028083] > >> [ 24.028095] > >> [ 24.028095] the existing dependency chain (in reverse order) is: > >> [ 24.028103] > >> [ 24.028103] -> #1 (&(&backlight_notifier)->rwsem){++++..}: > >> [ 24.028113] [] lock_acquire+0xcf/0x280 > >> [ 24.028121] [] down_write+0x49/0x80 > >> [ 24.028129] [] > >> blocking_notifier_chain_register+0x21/0xb0 > >> [ 24.028138] [] backlight_register_notifier+0x18/0x20 > >> [ 24.028147] [] > >> acpi_video_get_backlight_type+0xfa/0x164 [video] > >> [ 24.028158] [] 0xffffffffa00a20e9 > >> [ 24.028164] [] do_one_initcall+0x88/0x1c0 > >> [ 24.028172] [] do_init_module+0x61/0x1ec > >> [ 24.028179] [] load_module+0x2008/0x25c0 > >> [ 24.028187] [] SyS_init_module+0x126/0x140 > >> [ 24.028194] [] entry_SYSCALL_64_fastpath+0x16/0x7a > >> [ 24.028202] > >> [ 24.028202] -> #0 (init_mutex){+.+.+.}: > >> [ 24.028211] [] __lock_acquire+0x1f5d/0x21c0 > >> [ 24.028218] [] lock_acquire+0xcf/0x280 > >> [ 24.028225] [] mutex_lock_nested+0x65/0x3c0 > >> [ 24.028233] [] > >> acpi_video_get_backlight_type+0x17/0x164 [video] > >> [ 24.028243] [] > >> acpi_video_backlight_notify+0x19/0x2f [video] > >> [ 24.028253] [] notifier_call_chain+0x5d/0x80 > >> [ 24.028260] [] > >> __blocking_notifier_call_chain+0x51/0x70 > >> [ 24.028269] [] > >> blocking_notifier_call_chain+0x16/0x20 > >> [ 24.028278] [] backlight_device_register+0x197/0x240 > >> [ 24.028286] [] > >> intel_backlight_register+0xb3/0x180 [i915] > >> [ 24.028336] [] > >> intel_modeset_gem_init+0x176/0x190 [i915] > >> [ 24.028371] [] i915_driver_load+0xf12/0x14d0 [i915] > >> [ 24.028406] [] drm_dev_register+0xb1/0x100 [drm] > >> [ 24.028425] [] drm_get_pci_dev+0x8d/0x1e0 [drm] > >> [ 24.028439] [] i915_pci_probe+0x3b/0x60 [i915] > >> [ 24.028463] [] local_pci_probe+0x45/0xa0 > >> [ 24.028470] [] pci_device_probe+0xcd/0x120 > >> [ 24.028477] [] driver_probe_device+0x136/0x2e0 > >> [ 24.028485] [] __driver_attach+0x94/0xa0 > >> [ 24.028491] [] bus_for_each_dev+0x66/0xa0 > >> [ 24.028499] [] driver_attach+0x1e/0x20 > >> [ 24.028506] [] bus_add_driver+0x1b8/0x230 > >> [ 24.028513] [] driver_register+0x60/0xe0 > >> [ 24.028520] [] __pci_register_driver+0x64/0x70 > >> [ 24.028527] [] drm_pci_init+0xe0/0x110 [drm] > >> [ 24.028540] [] i915_init+0xa0/0xa8 [i915] > >> [ 24.028563] [] do_one_initcall+0x88/0x1c0 > >> [ 24.028570] [] do_init_module+0x61/0x1ec > >> [ 24.028577] [] load_module+0x2008/0x25c0 > >> [ 24.028584] [] SyS_init_module+0x126/0x140 > >> [ 24.028591] [] entry_SYSCALL_64_fastpath+0x16/0x7a > >> [ 24.028598] > >> [ 24.028598] other info that might help us debug this: > >> [ 24.028598] > >> [ 24.028609] Possible unsafe locking scenario: > >> [ 24.028609] > >> [ 24.028617] CPU0 CPU1 > >> [ 24.028622] ---- ---- > >> [ 24.028627] lock(&(&backlight_notifier)->rwsem); > >> [ 24.028633] lock(init_mutex); > >> [ 24.028639] > >> lock(&(&backlight_notifier)->rwsem); > >> [ 24.028648] lock(init_mutex); > >> [ 24.028654] > >> [ 24.028654] *** DEADLOCK *** > >> [ 24.028654] > >> [ 24.028664] 4 locks held by modprobe/740: > >> [ 24.028669] #0: (&dev->mutex){......}, at: [] > >> __driver_attach+0x4b/0xa0 > >> [ 24.028681] #1: (&dev->mutex){......}, at: [] > >> __driver_attach+0x59/0xa0 > >> [ 24.028693] #2: (drm_global_mutex){+.+.+.}, at: > >> [] drm_dev_register+0x26/0x100 [drm] > >> [ 24.028711] #3: (&(&backlight_notifier)->rwsem){++++..}, at: > >> [] __blocking_notifier_call_chain+0x39/0x70 > >> [ 24.028725] > >> [ 24.028725] stack backtrace: > >> [ 24.028734] CPU: 1 PID: 740 Comm: modprobe Not tainted > >> 4.2.0-rc4-1-iniza-small #1 > >> [ 24.028742] Hardware name: SAMSUNG ELECTRONICS CO., LTD. > >> 530U3BI/530U4BI/530U4BH/530U3BI/530U4BI/530U4BH, BIOS 13XK 03/28/2013 > >> [ 24.028753] ffffffff8269fc40 ffff8801188134b8 ffffffff817cea9b > >> 0000000000000011 > >> [ 24.028763] ffffffff8269fc40 ffff880118813508 ffffffff817cbfc4 > >> ffff8800d3a00b40 > >> [ 24.028774] ffff880118813578 ffff8800d3a01410 0000000000000004 > >> ffff8800d3a01410 > >> [ 24.028784] Call Trace: > >> [ 24.028791] [] dump_stack+0x4c/0x65 > >> [ 24.028797] [] print_circular_bug+0x20b/0x21c > >> [ 24.028804] [] __lock_acquire+0x1f5d/0x21c0 > >> [ 24.028812] [] lock_acquire+0xcf/0x280 > >> [ 24.028819] [] ? > >> acpi_video_get_backlight_type+0x17/0x164 [video] > >> [ 24.028830] [] mutex_lock_nested+0x65/0x3c0 > >> [ 24.028837] [] ? > >> acpi_video_get_backlight_type+0x17/0x164 [video] > >> [ 24.028847] [] > >> acpi_video_get_backlight_type+0x17/0x164 [video] > >> [ 24.028857] [] > >> acpi_video_backlight_notify+0x19/0x2f [video] > >> [ 24.028866] [] notifier_call_chain+0x5d/0x80 > >> [ 24.028873] [] __blocking_notifier_call_chain+0x51/0x70 > >> [ 24.028880] [] blocking_notifier_call_chain+0x16/0x20 > >> [ 24.028887] [] backlight_device_register+0x197/0x240 > >> [ 24.028920] [] intel_backlight_register+0xb3/0x180 [i915] > >> [ 24.028952] [] intel_modeset_gem_init+0x176/0x190 [i915] > >> [ 24.028984] [] i915_driver_load+0xf12/0x14d0 [i915] > >> [ 24.028991] [] ? mark_held_locks+0x69/0x90 > >> [ 24.028997] [] ? __mutex_unlock_slowpath+0xc0/0x180 > >> [ 24.029004] [] ? mark_held_locks+0x69/0x90 > >> [ 24.029011] [] ? _raw_spin_unlock_irqrestore+0x36/0x60 > >> [ 24.029018] [] ? trace_hardirqs_on_caller+0x151/0x1e0 > >> [ 24.029025] [] ? trace_hardirqs_on+0xd/0x10 > >> [ 24.029039] [] drm_dev_register+0xb1/0x100 [drm] > >> [ 24.029052] [] drm_get_pci_dev+0x8d/0x1e0 [drm] > >> [ 24.029076] [] i915_pci_probe+0x3b/0x60 [i915] > >> [ 24.029082] [] local_pci_probe+0x45/0xa0 > >> [ 24.029089] [] ? pci_match_device+0xe0/0x110 > >> [ 24.029095] [] pci_device_probe+0xcd/0x120 > >> [ 24.029102] [] driver_probe_device+0x136/0x2e0 > >> [ 24.029109] [] __driver_attach+0x94/0xa0 > >> [ 24.029115] [] ? driver_probe_device+0x2e0/0x2e0 > >> [ 24.029124] [] bus_for_each_dev+0x66/0xa0 > >> [ 24.029134] [] driver_attach+0x1e/0x20 > >> [ 24.029144] [] bus_add_driver+0x1b8/0x230 > >> [ 24.029153] [] driver_register+0x60/0xe0 > >> [ 24.029163] [] __pci_register_driver+0x64/0x70 > >> [ 24.029180] [] drm_pci_init+0xe0/0x110 [drm] > >> [ 24.029190] [] ? 0xffffffffa069a000 > >> [ 24.029218] [] i915_init+0xa0/0xa8 [i915] > >> [ 24.029228] [] do_one_initcall+0x88/0x1c0 > >> [ 24.029238] [] ? do_init_module+0x28/0x1ec > >> [ 24.029248] [] do_init_module+0x61/0x1ec > >> [ 24.029257] [] load_module+0x2008/0x25c0 > >> [ 24.029266] [] ? m_show+0x1a0/0x1a0 > >> [ 24.029278] [] ? retint_kernel+0x10/0x10 > >> [ 24.029290] [] SyS_init_module+0x126/0x140 > >> [ 24.029297] [] entry_SYSCALL_64_fastpath+0x16/0x7a > >> [ 24.030969] ACPI: Video Device [GFX0] (multi-head: yes rom: no post: no) > >> [ 24.031157] input: Video Bus as > >> /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input11 > >> [ 24.031353] [drm] Initialized i915 1.6.0 20150522 for 0000:00:02.0 on minor 0 > >> [ 24.041224] fbcon: inteldrmfb (fb0) is primary device > >> > >> Not sure which area is the root cause, so I added acpi and drm/i915 folks. > >> > >> dmesg and kernel-config are attached. > >> More infos? > >> Please let me know what you need.