Bug 854646

Summary: Running grub2-mkconfig -o /boot/grub2/grub.cfg crashes some fs kernel modules
Product: [openSUSE] openSUSE 13.1 Reporter: Robert Milasan <rmilasan>
Component: KernelAssignee: Jeff Mahoney <jeffm>
Status: RESOLVED INVALID QA Contact: E-mail List <qa-bugs>
Severity: Critical    
Priority: P5 - None CC: duwe, jeffm, jslaby
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 13.1   
Whiteboard:
Found By: L3 Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Robert Milasan 2013-12-10 08:59:07 UTC
If the system is having a kernel update or running manually 'grub2-mkconfig -o /boot/grub2/grub.cfg' we can see a lot of crashes and errors from several file systems (mainly xfs and reiserfs):

[86670.434667] EXT4-fs (sda2): unable to read superblock
[86670.435741] EXT4-fs (sda2): unable to read superblock
[86670.436785] EXT4-fs (sda2): unable to read superblock
[86670.437805] isofs_fill_super: bread failed, dev=sda2, iso_blknum=16, block=32
[86670.441084] FAT-fs (sda2): invalid media value (0x00)
[86670.441087] FAT-fs (sda2): Can't find a valid FAT filesystem
[86670.442173] REISERFS warning (device sda2): sh-2006 read_super_block: bread failed (dev sda2, block 8, size 1024)
[86670.442177] REISERFS warning (device sda2): sh-2006 read_super_block: bread failed (dev sda2, block 64, size 1024)
[86670.442178] REISERFS warning (device sda2): sh-2021 reiserfs_fill_super: can not find reiserfs on sda2
[86670.443478] XFS (sda2): bad magic number
[86670.443484] ffff880220398000: eb 63 90 16 68 14 21 80 0c ff 35 d8 83 81 0c 8b  .c..h.!...5.....
[86670.443486] ffff880220398010: c8 e8 4d 7a 00 00 8b f0 eb 02 33 f6 85 f6 74 27  ..Mz......3...t'
[86670.443489] ffff880220398020: 8b ce e8 17 73 00 00 8b d8 85 db 7c 14 e8 08 fe  ....s......|....
[86670.443491] ffff880220398030: ff ff ff 75 0c 8b 06 68 50 1a 80 0c 56 ff 03 02  ...u...hP...V...
[86670.443494] XFS (sda2): Internal error xfs_sb_read_verify at line 637 of file /home/abuild/rpmbuild/BUILD/kernel-desktop-3.12.3/linux-3.12/fs/xfs/xfs_sb.c.  Caller 0xffffffffa05f2b8d

[86670.443499] CPU: 0 PID: 231 Comm: kworker/0:1H Tainted: G           O 3.12.3-1.gf37dca6-desktop #1
[86670.443500] Hardware name: Dell Inc. OptiPlex 990/06D7TR, BIOS A10 11/24/2011
[86670.443528] Workqueue: xfslogd xfs_buf_iodone_work [xfs]
[86670.443529]  0000000000000000 0000000000000001 ffffffff815e8853 ffff8800ca9fa800
[86670.443531]  ffffffffa05f5f22 ffffffffa05f2b8d 84d800be0000027d 00660fb6c68864ff
[86670.443533]  ffff880221260e40 0000000000000016 ffff8800ca9fa800 ffffe8ffffc01300
[86670.443535] Call Trace:
[86670.443543]  [<ffffffff81004c08>] dump_trace+0x88/0x300
[86670.443547]  [<ffffffff81004f5a>] show_stack_log_lvl+0xda/0x1e0
[86670.443549]  [<ffffffff810064ac>] show_stack+0x1c/0x50
[86670.443553]  [<ffffffff815e8853>] dump_stack+0x50/0x80
[86670.443563]  [<ffffffffa05f5f22>] xfs_corruption_error+0x62/0x90 [xfs]
[86670.443596]  [<ffffffffa064ebc1>] xfs_sb_read_verify+0x141/0x150 [xfs]
[86670.443658]  [<ffffffffa05f2b8d>] xfs_buf_iodone_work+0x8d/0xb0 [xfs]
[86670.443673]  [<ffffffff810703b6>] process_one_work+0x166/0x460
[86670.443688]  [<ffffffff81070b36>] worker_thread+0x116/0x370
[86670.443698]  [<ffffffff81077673>] kthread+0xb3/0xc0
[86670.443703]  [<ffffffff815f64cc>] ret_from_fork+0x7c/0xb0
[86670.443708] XFS (sda2): Corruption detected. Unmount and run xfs_repair
[86670.443723] XFS (sda2): SB validate failed with error 22.
[86670.446331] FAT-fs (sda2): invalid media value (0x00)
[86670.446334] FAT-fs (sda2): Can't find a valid FAT filesystem
[86670.447405] MINIX-fs: unable to read superblock
[86670.448407] attempt to access beyond end of device
[86670.448409] sda2: rw=0, want=3, limit=2
[86670.448411] hfsplus: unable to find HFS+ superblock
[86670.449471] qnx4: wrong fsid in superblock.
[86670.450686] You didn't specify the type of your ufs filesystem

mount -t ufs -o ufstype=sun|sunx86|44bsd|ufs2|5xbsd|old|hp|nextstep|nextstep-cd|openstep ...

>>>WARNING<<< Wrong ufstype may corrupt your filesystem, default is ufstype=old
[86670.452910] hfs: can't find a HFS filesystem on dev sda2

Normally, grub2 will try to check all types of installation and will load all modules for fs, but this seems to not work so well.

NOTE: I'm running kernel 3.12.3 from http://download.opensuse.org/repositories/Kernel:/stable/standard/ repo.
Comment 1 Jiri Slaby 2013-12-10 12:52:41 UTC
(In reply to comment #0)
> [86670.443494] XFS (sda2): Internal error xfs_sb_read_verify at line 637 of
> file
> /home/abuild/rpmbuild/BUILD/kernel-desktop-3.12.3/linux-3.12/fs/xfs/xfs_sb.c. 
> Caller 0xffffffffa05f2b8d
> 
> [86670.443499] CPU: 0 PID: 231 Comm: kworker/0:1H Tainted: G           O
> 3.12.3-1.gf37dca6-desktop #1
> [86670.443500] Hardware name: Dell Inc. OptiPlex 990/06D7TR, BIOS A10
> 11/24/2011
> [86670.443528] Workqueue: xfslogd xfs_buf_iodone_work [xfs]
> [86670.443529]  0000000000000000 0000000000000001 ffffffff815e8853
> ffff8800ca9fa800
> [86670.443531]  ffffffffa05f5f22 ffffffffa05f2b8d 84d800be0000027d
> 00660fb6c68864ff
> [86670.443533]  ffff880221260e40 0000000000000016 ffff8800ca9fa800
> ffffe8ffffc01300
> [86670.443535] Call Trace:
> [86670.443543]  [<ffffffff81004c08>] dump_trace+0x88/0x300
> [86670.443547]  [<ffffffff81004f5a>] show_stack_log_lvl+0xda/0x1e0
> [86670.443549]  [<ffffffff810064ac>] show_stack+0x1c/0x50
> [86670.443553]  [<ffffffff815e8853>] dump_stack+0x50/0x80
> [86670.443563]  [<ffffffffa05f5f22>] xfs_corruption_error+0x62/0x90 [xfs]
> [86670.443596]  [<ffffffffa064ebc1>] xfs_sb_read_verify+0x141/0x150 [xfs]
> [86670.443658]  [<ffffffffa05f2b8d>] xfs_buf_iodone_work+0x8d/0xb0 [xfs]
> [86670.443673]  [<ffffffff810703b6>] process_one_work+0x166/0x460
> [86670.443688]  [<ffffffff81070b36>] worker_thread+0x116/0x370
> [86670.443698]  [<ffffffff81077673>] kthread+0xb3/0xc0
> [86670.443703]  [<ffffffff815f64cc>] ret_from_fork+0x7c/0xb0
> [86670.443708] XFS (sda2): Corruption detected. Unmount and run xfs_repair
> [86670.443723] XFS (sda2): SB validate failed with error 22.

This is an XFS kernel problem, I believe.
Comment 2 Jeff Mahoney 2013-12-11 19:49:38 UTC
It's from the kernel, but I wouldn't call it a "problem" other than it dropping a stack trace. That's the XFS core corruption handling and we actually want that.

grub2-mkconfig queries every device looking for file systems regardless of whether there is one on it. These messages aren't crashes. They're not even errors except within the context of the file system failing to mount because there's no file system on it.

If there's a bug here, it's that grub2-mkconfig is so indiscriminate about scanning devices.

Closing as INVALID. Feel free to re-open as a grub2 bug.