From owner-freebsd-current@FreeBSD.ORG Mon Sep 4 12:10:29 2006 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 E3D2416A50C for ; Mon, 4 Sep 2006 12:10:29 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from sj-iport-6.cisco.com (sj-iport-6.cisco.com [171.71.176.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9EEBB43F52 for ; Mon, 4 Sep 2006 12:08:00 +0000 (GMT) (envelope-from rrs@cisco.com) Received: from sj-dkim-2.cisco.com ([171.71.179.186]) by sj-iport-6.cisco.com with ESMTP; 04 Sep 2006 05:08:00 -0700 Received: from sj-core-1.cisco.com (sj-core-1.cisco.com [171.71.177.237]) by sj-dkim-2.cisco.com (8.12.11.20060308/8.12.11) with ESMTP id k84C7ZPK022583 for ; Mon, 4 Sep 2006 05:08:00 -0700 Received: from xbh-sjc-231.amer.cisco.com (xbh-sjc-231.cisco.com [128.107.191.100]) by sj-core-1.cisco.com (8.12.10/8.12.6) with ESMTP id k84C5XQV027765 for ; Mon, 4 Sep 2006 05:05:33 -0700 (PDT) Received: from xfe-sjc-212.amer.cisco.com ([171.70.151.187]) by xbh-sjc-231.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.211); Mon, 4 Sep 2006 05:05:33 -0700 Received: from [127.0.0.1] ([171.68.225.134]) by xfe-sjc-212.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 4 Sep 2006 05:05:33 -0700 Message-ID: <44FC166B.2060809@cisco.com> Date: Mon, 04 Sep 2006 08:04:59 -0400 From: Randall Stewart User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Randall Stewart References: <44FC1188.7050600@cisco.com> In-Reply-To: <44FC1188.7050600@cisco.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 04 Sep 2006 12:05:33.0222 (UTC) FILETIME=[6C5A4460:01C6D01A] DKIM-Signature: a=rsa-sha1; q=dns; l=1190; t=1157371680; x=1158235680; c=relaxed/simple; s=sjdkim2002; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=rrs@cisco.com; z=From:Randall=20Stewart=20 |Subject:Re=3A=20Interesting=20lock=20issue=20mtx_flags=20=3D=200x6?; X=v=3Dcisco.com=3B=20h=3D8MOa55kzneMreyPuwJOdmXLIq8w=3D; b=vEic0PS/RODdOuvrcXzP2WJ93pMRyOa046PPTTxLOOg/OrfmFKlMzrWDhPVb+ZsOBjWENSpa Hm/SalLtForhu+nw3iqTTLnnkJhiSHM+K9We1QbdRbNOWhnDxpSbrM6k; Authentication-Results: sj-dkim-2.cisco.com; header.From=rrs@cisco.com; dkim=pass ( sig from cisco.com verified; ); Cc: freebsd-current@freebsd.org Subject: Re: Interesting lock issue mtx_flags = 0x6? 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, 04 Sep 2006 12:10:30 -0000 Never mind.. I think I just figiured it out.. its a foo-bar on my part :-D R Randall Stewart wrote: > Hi all: > > I am hunting a different bug (crash) in my SCTP code.. and I ran > across an interesting issue. > > The kernel crashed in mtx_lock() at line 544.. looking > at the kernel core... I see the mtx_flags is set to 0x6 > (MTX_RELEASED|MTX_CONTESTED)... The turnstile was > empty as well.. > > My last update to kern_mutex.c was about August 15th.. > > Is this a known issue? Should I try cvsup'ing and see > if I can reproduce it.. or does anyone with a lot > more knowledge on how the locking is supposed to work > want to look at this before I cvsup and loose the ability > to kgdb it (I would be glad to give access to anyone that > wants to poke around on the machine). > > From my limited look at the atomic's that are going on > here I can't see how you could get 0x6 ever set in > the flags.. and of course this is also assumed in > the lock code and is why it crashes... > > Let me know if anyone is interested in looking at this.. > > R -- Randall Stewart NSSTG - Cisco Systems Inc. 803-345-0369 815-342-5222 (cell)