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 (gdb) # rpm -q gfs2-utils gfs2-utils-0.1.57-1.el5
Recreated; Requesting ack flags to get this fixed.
Created attachment 346125 [details] Patch to fix the problem This patch fixes the scrolling problem.
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.
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.
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.
Pushed to the RHEL55 branch of cluster.git. Changing status to POST.
Built according to the new procedure. Changing to Modified.
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. http://rhn.redhat.com/errata/RHBA-2010-0287.html