From owner-freebsd-stable@FreeBSD.ORG Fri Mar 28 02:49:49 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 180A4106564A for ; Fri, 28 Mar 2008 02:49:49 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.153]) by mx1.freebsd.org (Postfix) with ESMTP id 8AD2D8FC1C for ; Fri, 28 Mar 2008 02:49:48 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: by fg-out-1718.google.com with SMTP id 16so27908fgg.35 for ; Thu, 27 Mar 2008 19:49:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=XkK4ouWFDa449kT34W6bJArIUGa/V43fTt7wO++WMYY=; b=TJATaGfr5/TgjSaWLsXWtG3ydJ6yxNZHpZgKfe2WBvGReQdhrNaqutKrXcdDlFqdC+RLSGRc4mrjQ6c8yVdqMLzuHBgODBSxkKbnuN8cwSh7alpAueobpYqW0yf8jd8iJkEr6m3Vo+v6i2v+XSsgz494pb9lRSI9Bi/JaQ8UJEo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=lRUY/qNi4PJUmFrCyaMokkHts9qBXljEXtUvYECCpjQT9Ye7zokcPz2eN0tpyug6jJK0MyRZIVfePVL+/4oYZe2qZgVPRMAFBUZs0mI2XwhuYl89sduRxBXCuudB1aqCmgVY2XqBYyRjOs/II9qRpTYIkVffYTCMs+AT8OG8BDw= Received: by 10.86.99.9 with SMTP id w9mr1357702fgb.58.1206670854704; Thu, 27 Mar 2008 19:20:54 -0700 (PDT) Received: by 10.86.28.19 with HTTP; Thu, 27 Mar 2008 19:20:54 -0700 (PDT) Message-ID: <3bbf2fe10803271920k98d516g4213542787ad663@mail.gmail.com> Date: Fri, 28 Mar 2008 03:20:54 +0100 From: "Attilio Rao" Sender: asmrookie@gmail.com To: "Max Laier" In-Reply-To: <200803252113.47259.max@love2party.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080314192359.GA4677@dataxnet.ro> <200803221655.28975.max@love2party.net> <20080325192113.GA61579@dataxnet.ro> <200803252113.47259.max@love2party.net> X-Google-Sender-Auth: 9a7a75c9302c1136 Cc: freebsd-stable@freebsd.org, Robert Watson , Alex Popa , John Baldwin Subject: Re: Lock Order Reversal on 7.0-STABLE with pf and ipfw / dummynet (traces) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Mar 2008 02:49:49 -0000 2008/3/25, Max Laier : > Hi Alex, > > so it's basically back to square one. We only have LORs between the pfil > R/W lock (read instance) and mutexes that don't have any lock order with > the pfil R/W lock (write instance) at all. This means the deadlock can't > be explained by the LORs that are reported (unless there is something I'm > missing). Unless somebody who is seeing these kind of deadlocks can > actually break into a debugger to identify the locks at play, everything > else is just speculation. > > I will fix the fastroute LOR with the patch you have been testing, > eventhough it didn't fix your problem. For the remaining issue, we need > more IPFW or lock primitives knowledge (extending CC-list). > > Note that the first LOR features a recursive pickup of the pfil R/W lock. > I remember that Attilio committed a patch to forbid this for CURRENT. > Could this be the cause of a deadlock? Would it make sense to MFC > rm_locks and try if they hold up under this scenario? I decided to not commit this patch to CURRENT basing on the Robert's feedback that read recursion in network stack is (will be?) fundamental. Likely, it should not explain the deadlock still. As you point out, the better thing would be using a machine with stock CVS + DDB + INVARIANTS and check the state of threads and the state of locks. Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein