From owner-freebsd-current@FreeBSD.ORG Mon Aug 22 19:48:41 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org 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 E7DAC16A41F for ; Mon, 22 Aug 2005 19:48:41 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from mv.twc.weather.com (mv.twc.weather.com [65.212.71.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5F89D43D46 for ; Mon, 22 Aug 2005 19:48:39 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from [10.50.40.201] (Not Verified[10.50.40.201]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Mon, 22 Aug 2005 16:03:45 -0400 From: John Baldwin To: freebsd-current@freebsd.org Date: Mon, 22 Aug 2005 15:49:22 -0400 User-Agent: KMail/1.8 References: <200508162342.27570.filippo.natali@gmail.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508221549.24198.jhb@FreeBSD.org> Cc: "Bjoern A. Zeeb" , Filippo Natali Subject: Re: LOR on AMD64 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 22 Aug 2005 19:48:42 -0000 On Saturday 20 August 2005 08:56 am, Bjoern A. Zeeb wrote: > On Tue, 16 Aug 2005, Filippo Natali wrote: > > I have the same problem described here: > > > > http://lists.freebsd.org/pipermail/freebsd-current/2005-June/051157.html > > > > but on my machine I obtain the attached LOR instead of a panic, and the > > CPU runs at 100%. > > > > lock order reversal > > 1st 0xffffff003d684600 pcm0 (sound cdev) @ > > /usr/src/sys/modules/sound/sound/../../../dev/sound/pcm/dsp.c:214 2nd > > 0xffffffff8081e860 Giant (Giant) @ /usr/src/sys/kern/kern_synch.c:236 > > KDB: stack backtrace: > > witness_checkorder() at witness_checkorder+0x4ba > > _mtx_lock_flags() at _mtx_lock_flags+0x4a > > msleep() at msleep+0x28a > > kmem_malloc() at kmem_malloc+0x22f > > uma_large_malloc() at uma_large_malloc+0x45 > > malloc() at malloc+0x12b > > sndbuf_remalloc() at sndbuf_remalloc+0x97 > > chn_setblocksize() at chn_setblocksize+0x1d0 > > chn_tryspeed() at chn_tryspeed+0x13b > > chn_tryformat() at chn_tryformat+0xe7 > > chn_setformat() at chn_setformat+0x20 > > chn_reset() at chn_reset+0xdb > > dsp_open() at dsp_open+0x20a > > devfs_open() at devfs_open+0x256 > > VOP_OPEN_APV() at VOP_OPEN_APV+0x74 > > vn_open_cred() at vn_open_cred+0x38c > > kern_open() at kern_open+0xfd > > open() at open+0x25 > > syscall() at syscall+0x4b2 > > Xfast_syscall() at Xfast_syscall+0xa8 > > --- syscall (5, FreeBSD ELF64, open), rip = 0x801ad87fc, rsp = > > 0x7fffffffa748, rbp = 0x1 --- > > > > %uname -a > > FreeBSD ulby.hq.netwing.it 6.0-BETA2 FreeBSD 6.0-BETA2 #0: Fri Aug 12 > > 10:52:32 CEST 2005 > > root@ulby.hq.netwing.it:/usr/obj/usr/src/sys/GENERIC amd64 > > I added the LOR as #129 > http://sources.zabbadoz.net/freebsd/lor.html#129 I think the real problem here is that the pcm0 (sound cdev) mutex was held across a call to malloc() and that malloc() happened to block. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org