From owner-freebsd-current@FreeBSD.ORG Wed Jul 30 13:48:45 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 801E037B404 for ; Wed, 30 Jul 2003 13:48:45 -0700 (PDT) Received: from mail.speakeasy.net (mail10.speakeasy.net [216.254.0.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id 69A0B43FAF for ; Wed, 30 Jul 2003 13:48:44 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 28552 invoked from network); 30 Jul 2003 20:48:43 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender )encrypted SMTP for ; 30 Jul 2003 20:48:43 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.9/8.12.9) with ESMTP id h6UKmaGI068855; Wed, 30 Jul 2003 16:48:38 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20030728104725.GA52281@rot13.obsecurity.org> Date: Wed, 30 Jul 2003 16:48:57 -0400 (EDT) From: John Baldwin To: Kris Kennaway cc: alpha@FreeBSD.org cc: current@FreeBSD.org Subject: RE: panic: sleeping thread owns a mutex X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jul 2003 20:48:45 -0000 On 28-Jul-2003 Kris Kennaway wrote: > One of the alpha package machines just died with the following: > > panic: sleeping thread owns a mutex > panic() at panic+0x160 > propagate_priority() at propagate_priority+0x148 > _mtx_lock_sleep() at _mtx_lock_sleep+0x264 > _mtx_lock_flags() at _mtx_lock_flags+0x84 > _vm_map_lock() at _vm_map_lock+0x40 > vm_map_remove() at vm_map_remove+0x34 > kmem_free() at kmem_free+0x34 > pipe_free_kmem() at pipe_free_kmem+0xbc > pipeclose() at pipeclose+0x188 > pipe_close() at pipe_close+0x40 > fdrop_locked() at fdrop_locked+0x180 > fdrop() at fdrop+0x50 > closef() at closef+0x260 > fdfree() at fdfree+0x3c4 > exit1() at exit1+0x578 > sys_exit() at sys_exit+0x58 > syscall() at syscall+0x338 > XentSys() at XentSys+0x64 > --- syscall (1, FreeBSD ELF64, sys_exit) --- > --- user mode --- > db> > > (gdb -k is still broken on alpha, so I can't do better). The machine > is running a kernel from June 20. The only way to track these down is to use witness. By the time we get here it becomes a lot harder to track down. It does look to be alc@'s fault since it is a vm_map mutex however. To get better info, you are going to need to do the following in ddb when it panics: - Examine the mutex structure to find the lock owner, then examine the thread structure to find the proc pointer, and finally, examine the proc structure to find the pid. - or - - Change the panic message to print the PID. I just committed this. Then: - trace to see where it slept -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/