Date: Fri, 16 Mar 2001 14:31:18 -0800 (PST) From: John Baldwin <jhb@FreeBSD.org> To: Andrew Gallatin <gallatin@cs.duke.edu> Cc: freebsd-alpha@FreeBSD.org Subject: RE: user process faulting on kernel address Message-ID: <XFMail.010316143118.jhb@FreeBSD.org> In-Reply-To: <15026.37378.477855.889651@grasshopper.cs.duke.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On 16-Mar-01 Andrew Gallatin wrote: > > When running a linuxthreads app which basically sits in a loop > doing a pthread_create()/pthread_join() of a thread which just > exits, I'll occasionally see a very interesting thing -- > the app dies on an instruction fault on a kernel address. > > Enabling the DEBUG printtrap() calls in trap yeilds this information: > > login: > fatal user trap: > > trap entry = 0x2 (memory management fault) > a0 = 0xfffffc0000418be0 > a1 = 0x1 > a2 = 0xffffffffffffffff > pc = 0xfffffc0000418be0 > ra = 0x11ffbfc4 > curproc = 0xfffffe0006824cc0 > pid = 18788, comm = ex6 > > > Note that it is an instruction fault (a2 == -1) and the faulting > address maps to the bottom of witness_exit: > > (kgdb) l *0xfffffc0000418be0 > 0xfffffc0000418be0 is in witness_exit (../../kern/kern_mutex.c:1262). > 1257 m->mtx_line = line; > 1258 m->mtx_file = file; > 1259 p = curproc; > 1260 MPASS(m->mtx_held.le_prev == NULL); > 1261 LIST_INSERT_HEAD(&p->p_heldmtx, (struct mtx*)m, mtx_held); > 1262 } > 1263 > 1264 void > 1265 witness_exit(struct mtx *m, int flags, const char *file, int line) > 1266 { > > > The $ra looks reasonable, it is at least a userspace stack address. > > I think somebody saw this a while ago, but I cannot find their > message.. > > Any ideas? Weird. This might be related to the panics in witness_exit() during a LIST_REMOVE of the same list. Perhaps we are on an interrupt stack, but there should be some frames below witness_enter() if that were the case. :( > Drew -- John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.010316143118.jhb>