Bug 404711 - GFS2: Recursive locking on rgrp in gfs2_rename causes kernel BUG
GFS2: Recursive locking on rgrp in gfs2_rename causes kernel BUG
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Don Zickus
GFS Bugs
: 410981 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2007-11-29 12:09 EST by Abhijith Das
Modified: 2008-05-21 11:02 EDT (History)
6 users (show)

See Also:
Fixed In Version: RHBA-2008-0314
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-05-21 11:02:34 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
This git patch checks for recursion in rgrp glocks (2.04 KB, patch)
2007-11-29 15:07 EST, Abhijith Das
no flags Details | Diff

  None (edit)
Description Abhijith Das 2007-11-29 12:09:10 EST
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):

How reproducible:
fairly easy.

Steps to Reproduce:
1. Run the above set of instructions on a gfs2 filesystem a few times.
Comment 1 RHEL Product and Program Management 2007-11-29 12:14:25 EST
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
Comment 2 Abhijith Das 2007-11-29 15:07:27 EST
Created attachment 273241 [details]
This git patch checks for recursion in rgrp glocks
Comment 4 Steve Whitehouse 2007-12-04 15:56:52 EST
*** Bug 410981 has been marked as a duplicate of this bug. ***
Comment 5 Diego Woitasen 2007-12-06 12:45:02 EST

The patch works for me. I ran the test program in bug 410981 without problems.
Comment 6 Don Zickus 2007-12-17 14:37:49 EST
in 2.6.18-61.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5
Comment 9 errata-xmlrpc 2008-05-21 11:02:34 EDT
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.


Note You need to log in before you can comment on or make changes to this bug.