Bug 404711 - GFS2: Recursive locking on rgrp in gfs2_rename causes kernel BUG
Summary: GFS2: Recursive locking on rgrp in gfs2_rename causes kernel BUG
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Don Zickus
QA Contact: GFS Bugs
URL:
Whiteboard:
: 410981 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-29 17:09 UTC by Abhijith Das
Modified: 2008-05-21 15:02 UTC (History)
6 users (show)

Fixed In Version: RHBA-2008-0314
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-05-21 15:02:34 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2008:0314 0 normal SHIPPED_LIVE Updated kernel packages for Red Hat Enterprise Linux 5.2 2008-05-20 18:43:34 UTC

Description Abhijith Das 2007-11-29 17:09:10 UTC
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
panic.

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 Program Management 2007-11-29 17:14:25 UTC
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
release.

Comment 2 Abhijith Das 2007-11-29 20:07:27 UTC
Created attachment 273241 [details]
This git patch checks for recursion in rgrp glocks

Comment 4 Steve Whitehouse 2007-12-04 20:56:52 UTC
*** Bug 410981 has been marked as a duplicate of this bug. ***

Comment 5 Diego Woitasen 2007-12-06 17:45:02 UTC
FYI

The patch works for me. I ran the test program in bug 410981 without problems.

Comment 6 Don Zickus 2007-12-17 19:37:49 UTC
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 15:02:34 UTC
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.

http://rhn.redhat.com/errata/RHBA-2008-0314.html



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