severity 318463 grave thanks I'm marking this "grave" because the incompletely-repaired filesystem is contributing to data loss. See also better backtrace below.
On Fri, 2005-07-15 at 12:37 -0400, Adam C Powell IV wrote: > Package: e2fsprogs > Version: 1.37-2sarge1 > > Greetings, > > I'm checking an ext3 file system on a ~240 GiB RAID-1 array (two "250 > GB" drives, df reports 240362560 1K-blocks), and e2fsck segfaults. Okay, downloaded source and built, then used the built result pre-dh_strip. The gdb backtrace starts the same way, then is a bit more useful afterwards: > Program received signal SIGSEGV, Segmentation fault. > 0x400338fa in ext2fs_unmark_generic_bitmap () from /lib/libext2fs.so.2 > (gdb) backtrace > #0 0x400338fa in ext2fs_unmark_generic_bitmap () > from /lib/libext2fs.so.2 #1 0x0805712a in e2fsck_process_bad_inode (ctx=0x806b038, dir=0, ino=1458272, buf=0x0) at bitops.h:411 #2 0x08059339 in e2fsck_pass4 (ctx=0x806b038) at /usr/src/e2fsprogs-1.37/e2fsck/pass4.c:138 #3 0x0804e61e in e2fsck_run (ctx=0x806b038) at /usr/src/e2fsprogs-1.37/e2fsck/e2fsck.c:193 #4 0x0804d846 in main (argc=0, argv=0x0) at /usr/src/e2fsprogs-1.37/e2fsck/unix.c:1105 Looking at ext2fs_unmark_generic_bitmap() (lib/ext2fs/gen_bitmap.c), the function looks so short that it seems it could only segfault by a bad dereference, i.e. if bitmap is a bad pointer. Unfortunately, "print bitmap" in gdb gives: "No symbol "bitmap" in current context." presumably because /lib/libext2fs.so is stripped. But going "up" puts me in e2fsck_process_bad_inode() in pass2.c; it calls ext2fs_unmark_inode_bitmap() right near the end (which in bitops.h gets turned into a ext2fs_unmark_generic_bitmap() call). Sure enough, ctx->inode_bad_map is 0x0, which is passed as bitmap to ext2fs_unmark_generic_bitmap() and dereferenced, hence the segfault. So why is inode_bad_map 0x0? In case it helps, the output of "print *ctx" is attached. Please let me know what else I can do to help. -Adam -- GPG fingerprint: D54D 1AEE B11C CE9B A02B C5DD 526F 01E8 564E E4B6 Welcome to the best software in the world today cafe! http://www.take6.com/albums/greatesthits.html
$4 = {fs = 0x806b270, program_name = 0xbffffbba "/usr/src/e2fsprogs-1.37/debian/BUILD-STD/e2fsck/e2fsck", filesystem_name = 0x806b260 "/dev/md1", device_name = 0x806b260 "/dev/md1", io_options = 0x0, flags = 16, options = 132, use_superblock = 0, superblock = 0, blocksize = 0, num_blocks = 61048976, mount_flags = 0, blkid = 0x806b220, abort_loc = {{ __jmpbuf = {0, 134671928, 0, -1073743480, -1073743520, 134538695}, __mask_was_saved = 0, __saved_mask = {__val = {0 <repeats 32 times>}}}}, abort_code = 0, progress = 0x804c6c0 <e2fsck_update_progress>, inode_used_map = 0x806bd38, inode_bad_map = 0x0, inode_dir_map = 0x806bd90, inode_bb_map = 0x0, inode_imagic_map = 0x0, inode_reg_map = 0x0, block_found_map = 0x808b0e8, block_dup_map = 0x809e770, block_ea_map = 0x0, inode_count = 0x809e6f0, inode_link_info = 0x80846d8, refcount = 0x0, refcount_extra = 0x0, invalid_inode_bitmap_flag = 0x8085930, invalid_block_bitmap_flag = 0x8087658, invalid_inode_table_flag = 0x8089380, invalid_bitmaps = 0, block_buf = 0x0, stashed_ino = 30539776, stashed_inode = 0xbffff730, lost_and_found = 32769, bad_lost_and_found = 0, dir_info_count = 0, dir_info_size = 0, dir_info = 0x0, dx_dir_info_count = 0, dx_dir_info_size = 0, dx_dir_info = 0x0, dirs_to_hash = 0x0, process_inode_size = 256, inode_buffer_blocks = 0, journal_io = 0x0, journal_name = 0x0, global_rtrack = {time_start = { tv_sec = 1124378019, tv_usec = 84086}, user_start = {tv_sec = 0, tv_usec = 5999}, system_start = {tv_sec = 0, tv_usec = 9998}, brk_start = 0x808c000}, progress_fd = 0, progress_pos = 0, ---Type <return> to continue, or q <return> to quit--- progress_last_percent = 921, progress_last_time = 405113416, interactive = 1, start_meta = "\000", stop_meta = "\000", fs_directory_count = 16518, fs_regular_count = 1416600, fs_blockdev_count = 34, fs_chardev_count = 43, fs_links_count = 32335, fs_symlinks_count = 5491, fs_fast_symlinks_count = 5362, fs_fifo_count = 15, fs_total_count = 1446632, fs_badblocks_count = 0, fs_sockets_count = 131, fs_ind_count = 174502, fs_dind_count = 1636, fs_tind_count = 222, fs_fragmented = 3240, large_files = 40, fs_ext_attr_inodes = 0, fs_ext_attr_blocks = 0, ext_attr_ver = 2, priv_data = 0x0}