Bug 75881 - lazyinit failure on new mdadm raid5 & encrypted array
Summary: lazyinit failure on new mdadm raid5 & encrypted array
Status: NEW
Alias: None
Product: File System
Classification: Unclassified
Component: ext4 (show other bugs)
Hardware: x86-64 Linux
: P1 normal
Assignee: fs_ext4@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-10 18:47 UTC by TR Reardon
Modified: 2016-03-20 11:33 UTC (History)
2 users (show)

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


Attachments
kernel log, ext4 fs params (23.49 KB, application/octet-stream)
2014-05-10 18:47 UTC, TR Reardon
Details

Description TR Reardon 2014-05-10 18:47:17 UTC
Created attachment 135751 [details]
kernel log, ext4 fs params

ext4 lazyinit fails with corruption when competing with mdadm raid5 reconstruction.  In the _default_ scenario, mdadm doesn't initialize a new raid5 array but rather leaves the last drives as a rebuilding spare, rather than a full initialization.

Adding to the load, the volume was an encrypted LUKS volume (at /dev/mapper/private)

So the order of events:
1) create new 4x4TB RAID5 array via mdadm.  volume is started degraded and starts rebuilding while allowing access.
2) layer new encrypted LUKS volume: /dev/md1 -> /dev/mapper/private
3) create EXT4 volume with 64bit,sparse_super2,
4) mount volume with journal_async_commit
5) a slow rsync is started in background, averaging 5MB/s

Please see attached
Comment 1 Theodore Tso 2014-05-11 19:05:54 UTC
Is this something you can reliably reproduce?  The log doesn't tell us anything useful, and it's not clear whether the problem is with the dm-crypt (i.e., LUKS) layer, or with the ext4 layer.   All the log tells us is that we are waiting forever for a block I/O operation to finish in the jbd2 commit thread, and this is causing the lazyinit thread to give a soft lockup warning (meaning that two minutes has gone by without any forward progress taking place).

I suspect the problem is in an interaction between the dm-crypt and md raid5 code, which is being tickled by the I/O patterns that you've described.  But before we kick this over to the the device mapper developers, the first question is whether you can reliably reproduce the problem.
Comment 2 TR Reardon 2014-05-12 05:09:13 UTC
I cannot reproduce.  A quick glance at the stack made me fear that this was not an obvious ext4 problem but an interaction bug between block layers.  Still thought I should submit in case it proved useful...hard to easily repro errors building 16TB arrays on production servers

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