Date: Fri, 18 Oct 2013 18:17:47 -0600 From: "Justin T. Gibbs" <gibbs@FreeBSD.org> To: "Steven Hartland" <killing@multiplay.co.uk> Cc: hackers@freebsd.org Subject: Re: panic on close of /dev/xen/evtchn Message-ID: <96E387D7-C92C-4945-AD7B-F9C917BCCDC6@FreeBSD.org> In-Reply-To: <67CB0311850E47498A3E288F7A6CB9B5@multiplay.co.uk> References: <D8F3EEBB468441BC94618864FB2E0B04@multiplay.co.uk> <67CB0311850E47498A3E288F7A6CB9B5@multiplay.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
With the roto-tilling of the event channel stuff, I'm not sure that the = evtchn device works properly in a Xen environment. We should probably just disable it = globally for now. I will look into it more later tonight and tomorrow. -- Justin On Oct 18, 2013, at 6:04 PM, "Steven Hartland" <killing@multiplay.co.uk> = wrote: > Having a quick look I believe this device shouldn't even > be initialised unless its running under xen so I believe > the correct fix is:- >=20 > svn diff sys/xen/evtchn/evtchn_dev.c > Index: sys/xen/evtchn/evtchn_dev.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- sys/xen/evtchn/evtchn_dev.c (revision 256554) > +++ sys/xen/evtchn/evtchn_dev.c (working copy) > @@ -325,23 +325,23 @@ > .d_name =3D "evtchn", > }; >=20 > - > /* XXX - if this device is ever supposed to support use by more than = one process > * this global static will have to go away > */ > static struct cdev *evtchn_dev; >=20 > - > - > -static int > +static void > evtchn_dev_init(void *dummy __unused) > { > + if (!is_running_on_xen()) > + return; > + > /* XXX I believe we don't need these leaving them here for now = until we > * have some semblance of it working > */ > mtx_init(&upcall_lock, "evtchup", NULL, MTX_DEF); >=20 > - /* (DEVFS) create '/dev/misc/evtchn'. */ > + /* (DEVFS) create '/dev/xen/evtchn'. */ > evtchn_dev =3D make_dev(&evtchn_devsw, 0, UID_ROOT, GID_WHEEL, = 0600, "xen/evtchn"); >=20 > mtx_init(&lock, "evch", NULL, MTX_SPIN | MTX_NOWITNESS); > @@ -351,8 +351,6 @@ >=20 > if (bootverbose) > printf("Event-channel device installed.\n"); > - > - return 0; > } >=20 > SYSINIT(evtchn_dev_init, SI_SUB_DRIVERS, SI_ORDER_FIRST, = evtchn_dev_init, NULL); >=20 > Yes / No? >=20 > Regards > Steve > ----- Original Message ----- From: "Steven Hartland" = <killing@multiplay.co.uk> > To: <hackers@freebsd.org> > Sent: Friday, October 18, 2013 4:33 PM > Subject: panic on close of /dev/xen/evtchn >=20 >=20 >> Just had my test box panic while doing a: >> find / -print0 | xargs -0 cat >>=20 >> Ignoring the fact thats a silly command to run, the >> panic appears to be when it ran: >> cat /dev/xen/evtchn >>=20 >> On the session it then printed: >> cat: /dev/xen/evtchn: Interrupted system call >>=20 >> At this point the system paniced. >>=20 >> Panic transcribed from screen is: >>=20 >> Stopped at evtchn_close:0x67: lock bts| %ebx,0xa00(%rax) >>=20 >> db> bt >> Tracing pdi 1533 tid 100370 td 0xfffff8000796e920 >> evtchn_close() at evtchn_close+0x67/frame ... >> devfs_close() at devs_close+0x188/frame ... >> VOP_CLOSE_APV() at VOP_CLOSE_APV+0x139/frame ... >> vn_close() at vn_close+0x139/frame ... >> vn_closefile() at vn_closefile+0x48/frame ... >> _fdrop() at _fdrop+0x29/frame ... >> closef() at closef+0x1d1/frame ... >> closefp() at closefp+0xa0/frame ... >> amd64_syscall() at amd64_syscall+0x265/frame ... >> Xfast_syscall() at Xfast_syscall+0xfb/frame ... >> --- syscall (6, FreeBSD ELF64, sys_close), rip =3D 0x80094a9ea, rsp =3D= 0x7ffffffb8e28, rbp -=3D 0x7ffffffb8f70 --- >>=20 >> Regards >> Steve >>=20 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> This e.mail is private and confidential between Multiplay (UK) Ltd. = and the person or entity to whom it is addressed. In the event of = misdirection, the recipient is prohibited from using, copying, printing = or otherwise disseminating it or any information contained in it. >> In the event of misdirection, illegible or incomplete transmission = please telephone +44 845 868 1337 >> or return the E.mail to postmaster@multiplay.co.uk. >>=20 >> _______________________________________________ >> freebsd-hackers@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >> To unsubscribe, send any mail to = "freebsd-hackers-unsubscribe@freebsd.org" >=20 >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > This e.mail is private and confidential between Multiplay (UK) Ltd. = and the person or entity to whom it is addressed. In the event of = misdirection, the recipient is prohibited from using, copying, printing = or otherwise disseminating it or any information contained in it.=20 > In the event of misdirection, illegible or incomplete transmission = please telephone +44 845 868 1337 > or return the E.mail to postmaster@multiplay.co.uk. >=20 >=20
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?96E387D7-C92C-4945-AD7B-F9C917BCCDC6>