Red Hat Bugzilla – Bug 404711
GFS2: Recursive locking on rgrp in gfs2_rename causes kernel BUG
Last modified: 2008-05-21 11:02:34 EDT
Description of problem:
This problem was initially discovered in bug #220052 while trying to install
RHEL5 with gfs2 as the root filesystem. Some screenshots of the panic are in
that bug report.
The first lock is requested to unlink an already existing
inode (replacing a file) and the second lock is requested when the destination
directory needs to alloc some space. It is rare that these two events happen
during the same rename call, and even more rare that these two instances try to
lock the same rgrp. It is, however, possible.
Running these set of commands 2-3 times in a gfs2 filesystem will trigger this
mkdir first second;
for i in `seq 1 78`; do touch first/foo$i; done;
mv first/* second/;
cp a100MBfile first/foo1;
mv first/foo1 second/; /* This mv, unlinks file 'second/foo1' and also causes
directory 'second' to trigger an allocation request */
rm -Rf first second;
Here, 78 is my magic number for the number of foo* files that the destination
directory can hold. Adding any more information to the directory will trigger
an allocation request.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Run the above set of instructions on a gfs2 filesystem a few times.
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release. Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products. This request is not yet committed for inclusion in an Update
Created attachment 273241 [details]
This git patch checks for recursion in rgrp glocks
RHEL5.2 patch posted
*** Bug 410981 has been marked as a duplicate of this bug. ***
The patch works for me. I ran the test program in bug 410981 without problems.
You can download this test kernel from http://people.redhat.com/dzickus/el5
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.