Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 568119

Summary: gfs2_quota causes segmentation fault on init without limits
Product: Red Hat Enterprise Linux 5 Reporter: Kaloyan Kovachev <kkovachev>
Component: gfs2-utilsAssignee: Abhijith Das <adas>
Status: CLOSED DUPLICATE QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: low    
Version: 5.5CC: adas, bmarzins, edamato, kkovachev, rpeterso, swhiteho
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-08 16:01:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
strace none

Description Kaloyan Kovachev 2010-02-24 20:04:24 UTC
Created attachment 396146 [details]
strace

Description of problem:
 if no quota limits are added and init is issued (i.e. immediately after reset) quota tool segfaults and the filesystem is left locked.

Version-Release number of selected component (if applicable):
 cluster-3.0.8

How reproducible:
 always

Steps to Reproduce:
1. have a gfs2 filesystem with data owned from users other than root mounted at /mnt/gfs
2. issue 'gfs2_quota reset -f /mnt/gfs'
3. do not add any limits or warnings and do 'gfs2_quota init -f /mnt/gfs'
  
Actual results:
 segmentation fault (attached)

Expected results:
 quotafile should be created normally

Additional info:
 if limit (even 0 or for user with no data) is set before the init, there are some 'fiemap error (53): Invalid request descriptor' messages, but the command completes normally

Comment 1 Kaloyan Kovachev 2010-02-24 20:27:53 UTC
forgot to mention that with cluster-3.0.6 i just get a warning about old format without crash

Comment 2 Kaloyan Kovachev 2010-02-26 10:27:00 UTC
Just had similar crash with fsck when 'writing bitmap'. Restored the one from 3.0.6 and successfully repaired the fs

Comment 3 Steve Whitehouse 2010-03-02 15:39:27 UTC
Please confirm which RHEL version you are using? This bug has been filed under RHEL3 which is probably wrong since that doesn't have fiemap in any shape or form.

Comment 4 Abhijith Das 2010-03-02 15:54:10 UTC
Fixing component and product (can't seem to fix version). The segfault in this bug is the same as the panic in bug 569610 and the 'fiemap error (53): Invalid request descriptor' is being fixed by the most recent patch in bug 536902

Comment 5 Kaloyan Kovachev 2010-03-02 16:21:30 UTC
I am not using RHEL, but Slackware64 with manually compiled cluster suite. Sorry for the wrong location, I think i have selected 'Cluster suite' as a product when filing the bug (and version 3 was for the cluster), but now i can see it is in RHEL.

looking at the bugs mentioned, they seem to be in the kernel (i am using vanilla 2.6.32.7). Which patches should i apply then, as https://bugzilla.redhat.com/show_bug.cgi?id=536902 is part of 3.0.8 or i should just upgrade to 2.6.32.9 or 2.6.33?

Comment 6 Abhijith Das 2010-03-08 16:01:27 UTC
You need both the userland and kernel fixes for this to work correctly.
For the userland component, you can pull up the latest code from the STABLE3 cluster.git branch and hand compile. I'm not sure when the next rhel6 build is going to be. 
For the kernel, a more generic fix (different from bug 569610, which is for RHEL5.5 alone) has been posted upstream that you should compile into your kernel. (http://lkml.org/lkml/2010/3/4/261)

Hope this helps.
Thanks!

*** This bug has been marked as a duplicate of bug 536902 ***