Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Xen 4.18 corrupts a Linux domU



Hello

This is almost off-topic, but I thought it was still worth a discussion here,
because I am not completely certain the NetBSD dom0 is innocent. Here is the
setup:

dom0 running a netbsd-9 kernel, but the same outcome was tested with a 
NetBSD 1.0 kernel.

domU is PVshim, running CentOS 7.3. uname says:
Linux crampe. 3.10.0-514.el7.x86_64 #1 SMP Tue Nov 22 16:42:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

The domU disk is a 10 GB file in the dom0 filesystem. parted output on domU:
Model: Xen Virtual Block Device (xvd)
Disk /dev/xvda: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system     Flags
 1      1049kB  1075MB  1074MB  primary  xfs             boot
 2      1075MB  3222MB  2147MB  primary  linux-swap(v1)
 3      3222MB  21.5GB  18.3GB  primary  xfs


Now the bug: everything works fine with xen-4.15.4. An upgrade to xen-4.18 
causes the Linux domU to complain on boot that the root XFS filesystem log
is corrupted (see output below). It drops in the initrd emergency shell,
advising to run xfs_repair. Doing so fixes the filesystem by removing most 
of the files. 

I have been able to reproduce this a few times. I am interested if anyone 
has thoughts to share about where this bug comes from.

Here is the domU kernel complaining about XFS corruption:

kernel: SGI XFS with ACLs, security attributes, no debug enabled
kernel: XFS (xvda3): Mounting V5 Filesystem
kernel: XFS (xvda3): Starting recovery (logdev: internal)
kernel: XFS (xvda3): Metadata CRC error detected at xfs_agf_read_verify+0x70/0x120 [
kernel: XFS (xvda3): Unmount and run xfs_repair
kernel: XFS (xvda3): First 64 bytes of corrupted metadata buffer:
kernel: ffff8801ecbb4000: 2e 69 73 72 61 2e 34 00 78 66 73 5f 69 6e 6f 64 .isra.4.xfs_inod
kernel: ffff8801ecbb4010: 65 5f 69 74 65 6d 5f 66 6f 72 6d 61 74 00 78 66 e_item_format.xf
kernel: ffff8801ecbb4020: 73 5f 69 6e 6f 64 65 5f 69 74 65 6d 5f 6f 70 73 s_inode_item_ops
kernel: ffff8801ecbb4030: 00 78 66 73 5f 6c 6f 67 5f 72 65 63 6f 76 65 72 .xfs_log_recover
mount[247]: mount: mount /dev/xvda3 on /sysroot failed: Structure needs cleaning
kernel: XFS (xvda3): metadata I/O error: block 0x1 ("xfs_trans_read_buf_map")
error


-- 
Emmanuel Dreyfus
manu%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index