Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Recent change to if_xennet_xenbus.c broke domU with root on NFS?

Hi all,

I just upgraded an oldish netbsd-5 domU to a more recent version and it now 
panics immediately on boot. After some digging around I found that it works if 
I back out this change to if_xennet_xenbus.c:

revision 1.42
date: 2010/10/16 00:12:08;  author: jym;  state: Exp;  lines: +6 -13
Features (like feature-rx-copy) are set during XenbusStateInitWait in
backend. So delay xennet_xenbus_resume() up to notification of
backend state change.

This avoids a race that happens during dynamic attach/detach of network
interfaces with xm(1), where frontend queries xenstore for features not
yet reported by backend. This does not happen during normal domU boot,
as the backend has enough time to fill in these entries before frontend
asks for them.

Issue was reported by sborrill@: detaching xennet interfaces with RX copy
mode enabled turns them back during attach to RX flip mode due to the race.

feature-rx-copy support is part of another patch.

I get the same behaviour both with a netbsd-5 and -current domU. With the file 
on r1.41 it works fine, with r1.42 it panics.

Panic message is included below. This is totally reproducible for me, so just 
let me know if you need more info.

I suspect it is this domU config that is the problem:

# Make it do root on NFS without user interaction:

If I run an identical domU with root file system on a local disk image, instead 
of with root on NFS, it all works fine.

Unfortunately I have no idea about the Xen states so this is about as far as I 
have come.

dom0 is NetBSD/amd64 a bit old -current.
domU is netbsd-5 with i386 XEN3PAE_DOMU kernel.

        -- Urban

boot device: xennet0
root on xennet0
mountroot: trying lfs...
mountroot: trying ffs...
mountroot: trying ext2fs...
mountroot: trying nfs...
nfs_boot: trying static
uvm_fault(0xc04bf300, 0, 2) -> 0xe
fatal page fault in supervisor mode
trap type 6 code 2 eip c03b93e7 cs 9 eflags 10202 cr2 c ilevel 6
kernel: supervisor trap page fault, code=0
Stopped in pid 0.1 (system) at  netbsd:xennet_init+0x37:        movl    %eax,0xc
db> bt
22004,8090690c) at netbsd:xennet_init+0x37
5eb,cbd22004,8090690c) at netbsd:ether_ioctl+0x1ee
d22004,c1a38500) at netbsd:xennet_ioctl+0x33
at netbsd:in_ifinit+0xfb
59b0,8040691a) at netbsd:in_control+0xd63
6ccaa8,ffff8822,0) at netbsd:compat_ifioctl+0xa8
ifioctl(c1a11dc0,8040691a,c06ccaa8,c045fe40,c045fe40,0,0,c03b8f1d,1,c06ccab4) at
c06ccb58) at netbsd:nfs_boot_setaddress+0xdf
nfs_bootstatic(cb516c10,c045fe40,c06ccbf4,0,0,0,0,1001,0,1000005) at netbsd:nfs_
nfs_boot_init(cb516c10,c045fe40,73,c042aee5,0,19,0,ffff0011,cc0031,11) at netbsd
04be8c0,0) at netbsd:nfs_mountroot+0x74
vfs_mountroot(c04be8c0,0,14,0,0,c02b5ac0,0,0,c04be378,0) at netbsd:vfs_mountroot
main(c0100063,c010006b,0,0,0,0,0,0,0,0) at netbsd:main+0x2e3


Home | Main Index | Thread Index | Old Index