Data corruption with hio driver
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
High
|
Seth Forshee | ||
Xenial |
Invalid
|
High
|
Seth Forshee | ||
Yakkety |
Won't Fix
|
High
|
Seth Forshee | ||
Zesty |
Fix Released
|
High
|
Seth Forshee | ||
Artful |
Fix Released
|
High
|
Seth Forshee |
Bug Description
Impact: Data corruption is seen when using the hio driver with 4.10 and later kernels.
Fix: Patch to fix incorrect use of enumerated values as bitmasks.
Test case: See below.
Regression potential: Very low. Changes are simple and Obviously Correct (TM), and they only affect the hio driver.
---
We are seeing data corruption issues using the hio driver with kernel 4.10.0
# uname -a
Linux arbok 4.10.0-26-generic #30~16.04.1-Ubuntu SMP Tue Jun 27 09:40:14 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Making xfs fails:
root@arbok:~# mkfs.xfs /dev/hioa
meta-data=/dev/hioa isize=512 agcount=4, agsize=48835584 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=1, sparse=0
data = bsize=4096 blocks=195342336, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal log bsize=4096 blocks=95382, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
bad magic number
bad magic number
Metadata corruption detected at xfs_sb block 0x0/0x200
libxfs_writebufr: write verifer failed on xfs_sb bno 0x0/0x200
The drive appears to be healthy. Firmware has been upgraded to ver 656:
root@arbok:~# hio_info -d /dev/hioa
hioa Serial number: 022XWV10G2000325
Size(GB): 800
Max size(GB): 800
Hardware version: 1.0
Firmware version: 656
Driver version: 2.1.0.28
Work mode: MLC
Run time (sec.): 8910490
Total read(MB): 8499
Total write(MB): 0
Lifetime remaining: 99.844%
Max bad block rate: 0.167%
Health: OK
Comment: NA
No relevant entries about read/write errors in dmesg
Also just copying 8G random data and reading those back gives a hash mismatch:
root@arbok:~# dd if=/dev/urandom of=test.dat bs=1G count=8 iflag=fullblock
8+0 records in
8+0 records out
8589934592 bytes (8.6 GB, 8.0 GiB) copied, 85.6076 s, 100 MB/s
root@arbok:~# dd if=test.dat of=/dev/hioa bs=1G count=8 iflag=fullblock
8+0 records in
8+0 records out
8589934592 bytes (8.6 GB, 8.0 GiB) copied, 10.6034 s, 810 MB/s
root@arbok:~# dd if=/dev/hioa of=read-back.dat bs=1G count=8 iflag=fullblock
sha256sum test.dat read-
8+0 records in
8+0 records out
8589934592 bytes (8.6 GB, 8.0 GiB) copied, 66.1872 s, 130 MB/s
root@arbok:~# sha256sum test.dat read-back.dat
6376d245a07c42c
ebfb4ef19ae410f
CVE References
Changed in linux (Ubuntu): | |
assignee: | nobody → Seth Forshee (sforshee) |
Changed in linux (Ubuntu Xenial): | |
assignee: | nobody → Seth Forshee (sforshee) |
importance: | Undecided → High |
status: | New → In Progress |
Changed in linux (Ubuntu Yakkety): | |
assignee: | nobody → Seth Forshee (sforshee) |
status: | New → In Progress |
importance: | Undecided → High |
Changed in linux (Ubuntu Zesty): | |
assignee: | nobody → Seth Forshee (sforshee) |
importance: | Undecided → High |
status: | New → In Progress |
Changed in linux (Ubuntu Artful): | |
status: | Confirmed → In Progress |
tags: | removed: kernel-key |
description: | updated |
description: | updated |
Changed in linux (Ubuntu Zesty): | |
status: | In Progress → Fix Committed |
Changed in linux (Ubuntu Yakkety): | |
status: | In Progress → Fix Committed |
Status changed to 'Confirmed' because the bug affects multiple users.