Bug 503485 - gfs2_edit segfault
gfs2_edit segfault
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gfs2-utils (Show other bugs)
ia64 Linux
low Severity low
: rc
: ---
Assigned To: Robert Peterson
Cluster QE
Depends On:
  Show dependency treegraph
Reported: 2009-06-01 06:23 EDT by Jaroslav Kortus
Modified: 2010-03-30 04:53 EDT (History)
2 users (show)

See Also:
Fixed In Version: gfs2-utils-0.1.62-2.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-03-30 04:53:55 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch to fix the problem (2.69 KB, patch)
2009-06-01 15:09 EDT, Robert Peterson
no flags Details | Diff
Patch to fix the problem (revised) (4.14 KB, patch)
2009-06-01 17:10 EDT, Robert Peterson
no flags Details | Diff

  None (edit)
Description Jaroslav Kortus 2009-06-01 06:23:09 EDT
Description of problem:
When browsing list of indirect links for 200M+ file the gfs2_edit tool exits with segfault.

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

How reproducible:
Create file with enough indirect links in it (enough > screen height). When browsing using pg-up and pg-down everything works as expected. But if you browse to the bottom using arrow keys and then go back by pg-up, on the last page the segfault occurs.

Steps to Reproduce:
1. Create file with so many indirect links that it fills up your screen in gfs2_edit
2. browse to the list (switch mode until you see directories/files) and jump to the file with enough links
3. go to the bottom using down key, go at the beginning using pg-up
Actual results:
segfault on last page

Expected results:
no segfault

Additional info:
Core was generated by `gfs2_edit /dev/sdc1'.
Program terminated with signal 11, Segmentation fault.
[New process 18903]
#0  0x400000000001b4b0 in display_indirect (ind=0x20000000003b4010, indblocks=120, level=0, startoff=0) at hexedit.c:1447
1447                    print_gfs2("0x%llx / %lld", ind->ii[pndx].block,
(gdb) bt full
#0  0x400000000001b4b0 in display_indirect (ind=0x20000000003b4010, indblocks=120, level=0, startoff=0) at hexedit.c:1447
        file_offset = 18446744073692807168
        start_line = 7
        total_dirents = 0
        i = 2
        cur_height = 0
        pndx = -7
        factor = {1, 511, 261121, 0, 0}
        offsets = {-8, 0, 0, 0, 0}
        __FUNCTION__ = "display_indirect"
#1  0x400000000001d990 in display_extended () at hexedit.c:1674
        tmp_inode = (struct gfs2_inode *) 0x6000000000004f88
        tmp_bh = (struct gfs2_buffer_head *) 0x60000fffffe1b6c0
#2  0x400000000001fce0 in display (identify_only=0) at hexedit.c:1897
        blk = 66222
        __FUNCTION__ = "display"
#3  0x4000000000026790 in interactive_mode () at hexedit.c:2636
        ch = 339
        Quit = 0
#4  0x400000000002f990 in main (argc=2, argv=0x60000fffffe1ba08) at hexedit.c:3507
        i = 256
        j = 3
        fd = 3
# rpm -q gfs2-utils
Comment 1 Robert Peterson 2009-06-01 15:08:13 EDT
Recreated; Requesting ack flags to get this fixed.
Comment 2 Robert Peterson 2009-06-01 15:09:59 EDT
Created attachment 346125 [details]
Patch to fix the problem

This patch fixes the scrolling problem.
Comment 3 Robert Peterson 2009-06-01 17:10:10 EDT
Created attachment 346142 [details]
Patch to fix the problem (revised)

I found additional scrolling problems during testing.  For example,
if you have an indirect block list or a directory list of 50 items,
if you arrow down past item 25 (more than half-way) and hit page
down, it displays the wrong list and your highlighted entry disappears.
This is a revised patch that covers those corner cases.
Comment 4 Robert Peterson 2009-06-01 18:14:33 EDT
I pushed the patch to the master branch of the gfs2-utils git tree
and the STABLE2 and STABLE3 branches of the cluster.git tree.
I haven't pushed to the RHEL5 yet because I'm waiting for ack flags.
Comment 5 Robert Peterson 2009-06-02 15:17:09 EDT
The patch has now been pushed to the RHEL5 branch of the cluster
git tree for inclusion into 5.5.  It was tested on system roth-01.
Changing status to Modified.
Comment 6 Robert Peterson 2009-08-17 12:24:01 EDT
Pushed to the RHEL55 branch of cluster.git.  Changing status to POST.
Comment 7 Robert Peterson 2009-08-19 10:06:40 EDT
Built according to the new procedure.  Changing to Modified.
Comment 12 errata-xmlrpc 2010-03-30 04:53:55 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 therefore 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.