From owner-freebsd-current Thu Mar 12 09:57:43 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA24807 for freebsd-current-outgoing; Thu, 12 Mar 1998 09:57:43 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from pat.idi.ntnu.no (0@pat.idi.ntnu.no [129.241.103.5]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA24758; Thu, 12 Mar 1998 09:57:31 -0800 (PST) (envelope-from Tor.Egge@idi.ntnu.no) Received: from idi.ntnu.no (tegge@presis.idi.ntnu.no [129.241.111.173]) by pat.idi.ntnu.no (8.8.8/8.8.8) with ESMTP id SAA05731; Thu, 12 Mar 1998 18:53:43 +0100 (MET) Message-Id: <199803121753.SAA05731@pat.idi.ntnu.no> To: root@mantar.slip.netcom.com Cc: current@FreeBSD.ORG, smp@FreeBSD.ORG Subject: Re: spkrtest locks up system In-Reply-To: Your message of "Wed, 11 Mar 1998 18:31:52 -0800 (PST)" References: X-Mailer: Mew version 1.70 on Emacs 19.34.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Thu, 12 Mar 1998 18:53:42 +0100 From: Tor Egge Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > On a current SMP system when I run spkrtest the system locks up. > On a kernel built around the 26th of Feb no problem. I have a old version > of spkrtest v1.0 by Eric S. Raymond (Feb 1990) that I use as sort of > a backup alarm clock. I was wondering why for the past couple of weeks > I'd wake up and the machine would be locked up. The current graphical > version does the same thing. I have no sound card installed. One time > it dropped into the debugger , now it just locks up. There was something > about _mplock if i remember right. There was alot of changes to current > around the end of Feb. (SMP and locking) and I'm not sure which is causing > the problem. Sorry I can't be of more help. > Manfred The following patch might be appropiate. Without this patch, the kernel can deadlock or panic when attempting to enter a critical region protected by disable_intr()/enable_intr(), since the mpintr_lock might be held by the last cpu having prezeroed a page. Index: sys/i386/i386/vm_machdep.c =================================================================== RCS file: /home/ncvs/src/sys/i386/i386/vm_machdep.c,v retrieving revision 1.101 diff -u -r1.101 vm_machdep.c --- vm_machdep.c 1998/02/25 03:56:09 1.101 +++ vm_machdep.c 1998/03/08 06:00:49 @@ -950,7 +967,7 @@ if (try_mplock()) { #endif s = splvm(); - enable_intr(); + __asm __volatile("sti" : : : "memory"); m = vm_page_list_find(PQ_FREE, free_rover); if (m != NULL) { --(*vm_page_queues[m->queue].lcnt); @@ -973,7 +990,7 @@ ++cnt_prezero; } splx(s); - disable_intr(); + __asm __volatile("cli" : : : "memory"); #ifdef SMP rel_mplock(); return (1); - Tor Egge To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message