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 472003

Summary: GFS2: gfs2_convert stuck in busy loop
Product: Red Hat Enterprise Linux 5 Reporter: Nate Straz <nstraz>
Component: gfs2-utilsAssignee: Robert Peterson <rpeterso>
Status: CLOSED DUPLICATE QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.3CC: edamato
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-11-18 17:05:21 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:

Description Nate Straz 2008-11-18 04:30:46 UTC
Description of problem:

While trying to convert a fresh GFS file system to GFS2, gfs2_convert got stuck in a busy loop.  Attaching to it with gdb shows the following loop.

(gdb) print sdp->num_bufs
$4 = 32769
(gdb) print sdp->bsize
$5 = 4096
(gdb) watch sdp->num_bufs
Hardware watchpoint 1: sdp->num_bufs
(gdb) watch sdp->bsize
Hardware watchpoint 2: sdp->bsize
(gdb) n
62                              osi_list_add(&bh->b_list, &sdp->buf_list);
(gdb) 
63                              continue;
(gdb) 
57              while (sdp->num_bufs * sdp->bsize > 128 << 20) {
(gdb) 
58                      bh = osi_list_entry(sdp->buf_list.prev, struct gfs2_buffer_head,
(gdb) 
60                      if (bh->b_count) {
(gdb) 
61                              osi_list_del(&bh->b_list);
(gdb) 
62                              osi_list_add(&bh->b_list, &sdp->buf_list);
(gdb) 
63                              continue;
(gdb) 
57              while (sdp->num_bufs * sdp->bsize > 128 << 20) {
(gdb) 
58                      bh = osi_list_entry(sdp->buf_list.prev, struct gfs2_buffer_head,
(gdb) 
60                      if (bh->b_count) {
(gdb) 
61                              osi_list_del(&bh->b_list);
(gdb) 
62                              osi_list_add(&bh->b_list, &sdp->buf_list);
(gdb) 
63                              continue;
(gdb) 
57              while (sdp->num_bufs * sdp->bsize > 128 << 20) {
(gdb) 
58                      bh = osi_list_entry(sdp->buf_list.prev, struct gfs2_buffer_head,
(gdb) 
60                      if (bh->b_count) {
(gdb) 
61                              osi_list_del(&bh->b_list);
(gdb) 
62                              osi_list_add(&bh->b_list, &sdp->buf_list);
(gdb) 
63                              continue;
(gdb) 
57              while (sdp->num_bufs * sdp->bsize > 128 << 20) {
(gdb) print sdp->num_bufs
$6 = 32769



Version-Release number of selected component (if applicable):
gfs2-utils-0.1.49-1.el5

How reproducible:
unknown, probably easily.

Steps to Reproduce:
1. mkfs -t gfs
2. mount; umount
3. gfs2_convert
  
Actual results:
See above

Expected results:
gfs2_convert shouldn't eat up 100% of a CPU.

Additional info:

Comment 1 Robert Peterson 2008-11-18 14:43:07 UTC
I already found and this bug while working on bug #471618.  A patch to
fix the problem is already attached to that bugzilla.  The question is
only whether to use this bugzilla to implement the patch or to wait
until I'm finished with that one.  I was going to add it to the other
bugzilla record, but now that this record is open, I think I'm inclined
to use this one instead.  That way the separate problems will treated
separately.  At this point it's a matter of paperwork and ack flags.
Opinions encouraged.

Comment 2 Nate Straz 2008-11-18 17:05:21 UTC
Folding this into 471618.

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