Re: panic - Attempting to free lock with active block list

From: Chris Wright
Date: Wed Jan 05 2005 - 15:40:31 EST


* Jan-Frode Myklebust (Jan-Frode.Myklebust@xxxxxxxxxxx) wrote:
> We have a couple of mail-servers running first 2.6.9-1.681_FC3smp
> and was later upgraded to the Fedora test kernel 2.6.10-1.727_FC3smp
> which I think is pretty plain 2.6.10 + ac2. But they both keep
> crashing with the message:
>
> Kernel panic - not syncing: Attempting to free lock with active block list
>
> Any ideas how to attack this?
>
> We're running Centos 3.3, ext3 for root-disks, ext2 on /boot,
> XFS for mail-spools, lots of nfs-mounted directories..

It seems likely it's nfs related in this case since it stresses the
fs/locks code differently than local filesystems. I recall Steve French
reporting similar issue with cifs last month.

Message-Id: <1102097193.3540.4.camel@xxxxxxxxxxxxxxx>

Are those three cases really panic-worthy? Could we change to BUG_ON()
and try and get some useful debugging? Trond, Willy, any ideas?

thanks,
-chris

===== fs/locks.c 1.76 vs edited =====
--- 1.76/fs/locks.c 2005-01-04 18:48:28 -08:00
+++ edited/fs/locks.c 2005-01-05 12:31:34 -08:00
@@ -159,14 +159,20 @@ static inline void locks_free_lock(struc
BUG();
return;
}
- if (waitqueue_active(&fl->fl_wait))
- panic("Attempting to free lock with active wait queue");
+ if (waitqueue_active(&fl->fl_wait)) {
+ printk("Attempting to free lock with active wait queue");
+ BUG();
+ }

- if (!list_empty(&fl->fl_block))
- panic("Attempting to free lock with active block list");
+ if (!list_empty(&fl->fl_block)) {
+ printk("Attempting to free lock with active block list");
+ BUG();
+ }

- if (!list_empty(&fl->fl_link))
- panic("Attempting to free lock on active lock list");
+ if (!list_empty(&fl->fl_link)) {
+ printk("Attempting to free lock on active lock list");
+ BUG();
+ }

if (fl->fl_ops) {
if (fl->fl_ops->fl_release_private)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/