From owner-freebsd-current@FreeBSD.ORG Wed Aug 13 11:33:56 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 0F9B037B401 for ; Wed, 13 Aug 2003 11:33:56 -0700 (PDT) Received: from mail.speakeasy.net (mail15.speakeasy.net [216.254.0.215]) by mx1.FreeBSD.org (Postfix) with ESMTP id 69BDE43FAF for ; Wed, 13 Aug 2003 11:33:55 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 9525 invoked from network); 13 Aug 2003 18:33:54 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender )encrypted SMTP for ; 13 Aug 2003 18:33:54 -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 h7DIXp9s061705; Wed, 13 Aug 2003 14:33:52 -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: <20030813180202.GA643@dhcp42.pn.xcllnt.net> Date: Wed, 13 Aug 2003 14:34:15 -0400 (EDT) From: John Baldwin To: Marcel Moolenaar cc: current@FreeBSD.org Subject: RE: LOR: sigacts vs Giant 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, 13 Aug 2003 18:33:56 -0000 On 13-Aug-2003 Marcel Moolenaar wrote: > Gang, > > When the copyout() in sendsig() fails and we call sigexit(), we get > into the following LOR: > > lock order reversal > 1st 0xe0000000300ffca8 sigacts (sigacts) @ kern/subr_trap.c:260 > 2nd 0xe000000000b75250 Giant (Giant) @ kern/kern_sig.c:2407 > Stack backtrace: > witness_lock > Stopped at Debugger+0x31: nop.m 0x0 > db> trace > Debugger(0xe000000000a41340, 0xe00000000078abe0, 0xea3, 0x1) at Debugger+0x30 > witness_lock(0xe000000000b75250, 0x8, 0xe000000000a3cdc9, 0x967) at witness_lock+0xf60 > _mtx_lock_flags(0xe000000000b75250, 0x0, 0xe000000000a3cdc0, 0x967, 0xe000000000747470, 0x30d, > 0xe000000000a5c661) at _mtx_lock_flags+0x130 > sigexit(0xe00000002fa4c000, 0xb, 0xe00000002f94afc8, 0xe0000000009ebfe0) at sigexit+0x140 > sendsig(0x400000000005fbf0, 0x2, 0xa00000002308d360, 0x0) at sendsig+0x520 > postsig(0x2, 0xe00000002fa4c000, 0xe0000000300ff000, 0xe00000002f94afc8) at postsig+0x7f0 > ast(0xa00000002308d400) at ast+0x820 > : > > FYI, sendsig() on ia64 drops the lock around the copyout, see line 921 in machdep.c. It is not reacquired again until the very end of the function. You could change the assert at the top of the function to say that sigacts is not recursed, but sigacts is already a non recursive lock. Do you have local diffs to HEAD? -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/