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:
extra="bootdev=xennet0"

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.
xentools33-3.3.2nb5
xenkernel33-3.3.2nb3
domU is netbsd-5 with i386 XEN3PAE_DOMU kernel.

BR,
        -- 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
(%edx)
db> bt
xennet_init(cbd22004,e21dcdfc,37613dc2,f5f1c436,cb516004,6,c06cc828,c03b9d63,cbd
22004,8090690c) at netbsd:xennet_init+0x37
ether_ioctl(cbd22004,8090690c,c1a38500,f5f1c436,cb516004,c1a38500,c06cc878,c0115
5eb,cbd22004,8090690c) at netbsd:ether_ioctl+0x1ee
xennet_ioctl(cbd22004,8090690c,c1a38500,f5f1c436,82912262,ffd9d673,0,8040691a,cb
d22004,c1a38500) at netbsd:xennet_ioctl+0x33
in_ifinit(cbd22004,c1a38500,c06ccab8,0,8040691a,0,c06cc8c8,c02d6f10,c04bdd02,3f)
at netbsd:in_ifinit+0xfb
in_control(c1a11dc0,8040691a,c06ccaa8,cbd22004,c045fe40,c045fe40,0,c06ccaa8,c040
59b0,8040691a) at netbsd:in_control+0xd63
compat_ifioctl(c1a11dc0,8040691a,8040691a,c06ccaa8,c045fe40,c046a7f4,cbd22004,c0
6ccaa8,ffff8822,0) at netbsd:compat_ifioctl+0xa8
ifioctl(c1a11dc0,8040691a,c06ccaa8,c045fe40,c045fe40,0,0,c03b8f1d,1,c06ccab4) at
netbsd:ifioctl+0x2c5
nfs_boot_setaddress(cbd22004,c045fe40,0,0,0,c1a00011,cbd22004,c045fe40,c01004ce,
c06ccb58) at netbsd:nfs_boot_setaddress+0xdf
nfs_bootstatic(cb516c10,c045fe40,c06ccbf4,0,0,0,0,1001,0,1000005) at netbsd:nfs_
bootstatic+0xb0
nfs_boot_init(cb516c10,c045fe40,73,c042aee5,0,19,0,ffff0011,cc0031,11) at netbsd
:nfs_boot_init+0x335
nfs_mountroot(c04c13a0,c042aee2,cacd12c0,c04be378,c04be378,a,c06ccd38,c02b5743,c
04be8c0,0) at netbsd:nfs_mountroot+0x74
vfs_mountroot(c04be8c0,0,14,0,0,c02b5ac0,0,0,c04be378,0) at netbsd:vfs_mountroot
+0x16b
main(c0100063,c010006b,0,0,0,0,0,0,0,0) at netbsd:main+0x2e3

EOF



Home | Main Index | Thread Index | Old Index