From owner-freebsd-current@FreeBSD.ORG Mon Sep 4 11:44:43 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 3CFAC16A4DD for ; Mon, 4 Sep 2006 11:44:43 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from sj-iport-5.cisco.com (sj-iport-5.cisco.com [171.68.10.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id C59BD43D58 for ; Mon, 4 Sep 2006 11:44:42 +0000 (GMT) (envelope-from rrs@cisco.com) Received: from sj-dkim-8.cisco.com ([171.68.10.93]) by sj-iport-5.cisco.com with ESMTP; 04 Sep 2006 04:44:42 -0700 X-IronPort-AV: i="4.08,208,1154934000"; d="scan'208"; a="317399235:sNHT30758268" Received: from sj-core-4.cisco.com (sj-core-4.cisco.com [171.68.223.138]) by sj-dkim-8.cisco.com (8.12.11.20060308/8.12.11) with ESMTP id k84BigAh030096 for ; Mon, 4 Sep 2006 04:44:42 -0700 Received: from xbh-sjc-211.amer.cisco.com (xbh-sjc-211.cisco.com [171.70.151.144]) by sj-core-4.cisco.com (8.12.10/8.12.6) with ESMTP id k84Big6W012561 for ; Mon, 4 Sep 2006 04:44:42 -0700 (PDT) Received: from xfe-sjc-212.amer.cisco.com ([171.70.151.187]) by xbh-sjc-211.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 4 Sep 2006 04:44:41 -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 04:44:41 -0700 Message-ID: <44FC1188.7050600@cisco.com> Date: Mon, 04 Sep 2006 07:44:08 -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: freebsd-current@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 04 Sep 2006 11:44:41.0831 (UTC) FILETIME=[82772770:01C6D017] DKIM-Signature: a=rsa-sha1; q=dns; l=1023; t=1157370282; x=1158234282; c=relaxed/relaxed; s=sjdkim8002; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=rrs@cisco.com; z=From:Randall=20Stewart=20 |Subject:Interesting=20lock=20issue=20mtx_flags=20=3D=200x6?; X=v=3Dcisco.com=3B=20h=3Dl1RY4rga3OurFaXip94HF88u3tk=3D; b=CHfCipiGV8QOCYpAQ3Q6MLZFfaTZzv8VLlYJXWe/75lk2uoKRom7F97nrIPao8YCbGs+YzHv 1CrRGH5WoCrgVsX5NbDsdtnok7vL00fj3C9OTksnOZMfe7THYR2xFQWA; Authentication-Results: sj-dkim-8.cisco.com; header.From=rrs@cisco.com; dkim=pass ( sig from cisco.com verified; ); Subject: 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 11:44:43 -0000 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)