Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 May 2001 13:29:22 -0700
From:      Dima Dorfman <dima@unixfreak.org>
To:        David Malone <dwmalone@maths.tcd.ie>
Cc:        mheffner@vt.edu, freebsd-current@freebsd.org, alfred@freebsd.org
Subject:   Re: panic: mutex vm not owned 
Message-ID:  <20010520202933.847EB3E0B@bazooka.unixfreak.org>
In-Reply-To: <20010520205211.A88802@walton.maths.tcd.ie>; from dwmalone@maths.tcd.ie on "Sun, 20 May 2001 20:52:11 %2B0100"

next in thread | previous in thread | raw e-mail | index | archive | help
David Malone <dwmalone@maths.tcd.ie> writes:
> On Sun, May 20, 2001 at 12:59:51PM -0400, Mike Heffner wrote:
> > The machine is up for about one minute and then I ran `startx' and the
> > screen turned black and it appeared to lockup, after about 30 seconds
> > plus some banging on the keyboard it rebooted. I have 256mb ram, so it
> > shouldn't be swapping at this point. The kernel and world are cvsupd
> > to about 12am May 20 EDT, the following is the panic message:
> 
> I'm getting a panic whenever I start X too (with a kernel from
> earlier today). I managed to get a DDB trace from a serial console.

Please try the attached patch.  I make no claims of its correctness,
but this e-mail is coming to you via X on -current updated a few hours
ago so it works here :-).

I had to manually edit out some unrelated local changes, so if you
have trouble applying it fetch the full one from
http://www.unixfreak.org/~dima/home/shm-full.diff.  That one has local
changes (new sysctls), but they (probably) won't hurt you.

Thanks,

					Dima Dorfman
					dima@unixfreak.org


Index: sysv_shm.c
===================================================================
RCS file: /stl/src/FreeBSD/src/sys/kern/sysv_shm.c,v
retrieving revision 1.56
diff -u -r1.56 sysv_shm.c
--- sysv_shm.c	2001/05/19 01:28:03	1.56
+++ sysv_shm.c	2001/05/20 20:26:28
@@ -182,7 +186,9 @@
 	size_t size;
 
 	shm_handle = shmseg->shm_internal;
+	mtx_lock(&vm_mtx);
 	vm_object_deallocate(shm_handle->shm_object);
+	mtx_unlock(&vm_mtx);
 	free((caddr_t)shm_handle, M_SHM);
 	shmseg->shm_internal = NULL;
 	size = round_page(shmseg->shm_segsz);
@@ -203,7 +209,9 @@
 	segnum = IPCID_TO_IX(shmmap_s->shmid);
 	shmseg = &shmsegs[segnum];
 	size = round_page(shmseg->shm_segsz);
+	mtx_lock(&vm_mtx);
 	result = vm_map_remove(&p->p_vmspace->vm_map, shmmap_s->va, shmmap_s->va + size);
+	mtx_unlock(&vm_mtx);
 	if (result != KERN_SUCCESS)
 		return EINVAL;
 	shmmap_s->shmid = -1;

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010520202933.847EB3E0B>