Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Oct 2005 11:07:01 +0100 (BST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Philip Kizer <pckizer@nostrum.com>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Problem remains with FreeBSD 6.0-RC1 as seen in RELENG_5
Message-ID:  <20051025110453.L6720@fledge.watson.org>
In-Reply-To: <D7CA644A-E98B-4CB6-BA4C-26CCFE63326A@nostrum.com>
References:  <200510191623.j9JGNSfr007356@magus.nostrum.com> <20051019175020.S60849@fledge.watson.org> <D7CA644A-E98B-4CB6-BA4C-26CCFE63326A@nostrum.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Tue, 25 Oct 2005, Philip Kizer wrote:

> On Oct 19, 2005, at 11:54, Robert Watson wrote:
>> This appears to be a problem with file descriptor passing and garbage 
>> collection.  I've seen one report of a lock order reversal along these 
>> lines, but it was not believed to be symptomatic of an actual hang, just an 
>> architectural issue.  This could be a sign that we need to address the 
>> source of the reversal, although it sounds like you don't get a reversal
>> warning?
>> 
>> Could I have you try the following DDB commands also:
>> 
>>   show alllocks
>>   traceall
>
> OK, this is a new hang with almost all I had before (looks like I did 
> forgot the "print sysctllock", will I need to be sure and include it for 
> a complete diagnosis?) and those two as well:
>
>  http://www.nostrum.com/hang/hang.trace-2005-10-25-0.txt
>
> [Or would you prefer I include it directly rather than sparing the list 
> the output?]

URL is fine, and useful, thanks!

There are a couple of possible sources, so if this is reproduceable and 
you don't mind trying some diagnostic patches, I've attached a first one 
below.  This checks for the case where the looping in the unp_gc() routine 
becomes unbounded due to a possible lack of synchronization in the 
handling of marking and counting of marking.  It needs INVARIANTS to be 
compiled in to work; if it fires, this will suggest an avenue to explore.

Robert N M Watson

Index: uipc_usrreq.c
===================================================================
RCS file: /data/fbsd-cvs/ncvs/src/sys/kern/uipc_usrreq.c,v
retrieving revision 1.156
diff -u -r1.156 uipc_usrreq.c
--- uipc_usrreq.c	23 Sep 2005 12:41:06 -0000	1.156
+++ uipc_usrreq.c	25 Oct 2005 10:04:36 -0000
@@ -1613,6 +1613,7 @@
  	LIST_FOREACH(fp, &filehead, f_list)
  		fp->f_gcflag &= ~(FMARK|FDEFER);
  	do {
+		KASSERT(unp_defer >= 0, ("unp_gc: unp_defer %d", unp_defer));
  		LIST_FOREACH(fp, &filehead, f_list) {
  			FILE_LOCK(fp);
  			/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051025110453.L6720>