From owner-freebsd-alpha@FreeBSD.ORG Wed Mar 31 12:55:27 2004 Return-Path: Delivered-To: freebsd-alpha@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 081DD16A506 for ; Wed, 31 Mar 2004 12:55:27 -0800 (PST) Received: from mail3.speakeasy.net (mail3.speakeasy.net [216.254.0.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5F2B043D5A for ; Wed, 31 Mar 2004 12:55:19 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 11695 invoked from network); 31 Mar 2004 20:55:17 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 31 Mar 2004 20:55:17 -0000 Received: from 10.50.40.205 (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.10/8.12.10) with ESMTP id i2VKsMDG048661; Wed, 31 Mar 2004 15:54:48 -0500 (EST) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: alpha@FreeBSD.org Date: Tue, 30 Mar 2004 18:24:20 -0500 User-Agent: KMail/1.6 References: <20040329212151.GA10421@electra.cse.Buffalo.EDU> In-Reply-To: <20040329212151.GA10421@electra.cse.Buffalo.EDU> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200403301824.20780.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: Ken Smith cc: freebsd-alpha@freebsd.org cc: freebsd-current@freebsd.org Subject: Re: -current panic X-BeenThere: freebsd-alpha@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Alpha List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2004 20:55:27 -0000 On Monday 29 March 2004 04:21 pm, Ken Smith wrote: > Is this one a known issue on alpha or is it something new? While > someone was using gdb on beast (alpha cluster ref machine) to trace > a program beast crashes with this: > > panic: mutex process lock not owned at ../../../kern/kern_mutex.c:277 > at line 719 in file ../../../kern/kern_mutex.c > cpuid = 1; > Stack backtrace: > db_print_backtrace() at db_print_backtrace+0x18 > backtrace() at backtrace+0x2c > __panic() at __panic+0x210 > _mtx_assert() at _mtx_assert+0xec > _mtx_unlock_flags() at _mtx_unlock_flags+0xa4 > ptrace_single_step() at ptrace_single_step+0x6c > kern_ptrace() at kern_ptrace+0x3c4 > ptrace() at ptrace+0xe8 > syscall() at syscall+0x37c > XentSys() at XentSys+0x64 > --- syscall (26) --- > --- user mode --- > boot() called on cpu#1 > > It seems to be reproducible... This is what I tried to get tested earlier. :) Try this patch below: Index: machdep.c =================================================================== RCS file: /usr/cvs/src/sys/alpha/alpha/machdep.c,v retrieving revision 1.218 diff -u -r1.218 machdep.c --- machdep.c 1 Mar 2004 19:19:15 -0000 1.218 +++ machdep.c 30 Mar 2004 23:22:34 -0000 @@ -1914,10 +1914,9 @@ if (td->td_md.md_flags & (MDTD_STEP1|MDTD_STEP2)) panic("ptrace_single_step: step breakpoints not removed"); - PROC_UNLOCK(td->td_proc); error = ptrace_read_int(td, pc, &ins.bits); if (error) - goto err; + return (error); switch (ins.branch_format.opcode) { @@ -1957,20 +1956,18 @@ td->td_md.md_sstep[0].addr = addr[0]; error = ptrace_set_bpt(td, &td->td_md.md_sstep[0]); if (error) - goto err; + return (error); if (count == 2) { td->td_md.md_sstep[1].addr = addr[1]; error = ptrace_set_bpt(td, &td->td_md.md_sstep[1]); if (error) { ptrace_clear_bpt(td, &td->td_md.md_sstep[0]); - goto err; + return (error); } td->td_md.md_flags |= MDTD_STEP2; } else td->td_md.md_flags |= MDTD_STEP1; -err: - PROC_LOCK(td->td_proc); return (error); } -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org