From mboxrd@z Thu Jan 1 00:00:00 1970 From: Krzysztof Kozlowski Subject: Re: Odroid U3 mutex deadlock. Date: Mon, 14 Dec 2015 08:45:29 +0900 Message-ID: <566E0319.6040100@samsung.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: Received: from mailout4.w1.samsung.com ([210.118.77.14]:47475 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751341AbbLMXph (ORCPT ); Sun, 13 Dec 2015 18:45:37 -0500 In-reply-to: Sender: linux-samsung-soc-owner@vger.kernel.org List-Id: linux-samsung-soc@vger.kernel.org To: Anand Moon , "linux-samsung-soc@vger.kernel.org" Cc: Linux Kernel , Javier Martinez Canillas , Kukjin Kim , linux-arm-kernel@lists.infradead.org On 12.12.2015 13:32, Anand Moon wrote: > Hi Krzysztof, > > I am just observing this deadlock om my Odroid U3. This is not a deadlock yet, just a report from lockdep. Could be a real issue, could be false positive, maybe some locks miss nesting annotations. Typical information for bug report would be useful, like the exact version (it is mentioned in lockdep report but is it really correct?) and reproducibility. And of course git-bisect would be nice to have, see: Documentation/BUG-HUNTING Best regards, Krzysztof > ------------------------------------------------------------------------------------------------------------------ > > [ 2.937531] ============================================= > [ 2.938733] [ INFO: possible recursive locking detected ] > [ 2.944117] 4.4.0-rc4-xu3s #32 Not tainted > [ 2.948195] --------------------------------------------- > [ 2.953577] swapper/0/1 is trying to acquire lock: > [ 2.958351] (&genpd->lock){+.+...}, at: [] > __genpd_poweron+0x64/0x108 > [ 2.965727] > [ 2.965727] but task is already holding lock: > [ 2.971543] (&genpd->lock){+.+...}, at: [] > genpd_dev_pm_attach+0x168/0x1b8 > [ 2.979355] > [ 2.979355] other info that might help us debug this: > [ 2.985865] Possible unsafe locking scenario: > [ 2.985865] > [ 2.991768] CPU0 > [ 2.994198] ---- > [ 2.996628] lock(&genpd->lock); > [ 2.999926] lock(&genpd->lock); > [ 3.003225] > [ 3.003225] *** DEADLOCK *** > [ 3.003225] > [ 3.009128] May be due to missing lock nesting notation > [ 3.009128] > [ 3.015900] 3 locks held by swapper/0/1: > [ 3.019804] #0: (&dev->mutex){......}, at: [] > __driver_attach+0x48/0x98 > [ 3.027442] #1: (&dev->mutex){......}, at: [] > __driver_attach+0x58/0x98 > [ 3.035081] #2: (&genpd->lock){+.+...}, at: [] > genpd_dev_pm_attach+0x168/0x1b8 > [ 3.043326] > [ 3.043326] stack backtrace: > [ 3.047671] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.4.0-rc4-xu3s #32 > [ 3.054351] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) > [ 3.060444] [] (unwind_backtrace) from [] > (show_stack+0x10/0x14) > [ 3.068163] [] (show_stack) from [] > (dump_stack+0x84/0xc4) > [ 3.075367] [] (dump_stack) from [] > (__lock_acquire+0x1f88/0x215c) > [ 3.083262] [] (__lock_acquire) from [] > (lock_acquire+0xa4/0xd0) > [ 3.090990] [] (lock_acquire) from [] > (mutex_lock_nested+0x70/0x4d4) > [ 3.099061] [] (mutex_lock_nested) from [] > (__genpd_poweron+0x64/0x108) > [ 3.107393] [] (__genpd_poweron) from [] > (genpd_dev_pm_attach+0x170/0x1b8) > [ 3.115986] [] (genpd_dev_pm_attach) from [] > (platform_drv_probe+0x2c/0xac) > [ 3.124667] [] (platform_drv_probe) from [] > (driver_probe_device+0x208/0x2fc) > [ 3.133519] [] (driver_probe_device) from [] > (__driver_attach+0x94/0x98) > [ 3.141939] [] (__driver_attach) from [] > (bus_for_each_dev+0x68/0x9c) > [ 3.150097] [] (bus_for_each_dev) from [] > (bus_add_driver+0x1a0/0x218) > [ 3.158344] [] (bus_add_driver) from [] > (driver_register+0x78/0xf8) > [ 3.166330] [] (driver_register) from [] > (exynos_drm_register_drivers+0x28/0x74) > [ 3.175441] [] (exynos_drm_register_drivers) from > [] (exynos_drm_init+0x6c/0xc4) > [ 3.184556] [] (exynos_drm_init) from [] > (do_one_initcall+0x90/0x1dc) > [ 3.192718] [] (do_one_initcall) from [] > (kernel_init_freeable+0x158/0x1f8) > [ 3.201396] [] (kernel_init_freeable) from [] > (kernel_init+0x8/0xe8) > [ 3.209469] [] (kernel_init) from [] > (ret_from_fork+0x14/0x24) > [ 3.217932] exynos-hdmi 12d00000.hdmi: GPIO lookup for consumer hpd > [ 3.223293] exynos-hdmi 12d00000.hdmi: using device tree for GPIO lookup > [ 3.229980] of_get_named_gpiod_flags: can't parse 'hpd-gpios' > property of node '/hdmi@12D00000[0]' > [ 3.238945] of_get_named_gpiod_flags: parsed 'hpd-gpio' property of > node '/hdmi@12D00000[0]' - status (0) > [ 3.253430] exynos-drm exynos-drm: bound 12c10000.mixer (ops > mixer_component_ops) > [ 3.256216] exynos-drm exynos-drm: bound 12d00000.hdmi (ops > hdmi_component_ops) > [ 3.263245] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013). > [ 3.269812] [drm] No driver support for vblank timestamp query. > [ 3.323251] exynos-drm exynos-drm: fb0: frame buffer device > [ 3.341464] [drm] Initialized exynos 1.0.0 20110530 on minor 0 > > ----------------------------------------------------------------------------------------------------------------------- > -Anand Moon > > From mboxrd@z Thu Jan 1 00:00:00 1970 From: k.kozlowski@samsung.com (Krzysztof Kozlowski) Date: Mon, 14 Dec 2015 08:45:29 +0900 Subject: Odroid U3 mutex deadlock. In-Reply-To: References: Message-ID: <566E0319.6040100@samsung.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 12.12.2015 13:32, Anand Moon wrote: > Hi Krzysztof, > > I am just observing this deadlock om my Odroid U3. This is not a deadlock yet, just a report from lockdep. Could be a real issue, could be false positive, maybe some locks miss nesting annotations. Typical information for bug report would be useful, like the exact version (it is mentioned in lockdep report but is it really correct?) and reproducibility. And of course git-bisect would be nice to have, see: Documentation/BUG-HUNTING Best regards, Krzysztof > ------------------------------------------------------------------------------------------------------------------ > > [ 2.937531] ============================================= > [ 2.938733] [ INFO: possible recursive locking detected ] > [ 2.944117] 4.4.0-rc4-xu3s #32 Not tainted > [ 2.948195] --------------------------------------------- > [ 2.953577] swapper/0/1 is trying to acquire lock: > [ 2.958351] (&genpd->lock){+.+...}, at: [] > __genpd_poweron+0x64/0x108 > [ 2.965727] > [ 2.965727] but task is already holding lock: > [ 2.971543] (&genpd->lock){+.+...}, at: [] > genpd_dev_pm_attach+0x168/0x1b8 > [ 2.979355] > [ 2.979355] other info that might help us debug this: > [ 2.985865] Possible unsafe locking scenario: > [ 2.985865] > [ 2.991768] CPU0 > [ 2.994198] ---- > [ 2.996628] lock(&genpd->lock); > [ 2.999926] lock(&genpd->lock); > [ 3.003225] > [ 3.003225] *** DEADLOCK *** > [ 3.003225] > [ 3.009128] May be due to missing lock nesting notation > [ 3.009128] > [ 3.015900] 3 locks held by swapper/0/1: > [ 3.019804] #0: (&dev->mutex){......}, at: [] > __driver_attach+0x48/0x98 > [ 3.027442] #1: (&dev->mutex){......}, at: [] > __driver_attach+0x58/0x98 > [ 3.035081] #2: (&genpd->lock){+.+...}, at: [] > genpd_dev_pm_attach+0x168/0x1b8 > [ 3.043326] > [ 3.043326] stack backtrace: > [ 3.047671] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.4.0-rc4-xu3s #32 > [ 3.054351] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) > [ 3.060444] [] (unwind_backtrace) from [] > (show_stack+0x10/0x14) > [ 3.068163] [] (show_stack) from [] > (dump_stack+0x84/0xc4) > [ 3.075367] [] (dump_stack) from [] > (__lock_acquire+0x1f88/0x215c) > [ 3.083262] [] (__lock_acquire) from [] > (lock_acquire+0xa4/0xd0) > [ 3.090990] [] (lock_acquire) from [] > (mutex_lock_nested+0x70/0x4d4) > [ 3.099061] [] (mutex_lock_nested) from [] > (__genpd_poweron+0x64/0x108) > [ 3.107393] [] (__genpd_poweron) from [] > (genpd_dev_pm_attach+0x170/0x1b8) > [ 3.115986] [] (genpd_dev_pm_attach) from [] > (platform_drv_probe+0x2c/0xac) > [ 3.124667] [] (platform_drv_probe) from [] > (driver_probe_device+0x208/0x2fc) > [ 3.133519] [] (driver_probe_device) from [] > (__driver_attach+0x94/0x98) > [ 3.141939] [] (__driver_attach) from [] > (bus_for_each_dev+0x68/0x9c) > [ 3.150097] [] (bus_for_each_dev) from [] > (bus_add_driver+0x1a0/0x218) > [ 3.158344] [] (bus_add_driver) from [] > (driver_register+0x78/0xf8) > [ 3.166330] [] (driver_register) from [] > (exynos_drm_register_drivers+0x28/0x74) > [ 3.175441] [] (exynos_drm_register_drivers) from > [] (exynos_drm_init+0x6c/0xc4) > [ 3.184556] [] (exynos_drm_init) from [] > (do_one_initcall+0x90/0x1dc) > [ 3.192718] [] (do_one_initcall) from [] > (kernel_init_freeable+0x158/0x1f8) > [ 3.201396] [] (kernel_init_freeable) from [] > (kernel_init+0x8/0xe8) > [ 3.209469] [] (kernel_init) from [] > (ret_from_fork+0x14/0x24) > [ 3.217932] exynos-hdmi 12d00000.hdmi: GPIO lookup for consumer hpd > [ 3.223293] exynos-hdmi 12d00000.hdmi: using device tree for GPIO lookup > [ 3.229980] of_get_named_gpiod_flags: can't parse 'hpd-gpios' > property of node '/hdmi at 12D00000[0]' > [ 3.238945] of_get_named_gpiod_flags: parsed 'hpd-gpio' property of > node '/hdmi at 12D00000[0]' - status (0) > [ 3.253430] exynos-drm exynos-drm: bound 12c10000.mixer (ops > mixer_component_ops) > [ 3.256216] exynos-drm exynos-drm: bound 12d00000.hdmi (ops > hdmi_component_ops) > [ 3.263245] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013). > [ 3.269812] [drm] No driver support for vblank timestamp query. > [ 3.323251] exynos-drm exynos-drm: fb0: frame buffer device > [ 3.341464] [drm] Initialized exynos 1.0.0 20110530 on minor 0 > > ----------------------------------------------------------------------------------------------------------------------- > -Anand Moon > >