From: Sami Liedes <sami.liedes@iki.fi>
To: Arne Jansen <sensille@gmx.net>,
linux-btrfs@vger.kernel.org,
Jan Schmidt <list.btrfs@jan-o-sch.net>
Subject: Re: btrfs GPF in read_extent_buffer() while scrubbing with kernel 3.4.2
Date: Sat, 28 Jul 2012 15:08:47 +0300 [thread overview]
Message-ID: <20120728120846.GA8733@sli.dy.fi> (raw)
In-Reply-To: <20120716212932.GB8653@sli.dy.fi>
[-- Attachment #1: Type: text/plain, Size: 2693 bytes --]
On Tue, Jul 17, 2012 at 12:29:33AM +0300, Sami Liedes wrote:
> So, currently my idea is to boot the machine with a live USB stick,
> install kvm and make qemu qcow images backed by the real (2*1.1T)
> devices, but writing changes to the qcow images (I dare not mess with
> the actual devices, and don't happen to have quite 2.2T extra space
> outside of them...), and try to run scrub there. If that succeeds and
> the bug happens there too, debugging *should* be easier, and it
> *should* be possible to run it under KMEMCHECK too. If the bug doesn't
> happen inside a virtual machine, that would be interesting information
> too.
I have now been able to reproduce the bug in KVM with the setup
described above.
I think it's safe to say now that the bug depends on some kind of
interaction between btrfs and dm-crypt. With the following setup, the
bug does NOT happen:
* kvm, single cpu
* sees 3 disks, /dev/vda=root, /dev/vdb=btrfs-dev1, /dev/vdc=btrfs-dev2
* The btrfs devices are essentially snapshots of the real btrfs
devices in raid-1 configuration (2*1.1T). As the real devices are
encrypted, the decryption is done outside the KVM, i.e. the KVM
snapshots are backed by the decrypted devices.
With the following setup, the bug DOES happen:
* kvm, single cpu
* sees 3 disks, /dev/vda=root, /dev/vdb=part1, /dev/vdc=part2, where
part[12] is are LUKS containers containing the individual btrfs
devices
* inside kvm, they are opened using
cryptsetup luksOpen /dev/vdb root1
cryptsetup luksOpen /dev/vdc root2
* after this, the filesystem is mounted with
mount /dev/mapper/root1 /media -o device=/dev/mapper/root1,device=/dev/mapper/root2
* The devices are snapshots of the actual physical encrypted
partitions containing the btrfs devices.
I have not yet figured out if this can be reproduced using a pristine,
smaller btrfs filesystem in raid-1 configuration inside KVM or if
there's something about my specific filesystem that causes this. I can
investigate that too; it's easier to do for me than the above testing,
as I don't need to have continuous physical access to the computer to
do that.
Here's the .config of the kernel I used inside KVM to reproduce this:
http://www.niksula.hut.fi/~sliedes/btrfs/config.3.4.4
I also ran the same tests with KMEMCHECK. Both with and without
crypto, there were quite a number of (of course possibly false)
warnings from btrfs code. I doubt any of them are related to this bug
- there were no KMEMCHECK warnings during the scrub operation. Here
are the logs, anyway:
http://www.niksula.hut.fi/~sliedes/btrfs/screenlog.nocrypto.gz
http://www.niksula.hut.fi/~sliedes/btrfs/screenlog.crypto.gz
Sami
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-07-28 12:09 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-02 23:01 btrfs GPF in read_extent_buffer() while scrubbing with kernel 3.4.2 Sami Liedes
2012-07-02 23:08 ` Sami Liedes
2012-07-03 13:11 ` Jan Schmidt
2012-07-03 13:58 ` Sami Liedes
2012-07-03 14:35 ` Jan Schmidt
2012-07-03 22:47 ` Sami Liedes
2012-07-04 0:17 ` Sami Liedes
2012-07-04 11:26 ` Jan Schmidt
2012-07-04 16:03 ` Sami Liedes
2012-07-04 16:38 ` Jan Schmidt
2012-07-04 20:24 ` Sami Liedes
2012-07-05 13:41 ` Jan Schmidt
2012-07-05 23:47 ` Sami Liedes
2012-07-06 10:42 ` Jan Schmidt
2012-07-06 11:50 ` Chris Mason
2012-07-06 14:33 ` Sami Liedes
2012-07-06 14:40 ` Chris Mason
2012-07-06 15:02 ` Jan Schmidt
2012-07-06 15:19 ` Chris Mason
2012-07-06 15:09 ` Jan Schmidt
[not found] ` <20120706195923.GA10687@sli.dy.fi>
2012-07-06 21:41 ` Sami Liedes
2012-07-06 23:44 ` Sami Liedes
2012-07-09 9:05 ` *** GMX Spamverdacht *** " Arne Jansen
2012-07-10 4:16 ` Sami Liedes
2012-07-10 6:05 ` Arne Jansen
2012-07-10 6:57 ` *** GMX Spamverdacht *** " Arne Jansen
2012-07-16 8:20 ` Arne Jansen
2012-07-16 21:29 ` Sami Liedes
2012-07-28 12:08 ` Sami Liedes [this message]
2012-07-28 18:50 ` Sami Liedes
2012-07-03 13:14 ` Sami Liedes
2013-03-27 11:54 ` Stefan Behrens
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120728120846.GA8733@sli.dy.fi \
--to=sami.liedes@iki.fi \
--cc=linux-btrfs@vger.kernel.org \
--cc=list.btrfs@jan-o-sch.net \
--cc=sensille@gmx.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.