From: Pasi =?iso-8859-1?Q?K=E4rkk=E4inen?= Subject: Re: Xen 4.0.0x allows for data corruption in Dom0 Date: Tue, 9 Mar 2010 10:25:34 +0200 Message-ID: <20100309082534.GH2580@reaktio.net> References: <20100307143631.GO2580@reaktio.net> <20100307161256.GQ2580@reaktio.net> <1268090552.27980.288.camel@agari.van.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <1268090552.27980.288.camel@agari.van.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Daniel Stodden Cc: "xen-devel@lists.xensource.com" , Keir Fraser , Joanna Rutkowska List-Id: xen-devel@lists.xenproject.org On Mon, Mar 08, 2010 at 03:22:32PM -0800, Daniel Stodden wrote: > On Sun, 2010-03-07 at 11:12 -0500, Pasi K=E4rkk=E4inen wrote: > > On Sun, Mar 07, 2010 at 02:39:09PM +0000, Keir Fraser wrote: > > > On 07/03/2010 14:36, "Pasi K=E4rkk=E4inen" wrote: > > >=20 > > > >> Tried a few times and no luck reproducing so far. I hope some ot= her people > > > >> on the list also will give it a go, since it's so easy to try it= out. > > > >>=20 > > > >=20 > > > > I'm able to reproduce this with xen/master 2.6.31.6 dom0 kernel (= from > > > > 2010-02-20), > > > > but I'm not able to reproduce it with the current xen/stable 2.6.= 32.9. > > > >=20 > > > > I'll try with the most recent 2.6.31.6 dom0 kernel aswell.. > > >=20 > > > Thanks Pasi! > > >=20 > >=20 > > It seems to happen with the latest xen/master 2.6.31.6 aswell! >=20 > Does this look to you like we're corrupting memory or on-disk storage? >=20 > E.g. does a > $ dd if=3D/dev/zero bs=3D1M | hexdump -C=20 > have the same issue? >=20 > I have some initial trouble with the idea that zero.read() in a PV domU > somehow unlearned to scrub a 1M user buffer. >=20 My setup: Dom0 distro: Fedora 12 Xen hypervisor: 4.0.0-rc5 x86_64 Dom0 kernel: latest xen/master 2.6.31.6 x86_64 Xen hypervisor boot options in grub.conf: dom0_mem=3D1G loglvl=3Dall gues= t_loglvl=3Dall Dom0 kernel boot options in grub.conf: ro root=3D/dev/mapper/vg_f12test-l= v01 SYSFONT=3Dlatarcyrheb-sun16 LANG=3Den_US.UTF-8 KEYTABLE=3Dfi nomodese= t Steps to reproduce the bug: 1. Reboot the system 2. Start a dummy guest using the domU kernel (rpm) provided in the origin= al bugreport: # xm create -c /dev/null memory=3D400 kernel=3D"vmlinuz-2.6.31.9-1.2.82.x= endom0.fc12.x86_64" extra=3D"rootdelay=3D1000" 3. run in dom0: # dd if=3D/dev/zero of=3Dtest bs=3D1M count=3D10000 && sync && sync && xx= d test | grep -v "0000 0000 0000 0000 0000 0000 0000 0000" 10000+0 records in 10000+0 records out 10485760000 bytes (10 GB) copied, 233.621 s, 44.9 MB/s 6039000: 1000 0000 0000 0000 c0b0 ffff 0300 0000 ................ 6039010: 1d5e 06ab b502 0000 1eb2 27b5 ff00 0000 .^........'..... 2dfe9000:3000 0000 0000 0000 a43c 7687 0e00 0000 0........ /proc/sys/vm/drop_= caches" in dom0, and then re-start the dummy domU, and try the other method as requested b= y Daniel: # dd if=3D/dev/zero bs=3D1M | hexdump -C 00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |............= ....| * ^C20984+0 records in 20983+0 records out 22002270208 bytes (22 GB) copied, 206.353 s, 107 MB/s So that method didn't show the corruption.. Now immediately after (no domU restart) let's try to reproduce again with= the dd + xxd method: # dd if=3D/dev/zero of=3Dtest bs=3D1M count=3D10000 && sync && sync && xx= d test | grep -v "0000 0000 0000 0000 0000 0000 0000 0000" 10000+0 records in 10000+0 records out 10485760000 bytes (10 GB) copied, 258.85 s, 40.5 MB/s 7dc2000: 5a02 0000 0000 0000 760d d90c c500 0000 Z.......v....... 7dc2010: 3785 8def 8003 0000 1eb2 27b5 ff00 0000 7.........'..... 2dc0d000:7802 0000 0000 0000 ec70 d8eb ce00 0000 x........p...... 2dc0d010:6fb9 a66d 8403 0000 1eb2 27b5 ff00 0000 o..m......'..... So it seems to be related to disk IO in dom0?=20 -- Pasi