From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 19 00:18:00 2013 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 57EB2CCB for ; Sat, 19 Oct 2013 00:18:00 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from aslan.scsiguy.com (aslan.scsiguy.com [70.89.174.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1F6BB284F for ; Sat, 19 Oct 2013 00:17:59 +0000 (UTC) Received: from [10.0.0.21] (65.105.242.98.ptr.us.xo.net [65.105.242.98]) (authenticated bits=0) by aslan.scsiguy.com (8.14.7/8.14.5) with ESMTP id r9J0HomQ001362 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 18 Oct 2013 18:17:52 -0600 (MDT) (envelope-from gibbs@FreeBSD.org) Subject: Re: panic on close of /dev/xen/evtchn Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Content-Type: text/plain; charset=iso-8859-1 From: "Justin T. Gibbs" X-Priority: 3 In-Reply-To: <67CB0311850E47498A3E288F7A6CB9B5@multiplay.co.uk> Date: Fri, 18 Oct 2013 18:17:47 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <96E387D7-C92C-4945-AD7B-F9C917BCCDC6@FreeBSD.org> References: <67CB0311850E47498A3E288F7A6CB9B5@multiplay.co.uk> To: "Steven Hartland" X-Mailer: Apple Mail (2.1510) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (aslan.scsiguy.com [70.89.174.89]); Fri, 18 Oct 2013 18:17:53 -0600 (MDT) Cc: hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Oct 2013 00:18:00 -0000 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" = 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" = > To: > 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