Bug 11493

Summary: "proc_dir_entry 'hdb' already registered" on repeatedly mounting/umounting intentionally corrupted fs
Product: File System Reporter: Sami Liedes (sami.liedes)
Component: ext4Assignee: fs_ext4 (fs_ext4)
Status: CLOSED CODE_FIX    
Severity: normal    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.27-rc5, 2.6.27.4 Subsystem:
Regression: --- Bisected commit-id:

Description Sami Liedes 2008-09-03 17:31:44 UTC
Hardware Environment: qemu x86
Software Environment: minimal Debian sid (unstable)
Problem Description:

Hi,

When repeatedly mounting, using and umounting (different) intentionally corrupted ext4 filesystems, I eventually hit the error "proc_dir_entry 'hdb' already registered". Please find below the output (most of which is dmesg) from that and a couple of the preceding mount/umount cycles. umount is done before the "***** zzuffing [...]" lines and mount after them.

----------
EXT4-fs error (device hdb): htree_dirblock_to_tree: bad entry in directory #164: inode out of bounds - offset=8560, inode=16805, rec_len=16, name_len=5
EXT4-fs error (device hdb): htree_dirblock_to_tree: bad entry in directory #164: inode out of bounds - offset=8560, inode=16805, rec_len=16, name_len=5
EXT4-fs error (device hdb): htree_dirblock_to_tree: bad entry in directory #164: inode out of bounds - offset=8560, inode=16805, rec_len=16, name_len=5
EXT4-fs warning (device hdb): empty_dir: bad directory (dir #1289) - no `.' or `..'
EXT4-fs error (device hdb): mb_free_blocks: double-free of inode 1318's block 2179(bit 2178 in group 0)

EXT4-fs error (device hdb): mb_free_blocks: double-free of inode 1318's block 2180(bit 2179 in group 0)

EXT4-fs error (device hdb): mb_free_blocks: double-free of inode 1318's block 2181(bit 2180 in group 0)

EXT4-fs error (device hdb): mb_free_blocks: double-free of inode 1318's block 2182(bit 2181 in group 0)

EXT4-fs error (device hdb): htree_dirblock_to_tree: bad entry in directory #1363: rec_len % 4 != 0 - offset=24, inode=1364, rec_len=21, name_len=9
EXT4-fs error (device hdb): empty_dir: bad entry in directory #1363: rec_len % 4 != 0 - offset=24, inode=1364, rec_len=21, name_len=9
EXT4-fs error (device hdb): mb_free_blocks: double-free of inode 0's block 9871(bit 1678 in group 1)

EXT4-fs: mballoc: 0 blocks 0 reqs (0 success)
EXT4-fs: mballoc: 0 extents scanned, 0 goal hits, 0 2^N hits, 0 breaks, 0 lost
EXT4-fs: mballoc: 2 generated and it took 4642686
EXT4-fs: mballoc: 0 preallocated, 0 discarded
***** zzuffing ***** seed 175
kjournald2 starting.  Commit interval 5 seconds
EXT4 FS on hdb, internal journal
EXT4-fs: mounted filesystem with ordered data mode.
EXT4-fs: delayed allocation enabled
EXT4-fs: file extents enabled
EXT4-fs: mballoc enabled
EXT4-fs: mballoc: 0 blocks 0 reqs (0 success)
EXT4-fs: mballoc: 0 extents scanned, 0 goal hits, 0 2^N hits, 0 breaks, 0 lost
EXT4-fs: mballoc: 2 generated and it took 206856
EXT4-fs: mballoc: 0 preallocated, 0 discarded
***** zzuffing ***** seed 176
kjournald2 starting.  Commit interval 5 seconds
EXT4 FS on hdb, internal journal
EXT4-fs: mounted filesystem with ordered data mode.
EXT4-fs: delayed allocation enabled
EXT4-fs: file extents enabled
EXT4-fs: mballoc enabled
EXT4-fs: mballoc: 0 blocks 0 reqs (0 success)
EXT4-fs: mballoc: 0 extents scanned, 0 goal hits, 0 2^N hits, 0 breaks, 0 lost
EXT4-fs: mballoc: 2 generated and it took 202212
EXT4-fs: mballoc: 0 preallocated, 0 discarded
***** zzuffing ***** seed 177
jbd2_journal_bmap: journal block not found at offset 0 on hdb
jbd2_journal_init_inode: Cannnot locate journal superblock
EXT4-fs: Could not load journal inode
mount: wrong fs type, bad option, bad superblock on /dev/hdb,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

umount: /mnt: not mounted
***** zzuffing ***** seed 178
proc_dir_entry 'hdb' already registered
Pid: 981, comm: mount Not tainted 2.6.27-rc5 #2
 [<c0543808>] ? printk+0x18/0x20
 [<c0299f3a>] proc_register+0x186/0x1b0
 [<c029a11d>] proc_mkdir_mode+0x33/0x4a
 [<c029a143>] proc_mkdir+0xf/0x11
 [<c031fc2d>] jbd2_stats_proc_init+0x27/0x74
 [<c0462ecd>] ? __spin_lock_init+0x2c/0x4f
 [<c0320632>] jbd2_journal_init_inode+0x72/0x11b
 [<c02ff99a>] ext4_get_journal+0x37/0xae
 [<c0301e0e>] ext4_fill_super+0x1659/0x2133
 [<c029e1ec>] ? disk_name+0xa7/0xb2
 [<c026646c>] get_sb_bdev+0xed/0x121
 [<c027a667>] ? alloc_vfsmnt+0x7d/0xf7
 [<c024dbb0>] ? kstrdup+0x26/0x42
 [<c02fee16>] ext4_get_sb+0x21/0x27
 [<c03007b5>] ? ext4_fill_super+0x0/0x2133
 [<c0265447>] vfs_kern_mount+0x3a/0x8b
 [<c02654e2>] do_kern_mount+0x33/0xbd
 [<c027a286>] do_new_mount+0x59/0x77
 [<c027af37>] do_mount+0x195/0x1c0
 [<c0248f0b>] ? __get_free_pages+0x29/0x2f
 [<c0279272>] ? copy_mount_options+0x2e/0x120
 [<c027afdd>] sys_mount+0x7b/0xae
 [<c0202f3e>] syscall_call+0x7/0xb
 =======================
kjournald2 starting.  Commit interval 5 seconds
EXT4 FS on hdb, internal journal
EXT4-fs: mounted filesystem with ordered data mode.
EXT4-fs: delayed allocation enabled
EXT4-fs: file extents enabled
EXT4-fs: mballoc enabled
EXT4-fs: mballoc: 0 blocks 0 reqs (0 success)
EXT4-fs: mballoc: 0 extents scanned, 0 goal hits, 0 2^N hits, 0 breaks, 0 lost
EXT4-fs: mballoc: 2 generated and it took 198981
EXT4-fs: mballoc: 0 preallocated, 0 discarded
***** zzuffing ***** seed 179
proc_dir_entry 'hdb' already registered
Pid: 1227, comm: mount Not tainted 2.6.27-rc5 #2
[...]
----------
Comment 1 Sami Liedes 2008-11-02 10:43:18 UTC
I still see this on 2.6.27.4, except now it is "proc_dir_entry 'jbd2/hdb' already registered".
Comment 2 Sami Liedes 2009-01-11 09:43:45 UTC
Fixed in 2.6.28.