From owner-freebsd-current@FreeBSD.ORG Mon May 28 21:06:38 2007 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E1D9F16A47C for ; Mon, 28 May 2007 21:06:38 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.171]) by mx1.freebsd.org (Postfix) with ESMTP id 31E9813C44B for ; Mon, 28 May 2007 21:06:37 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: by ug-out-1314.google.com with SMTP id u2so984611uge for ; Mon, 28 May 2007 14:06:37 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=QJ1ayBFBkJkT/60eR0buCLOq7ME8nw8iyXqZmYpsWldWs7JYO57jH3vQw7YbLstUhUt/6xe9uLUxUJG9Hpu8zQC9vJIXbRU6ozYyQwaPTh1VxS9qA8ZHzh0VdihWpXxCi7SUt/zI1G1AWQg/7LGUhVsvyBy08OkxtTAud9tw9dc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=muCn6p1Jks8lZzA1EFmyVfWSqxhfOWvyS1gcPvycn24G67XpCh4hmAGn2g5wJHwBLsPaPJk90uYtokVqA2L9oERinwMqFM1AubFabO4x76jWrBj8WMtw2dq3fFR5Dk59Al3UWdENC8t05XhrmM8uqquasAGlxd9d+FRmZ8dKEKU= Received: by 10.67.117.18 with SMTP id u18mr5528705ugm.1180386397026; Mon, 28 May 2007 14:06:37 -0700 (PDT) Received: from ?151.75.216.62? ( [151.75.216.62]) by mx.google.com with ESMTP id a1sm6186940ugf.2007.05.28.14.06.35; Mon, 28 May 2007 14:06:36 -0700 (PDT) Message-ID: <465B4450.90800@FreeBSD.org> Date: Mon, 28 May 2007 23:06:24 +0200 From: Attilio Rao User-Agent: Thunderbird 1.5 (X11/20060526) MIME-Version: 1.0 To: Tor Egge References: <1180138048.94117.17.camel@shumai.marcuscom.com> <465780A3.8040603@FreeBSD.org> <1180140483.94117.24.camel@shumai.marcuscom.com> <20070528.162023.41711345.Tor.Egge@cvsup.no.freebsd.org> In-Reply-To: <20070528.162023.41711345.Tor.Egge@cvsup.no.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: Attilio Rao Cc: jroberson@chesapeake.net, current@freebsd.org Subject: Re: Panic on -CURRENT after LDT changes X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 May 2007 21:06:39 -0000 Tor Egge wrote: > > Finally, I found that i386_ldt_grow() called smp_rendezvous() without > temporarily unlocking dt_lock. That caused a deadlock. Adding a temporary > unlock of dt_lock seems to solve the problem for me. Effectively, there is the need to release the dt_lock before to call smp_rendezvous() beacause other threads running on other CPUs will contest on this lock and it will cause a deadlock (since their curthreads don't hold the lock). I think that mantaining the current locking requirements for i386_ldt_grow() is still good, since, for how it is used, this is the lighter approach. I will add release/unrelease around smp_rendezvous() too. Thanks for the catch, Attilio