Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
virtio + raid1 = kernel panic
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
john.newman
Tux's lil' helper
Tux's lil' helper


Joined: 17 Oct 2009
Posts: 85

PostPosted: Fri Sep 07, 2012 5:04 am    Post subject: virtio + raid1 = kernel panic Reply with quote

Hi

Today one of my VMs started throwing kernel panics as I was trying to update it. I'm just wondering how exactly I can debug this problem to the root cause and work with whomever (?) is upstream to go about getting the fix merged in.

This is with 3.3.8 .. I am _trying to update world, and get over to 3.4 ... perhaps I will just update gentoo-sources out of band and see if the problem still persists there first. If I can even do that without getting the panic that is... Well, I could also backout this raid1 setup if that happens

It happens due to heavy disk IO on /var. This VM has a 'hybrid raid 1' setup for /var. It's a ramdisk + a physical partition, created with "write-behind" and "write-mostly". The idea is to have a full copy of /var loaded into RAM, such that mostly all reads will come from the ramdisk, and writes will lean there as well and eventually sink down to the persistent disk. On startup the array boots degraded just with the partition, then in localstart I add /dev/ram0 to it and it takes a second to rebuild. Really I think this is a pretty sweet idea, but I haven't gone about measuring the performance yet. I got the idea from here: https://bbs.archlinux.org/viewtopic.php?pid=493773#p493773 and here http://www.linuxquestions.org/questions/linux-general-1/using-tmpfs-is-not-improving-performance-761822/#post3719872 (Yes .. this box is plugged into a UPS :o )


I figured out how to get the serial console setup (very nice) and actually got the full trace:

Code:
[ 163.258020] kernel BUG at drivers/block/virtio_blk.c:198!
[ 163.258020] invalid opcode: 0000 [#1] SMP
[ 163.258020] CPU 0
[ 163.258020] Modules linked in: virtio_net
[ 163.258020]
[ 163.258020] Pid: 836, comm: md0_raid1 Not tainted 3.3.8-gentoo-virt-2.20 #2 Bochs Bochs
[ 163.258020] RIP: 0010:[<ffffffff8134e6a7>] [<ffffffff8134e6a7>] do_virtblk_request+0x447/0x450
[ 163.270956] RSP: 0018:ffff8801198afc30 EFLAGS: 00010002
[ 163.270956] RAX: 0000000000000082 RBX: ffff880119880000 RCX: ffffffffffffffff
[ 163.270956] RDX: 0000000000000000 RSI: ffff88005ee62dc0 RDI: ffff880119880000
[ 163.270956] RBP: ffff880119870000 R08: 0000000000000001 R09: 0000000000000001
[ 163.270956] R10: 0000000000000000 R11: 0000000000008000 R12: ffff88005ee62dc0
[ 163.270956] R13: ffff8801198afcd0 R14: ffffea0000000000 R15: ffff880119880000
[ 163.270956] FS: 0000000000000000(0000) GS:ffff88011fc00000(0000) knlGS:0000000000000000
[ 163.270956] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 163.270956] CR2: 0000000001545e4c CR3: 0000000118288000 CR4: 00000000000006f0
[ 163.270956] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 163.270956] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 163.270956] Process md0_raid1 (pid: 836, threadinfo ffff8801198ae000, task ffff88011abdc980)
[ 163.270956] Stack:
[ 163.270956] ffff88011aada658 ffff880119878800 ffff880119878800 ffff88005ee62420
[ 163.270956] 000000001aada658 ffffffff81272bf6 ffff880119870088 ffff880119870020
[ 163.270956] ffff88005ee62420 ffff880119880000 0000000000000246 0000000000000000
[ 163.270956] Call Trace:
[ 163.270956] [<ffffffff81272bf6>] ? cfq_add_rq_rb+0x96/0xd0
[ 163.270956] [<ffffffff81264fb2>] ? queue_unplugged.clone.39+0x22/0x50
[ 163.270956] [<ffffffff81265adf>] ? blk_flush_plug_list+0x19f/0x220
[ 163.270956] [<ffffffff81265b6b>] ? blk_finish_plug+0xb/0x30
[ 163.270956] [<ffffffff813d60f5>] ? raid1d+0x7d5/0xf30
[ 163.270956] [<ffffffff81023bf5>] ? default_spin_lock_flags+0x5/0x10
[ 163.270956] [<ffffffff814e81d6>] ? _raw_spin_lock_irqsave+0x26/0x40
[ 163.270956] [<ffffffff8104c0b3>] ? lock_timer_base.clone.25+0x33/0x70
[ 163.270956] [<ffffffff8104c406>] ? try_to_del_timer_sync+0x66/0x80
[ 163.270956] [<ffffffff81023bf5>] ? default_spin_lock_flags+0x5/0x10
[ 163.270956] [<ffffffff814e81d6>] ? _raw_spin_lock_irqsave+0x26/0x40
[ 163.270956] [<ffffffff81023bf5>] ? default_spin_lock_flags+0x5/0x10
[ 163.270956] [<ffffffff814e81d6>] ? _raw_spin_lock_irqsave+0x26/0x40
[ 163.270956] [<ffffffff813f178e>] ? md_thread+0x11e/0x150
[ 163.270956] [<ffffffff8105c390>] ? wake_up_bit+0x40/0x40
[ 163.270956] [<ffffffff813f1670>] ? md_register_thread+0x110/0x110
[ 163.270956] [<ffffffff813f1670>] ? md_register_thread+0x110/0x110
[ 163.270956] [<ffffffff8105bebe>] ? kthread+0x9e/0xb0
[ 163.270956] [<ffffffff814e9ee4>] ? kernel_thread_helper+0x4/0x10
[ 163.270956] [<ffffffff8105be20>] ? kthread_freezable_should_stop+0x60/0x60
[ 163.270956] [<ffffffff814e9ee0>] ? gs_change+0x13/0x13
[ 163.270956] Code: 4c 89 ff e8 3c 57 f1 ff 8b 4c 24 24 85 c9 0f 84 ff fd ff ff 48 8b 7d 10 48 83 c4 48 5b 5d 41 5c 41 5d 41 5e 41 5f e9 19 cd fc ff <0f> 0b 0f 1f 80 00 00 00 00 48 83 ec 78 48 89 5c 24 48 48 89 6c
[ 163.270956] RIP [<ffffffff8134e6a7>] do_virtblk_request+0x447/0x450
[ 163.270956] RSP <ffff8801198afc30>
[ 163.270956] ---[ end trace c6cdc075234b53fa ]---



This setup has been fine for months, back on 3.0 ... and i've been on 3.3.8 with it since it came out, updated world several times. No problems until today, AFAIK nothing else really has changed.

So, can I just submit this somewhere, or are there any tips to help me get started getting this into GDB? TIA
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum