Re: possible circular locking in reiserfs_removexattr

Previous thread: How to diagnose a process stuck in D state? by Stephen Oberholtzer on Friday, February 22, 2008 - 7:08 pm. (2 messages)

Next thread: [patch 0/8] 2.6.23-stable review by Greg KH on Friday, February 22, 2008 - 8:17 pm. (10 messages)
To: ReiserFS Mailing List <reiserfs-devel@...>
Cc: Kernel development list <linux-kernel@...>
Date: Friday, February 22, 2008 - 7:30 pm

Hello,

I've got this while running beagle. /home is mounted with the following options:

/dev/mapper/vglinux1-lvhome /home reiserfs rw,noatime,nodiratime,user_xattr 0 0

This still happens with latest kernel (next-20080222), I can't tell when it
first appears.

=======================================================
[ INFO: possible circular locking dependency detected ]
2.6.25-rc1 #15
-------------------------------------------------------
beagled/3781 is trying to acquire lock:
(&REISERFS_I(inode)->xattr_sem){----}, at: [<e1ac02fa>] reiserfs_removexattr+0x42/0xbf [reiserfs]

but task is already holding lock:
(&sb->s_type->i_mutex_key#8){--..}, at: [<c016f006>] vfs_removexattr+0x59/0xc2

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-> #2 (&sb->s_type->i_mutex_key#8){--..}:
[<c01311f5>] __lock_acquire+0x8d9/0xa83
[<e1aacd0e>] reiserfs_file_release+0x171/0x3b2 [reiserfs]
[<c01316f2>] lock_acquire+0x4c/0x63
[<e1aacd0e>] reiserfs_file_release+0x171/0x3b2 [reiserfs]
[<c0290e57>] mutex_lock_nested+0xa9/0x219
[<e1aacd0e>] reiserfs_file_release+0x171/0x3b2 [reiserfs]
[<e1aacd0e>] reiserfs_file_release+0x171/0x3b2 [reiserfs]
[<c015a01b>] __fput+0x90/0x155
[<e1ac0ebd>] reiserfs_xattr_set+0x2a2/0x2c5 [reiserfs]
[<e1ac0858>] reiserfs_setxattr+0x7a/0xe3 [reiserfs]
[<e1ac07de>] reiserfs_setxattr+0x0/0xe3 [reiserfs]
[<c016f3de>] vfs_setxattr+0x74/0xe4
[<c016f4fb>] setxattr+0xad/0xc7
[<c0292243>] _spin_unlock+0x25/0x3a
[<c01bfb26>] _atomic_dec_and_lock+0x22/0x2c
[<c016aeee>] mntput_no_expire+0x11/0x5b
[<c0160fc2>] link_path_walk+0xa5/0xaf
[<c010492b>] restore_nocheck+0x12/0x15
[<c01122d0>] do_page_fault+0x0/0x484
[<c0130556>] trac...

To: Laurent Riffard <laurent.riffard@...>
Cc: ReiserFS Mailing List <reiserfs-devel@...>, Kernel development list <linux-kernel@...>
Date: Friday, February 22, 2008 - 7:58 pm

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks for the report. I have a patch queue I'm hoping to send to -mm
next week that cleans up the xattr code a lot and makes the locking
quite a bit saner. It's been in openSUSE for a few generations, so
hopefully there won't be a long incubation before it hits mainline.

- --
Jeff Mahoney
SUSE Labs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFHv2G/LPWxlyuTD7IRAgCpAJ0e1n1jo2z+O4MivXNkhpCc1f1PjwCaAiAr
2BX+r7qnceZwveGzpsbR0PY=
=+Z/7
-----END PGP SIGNATURE-----
--

Previous thread: How to diagnose a process stuck in D state? by Stephen Oberholtzer on Friday, February 22, 2008 - 7:08 pm. (2 messages)

Next thread: [patch 0/8] 2.6.23-stable review by Greg KH on Friday, February 22, 2008 - 8:17 pm. (10 messages)