From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Wagner Subject: random squashfs bug at unmount Date: Tue, 20 Sep 2011 14:19:38 +0200 Message-ID: <4E7884DA.3000805@free-electrons.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: phillip@lougher.demon.co.uk To: linux-fsdevel Return-path: Received: from mail.free-electrons.com ([88.190.12.23]:38360 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752539Ab1ITMTX (ORCPT ); Tue, 20 Sep 2011 08:19:23 -0400 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Hello, The kernel sometimes prints the stacktrace at the end of this email when unmounting a squashfs filesystem. I'm using squashfs on top of a (work in progress) UBI->block layer. See https://lkml.org/lkml/2011/9/12/41 . However, the stacktrace does not show any part of ubiblk. I'm running 3.1-rc2 with changes only in drivers/mtd/ubi I can't voluntarily reproduce it: to the best of my knowledge, the conditions are the same when it happens and when it does not. Plus, it happens very rarely. [ 312.091735] ============================================= [ 312.098968] [ INFO: possible recursive locking detected ] [ 312.104644] 3.1.0-rc2-igepv2-00003-g15ad483-dirty #91 [ 312.109954] --------------------------------------------- [ 312.115631] umount/384 is trying to acquire lock: [ 312.120544] (&(&parent->list_lock)->rlock){-.-...}, at: [] cache_flusharray+0x24/0xa8 [ 312.129821] [ 312.129821] but task is already holding lock: [ 312.135925] (&(&parent->list_lock)->rlock){-.-...}, at: [] cache_flusharray+0x24/0xa8 [ 312.145172] [ 312.145172] other info that might help us debug this: [ 312.152008] Possible unsafe locking scenario: [ 312.152008] [ 312.158233] CPU0 [ 312.160797] ---- [ 312.163330] lock(&(&parent->list_lock)->rlock); [ 312.168273] lock(&(&parent->list_lock)->rlock); [ 312.173217] [ 312.173217] *** DEADLOCK *** [ 312.173248] [ 312.179443] May be due to missing lock nesting notation [ 312.179443] [ 312.186553] 2 locks held by umount/384: [ 312.190582] #0: (&type->s_umount_key#27){+.+...}, at: [] deactivate_super+0x58/0x64 [ 312.199737] #1: (&(&parent->list_lock)->rlock){-.-...}, at: [] cache_flusharray+0x24/0xa8 [ 312.209411] [ 312.209411] stack backtrace: [ 312.214019] [] (unwind_backtrace+0x0/0x128) from [] (__lock_acquire+0x1880/0x1908) [ 312.223785] [] (__lock_acquire+0x1880/0x1908) from [] (lock_acquire+0x60/0x74) [ 312.233215] [] (lock_acquire+0x60/0x74) from [] (_raw_spin_lock+0x2c/0x3c) [ 312.242248] [] (_raw_spin_lock+0x2c/0x3c) from [] (cache_flusharray+0x24/0xa8) [ 312.251647] [] (cache_flusharray+0x24/0xa8) from [] (kmem_cache_free+0x64/0x98) [ 312.261138] [] (kmem_cache_free+0x64/0x98) from [] (free_block+0xf4/0x140) [ 312.270202] [] (free_block+0xf4/0x140) from [] (cache_flusharray+0x7c/0xa8) [ 312.279327] [] (cache_flusharray+0x7c/0xa8) from [] (kfree+0xb4/0xec) [ 312.287933] [] (kfree+0xb4/0xec) from [] (squashfs_cache_delete+0x40/0x88 [squashfs]) [ 312.298004] [] (squashfs_cache_delete+0x40/0x88 [squashfs]) from [] (squashfs_put_super+0x2c/0x80 [squashfs]) [ 312.310211] [] (squashfs_put_super+0x2c/0x80 [squashfs]) from [] (generic_shutdown_super+0x58/0xb0) [ 312.321533] [] (generic_shutdown_super+0x58/0xb0) from [] (kill_block_super+0x18/0x68) [ 312.331665] [] (kill_block_super+0x18/0x68) from [] (deactivate_locked_super+0x40/0x6c) [ 312.341888] [] (deactivate_locked_super+0x40/0x6c) from [] (sys_umount+0x2f8/0x324) [ 312.351776] [] (sys_umount+0x2f8/0x324) from [] (ret_fast_syscall+0x0/0x3c) Regards, David Wagner -- David Wagner, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com