From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 13 21:06:33 2014 Return-Path: Delivered-To: hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD714837 for ; Thu, 13 Feb 2014 21:06:33 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8061F140F for ; Thu, 13 Feb 2014 21:06:33 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1WE3UO-0005S0-Aj; Thu, 13 Feb 2014 21:06:32 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id s1DL6RLu075580; Thu, 13 Feb 2014 14:06:27 -0700 (MST) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+pLJtB9yY3Ryq43c/ix/tH Subject: Re: Debugging rw lock From: Ian Lepore To: Vijay Singh In-Reply-To: References: <52FD30D9.6050604@mu.org> Content-Type: text/plain; charset="us-ascii" Date: Thu, 13 Feb 2014 14:06:27 -0700 Message-ID: <1392325587.1145.96.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: hackers@FreeBSD.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 21:06:33 -0000 Does option DEADLKRES not work with rwlocks? (I've never used it, just seen it in the NOTES). -- Ian On Thu, 2014-02-13 at 12:59 -0800, Vijay Singh wrote: > You're talking about instrumenting the code, right? But which thread? I was > thinking of augmenting the rw lock to record the readers, but wanted to > check if something is possible without instrumentation. > > > On Thu, Feb 13, 2014 at 12:53 PM, Alfred Perlstein wrote: > > > Keep a stack of rwlocks owned in the struct thread. > > > > -Alfred > > > > On 2/13/14, 12:51 PM, Vijay Singh wrote: > > > >> I am running into an issue where an rw lock is read locked and never > >> unlocked, and causes a system to livelock. I was wondering if its possible > >> to figure out which thread owns the read lock? > >> > >> It's the tcp pcbinfo lock. > >> > >> (kgdb-amd64-7.4-08) show_rwlock rw > >> name : tcp > >> class: rw > >> flags: {SLEEP, INITED, WITNESS, RECURSE, UPGRADABLE} > >> state: RLOCK: 1 locks > >> waiters: writers > >> > >> Any help is appreciated. > >> > >> -vijay > >> _______________________________________________ > >> freebsd-hackers@freebsd.org mailing list > >> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > >> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org > >> " > >> > >> > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"