Dear kvm folks, In preparing a new release of mdadm for Debian in a KVM instance, I came across the following bug. mdadm runs from the initrd like so: /sbin/mdadm --assemble --scan --run --auto=yes which causes the two arrays /dev/md[01] listed in /etc/mdadm/mdadm.conf to be assembled: md0 : active raid1 sdb1[1] sda1[0] md1 : active raid1 sdc[0] vde[1] There's a third array I use for testing, and in this case that's md99 across vd[ab]. However, it is not mentioned in the config file, and hence mdadm should not even be touching it, but I guess it somehow does (see "last sysfs file" below). However, whenever I can reproduce this (sporadically), it is not always md99, but I have also seen md1 referenced instead. Begin: Assembling all MD arrays ... [ 4.711415] BUG: unable to handle kernel NULL pointer dereference at 0000000000000078 [ 4.715356] IP: [<ffffffffa0000074>] virtio_check_driver_offered_feature+0xb/0x2c [virtio] [ 4.715356] PGD d516067 PUD c1f1067 PMD 0 [ 4.715356] Oops: 0000 [#1] SMP [ 4.715356] last sysfs file: /sys/devices/virtual/block/md99/md/dev-vdb/state [ 4.715356] CPU 0 [ 4.715356] Modules linked in: sg sd_mod usb_storage sr_mod crc_t10dif cdrom ata_generic virtio_net raid1 md_mod uhci_hcd ehci_hcd ata_piix virtio_blk libata sym53c8xx scsi_transport_spi usbcore scsi_mod thermal floppy thermal_sys virtio_pci nls_base virtio_ring virtio [last unloaded: scsi_wait_scan] [ 4.715356] [ 4.715356] Pid: 303, comm: mdadm Tainted: G W 2.6.35-trunk-amd64 #1 /Bochs [ 4.715356] RIP: 0010:[<ffffffffa0000074>] [<ffffffffa0000074>] virtio_check_driver_offered_feature+0xb/0x2c [virtio] [ 4.715356] RSP: 0018:ffff88000c15dd70 EFLAGS: 00010246 [ 4.715356] RAX: 0000000000000000 RBX: 0000000000000007 RCX: 0000000000000000 [ 4.715356] RDX: 0000000000000000 RSI: 0000000000000007 RDI: ffff88000c14e800 [ 4.715356] RBP: ffff88000c14e800 R08: 0000000000040000 R09: 000000000000002f [ 4.715356] R10: 0000000000000000 R11: 0000000000000246 R12: ffff88000bd0c000 [ 4.715356] R13: 0000000000001261 R14: 0000000000000000 R15: 00000000ffffffe7 [ 4.715356] FS: 00007fe8834fa700(0000) GS:ffff880001a00000(0000) knlGS:0000000000000000 [ 4.715356] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 4.715356] CR2: 0000000000000078 CR3: 000000000d511000 CR4: 00000000000006f0 [ 4.715356] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 4.715356] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 [ 4.715356] Process mdadm (pid: 303, threadinfo ffff88000c15c000, task ffff88000bee4000) [ 4.715356] Stack: [ 4.715356] ffffffffa0239027 0000000000000000 ffff88000d7d9800 000000000000009d [ 4.715356] <0> ffffffffa023912f ffff88000f9e7000 ffffffff810f249f ffff88000d54b240 [ 4.715356] <0> 000000006c6bfb6b ffff88000f8532c8 ffff88000f414340 000000000000009d [ 4.715356] Call Trace: [ 4.715356] [<ffffffffa0239027>] ? virtio_has_feature+0x15/0x27 [virtio_blk] [ 4.715356] [<ffffffffa023912f>] ? virtblk_ioctl+0xf6/0x13b [virtio_blk] [ 4.715356] [<ffffffff810f249f>] ? do_last+0x41a/0x573 [ 4.715356] [<ffffffff8117b04c>] ? __blkdev_driver_ioctl+0x78/0xa3 [ 4.715356] [<ffffffff8117b473>] ? blkdev_ioctl+0x18e/0x68f [ 4.715356] [<ffffffff8110c4d8>] ? block_ioctl+0x32/0x36 [ 4.715356] [<ffffffff810f4f22>] ? vfs_ioctl+0x23/0x93 [ 4.715356] [<ffffffff810f57b3>] ? do_vfs_ioctl+0x45d/0x497 [ 4.715356] [<ffffffff810ec591>] ? sys_newfstat+0x20/0x29 [ 4.715356] [<ffffffff810f5838>] ? sys_ioctl+0x4b/0x6f [ 4.715356] [<ffffffff810089c2>] ? system_call_fastpath+0x16/0x1b [ 4.715356] Code: 40 02 00 00 48 89 fb 48 8b 68 18 ff 50 10 48 89 df 44 09 e0 5b 0f b6 f0 48 89 e8 5d 41 5c ff e0 48 8b 8f 90 00 00 00 31 d2 31 c0 <8b> 79 78 eb 13 4c 8b 41 70 45 8b 04 10 48 83 c2 04 41 39 f0 74 [ 4.715356] RIP [<ffffffffa0000074>] virtio_check_driver_offered_feature+0xb/0x2c [virtio] [ 4.715356] RSP <ffff88000c15dd70> [ 4.715356] CR2: 0000000000000078 [ 4.802829] ---[ end trace f208e39608524425 ]--- Killed Failure: failed to assemble all arrays. If I can be of help debugging this, please let me know. This is how I run kvm (using libvirt): /usr/bin/kvm -S -M pc-0.12 -enable-kvm -m 256 -smp 1,sockets=1,cores=1,threads=1 -name mdadm-lab.madduck.net -uuid 348415dc-b1e3-420c-a676-d79d95630cbd -nodefaults -chardev socket,id=monitor,path=/home/madduck/.libvirt/qemu/lib/mdadm-lab.madduck.net.monitor,server,nowait -mon chardev=monitor,mode=readline -rtc base=utc -boot cd -device lsi,id=scsi0,bus=pci.0,addr=0xb -device lsi,id=scsi1,bus=pci.0,addr=0xc -device lsi,id=scsi2,bus=pci.0,addr=0xd -device lsi,id=scsi3,bus=pci.0,addr=0xe -drive file=/root/super_grub_disk_hybrid-1.98s1.iso,if=none,media=cdrom,id=drive-scsi3-0-4,readonly=on -device scsi-disk,bus=scsi3.0,scsi-id=4,drive=drive-scsi3-0-4,id=scsi3-0-4 -drive file=/home/madduck/mdadm-lab.madduck.net/disk.hda,if=none,id=drive-ide0-0-0,boot=on -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -drive file=/home/madduck/mdadm-lab.madduck.net/disk.hdb,if=none,id=drive-ide0-0-1 -device ide-drive,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 -drive file=/home/madduck/mdadm-lab.madduck.net/disk.hdc,if=none,id=drive-ide0-1-0 -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -drive file=/home/madduck/mdadm-lab.madduck.net/disk.hdd,if=none,id=drive-ide0-1-1 -device ide-drive,bus=ide.1,unit=1,drive=drive-ide0-1-1,id=ide0-1-1 -drive file=/home/madduck/mdadm-lab.madduck.net/disk.vda,if=none,id=drive-virtio-disk0 -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0 -drive file=/home/madduck/mdadm-lab.madduck.net/disk.vdb,if=none,id=drive-virtio-disk1 -device virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk1,id=virtio-disk1 -drive file=/home/madduck/mdadm-lab.madduck.net/disk.vdc,if=none,id=drive-virtio-disk2 -device virtio-blk-pci,bus=pci.0,addr=0x6,drive=drive-virtio-disk2,id=virtio-disk2 -drive file=/home/madduck/mdadm-lab.madduck.net/disk.vdd,if=none,id=drive-virtio-disk3 -device virtio-blk-pci,bus=pci.0,addr=0x7,drive=drive-virtio-disk3,id=virtio-disk3 -drive file=/home/madduck/mdadm-lab.madduck.net/disk.vde,if=none,id=drive-virtio-disk4 -device virtio-blk-pci,bus=pci.0,addr=0x8,drive=drive-virtio-disk4,id=virtio-disk4 -drive file=/home/madduck/mdadm-lab.madduck.net/disk.vdf,if=none,id=drive-virtio-disk5 -device virtio-blk-pci,bus=pci.0,addr=0x9,drive=drive-virtio-disk5,id=virtio-disk5 -device virtio-net-pci,vlan=0,id=net0,mac=52:54:00:23:e0:07,bus=pci.0,addr=0xa -net tap,ifname=i_mdadm-lab,script=no,vlan=0,name=hostnet0 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -chardev socket,id=serial1,path=/home/madduck/mdadm-lab.madduck.net/ttyS1,server,nowait -device isa-serial,chardev=serial1 -usb -vnc 127.0.0.1:7 -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 -- martin | http://madduck.net/ | http://two.sentenc.es/ "... (ethik und ästhetik sind eins.)" -- wittgenstein spamtraps: madduck.bogus@xxxxxxxxxxx
Attachment:
digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)