Bug 196895 - SLUB debugging prevents booting encrypted XFS partition
Summary: SLUB debugging prevents booting encrypted XFS partition
Status: NEW
Alias: None
Product: Memory Management
Classification: Unclassified
Component: Slab Allocator (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Andrew Morton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-11 01:44 UTC by Stephen Panicho
Modified: 2017-09-11 10:43 UTC (History)
2 users (show)

See Also:
Kernel Version: 4.13
Subsystem:
Regression: No
Bisected commit-id:


Attachments
testcase (341 bytes, text/plain)
2017-09-11 10:39 UTC, loqs
Details

Description Stephen Panicho 2017-09-11 01:44:34 UTC
This has been identified as an upstream issue in
https://bugs.archlinux.org/task/54700

Attempting to boot an encrypted XFS partition with slub_debug=FZPU or CONFIG_SLUB_DEBUG_ON=y results in memory corruption and failure to mount the disk.

The error messages are as follows:

[ 23.115192] XFS (dm—0): metadata I/O error: block 0x2 ("xfs_trans_read_buf_map") error 5 numblks 1
[ 23.115300] XFS (dm—0): metadata I/O error: block 0x324b002 ("xfs_trans_read_buf_map") error 5 numblks 1
[ 23.115380] XFS (dm-0): metadata I/O error: block 0x6496002 ("xfs_trans_read_buf_map") error 5 numblks 1
[ 23.115459] XFS (dm-0): metadata I/O error: block 0x96e1002 ("xfs_trans_read_buf_map") error 5 numblks 1
[ 23.115468] XFS (dm-0): Corruption of in—memory data detected. Shutting down filesystem
[ 23.115471] XFS (dm-0): Please umount the filesystem and rectify the problem(s)


A notable comment from user "loqs" in the Arch Linux bug tracker post linked at the beginning of this post:

Reran the test with only CONFIG_SLAB_CANARY=y and I was able to reproduce the issue.
Edit:
Rebuilt with CONFIG_XFS_WARN=y set as well first run did not reproduce the issue, second run did reproduce the issue.
No additional xfs related output generated with /proc/sys/kernel/printk set to 7.
Edit2:
After 10 test runs 9 reproduced the issue.
Edit3:
Rebuilt without CONFIG_XFS_WARN=y with CONFIG_XFS_DEBUG=y first run did not reproduce the issue, second run did reproduce the issue.
No additional xfs related output generated with /proc/sys/kernel/printk set to 7. (identical behavior to that noted in Edit)
Comment 1 loqs 2017-09-11 10:39:12 UTC
Created attachment 258295 [details]
testcase
Comment 2 loqs 2017-09-11 10:43:37 UTC
kernel 4.13.1 no other patches boot option slub_debug
xfs_repair version 4.12.0
dmesg from running testcase
[   69.744666] XFS (dm-2): Mounting V5 Filesystem
[   69.748180] XFS (dm-2): Ending clean mount
[   69.748212] XFS (dm-2): metadata I/O error: block 0x2 ("xfs_trans_read_buf_map") error 5 numblks 1
[   69.748240] XFS (dm-2): metadata I/O error: block 0x20002 ("xfs_trans_read_buf_map") error 5 numblks 1
[   69.748267] XFS (dm-2): metadata I/O error: block 0x40002 ("xfs_trans_read_buf_map") error 5 numblks 1
[   69.748294] XFS (dm-2): metadata I/O error: block 0x60002 ("xfs_trans_read_buf_map") error 5 numblks 1
[   69.748298] XFS (dm-2): Error -5 reserving per-AG metadata reserve pool.
[   69.748300] XFS (dm-2): xfs_do_force_shutdown(0x8) called from line 1017 of file fs/xfs/xfs_fsops.c.  Return address = 0xffffffffa1bfd4c0
[   69.748304] XFS (dm-2): Corruption of in-memory data detected.  Shutting down filesystem
[   69.748305] XFS (dm-2): Please umount the filesystem and rectify the problem(s)

Note You need to log in before you can comment on or make changes to this bug.