From nobody@FreeBSD.org  Fri Mar 14 04:22:13 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F2D961065671
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 14 Mar 2008 04:22:13 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id DE3D78FC1D
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 14 Mar 2008 04:22:13 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m2E4IsWj018351
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 14 Mar 2008 04:18:54 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m2E4IsZi018350;
	Fri, 14 Mar 2008 04:18:54 GMT
	(envelope-from nobody)
Message-Id: <200803140418.m2E4IsZi018350@www.freebsd.org>
Date: Fri, 14 Mar 2008 04:18:54 GMT
From: Greg Rivers <gcr@tharned.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: dump frequently hangs
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         121684
>Category:       bin
>Synopsis:       dump(8) frequently hangs
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    jeff
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 14 04:30:01 UTC 2008
>Closed-Date:    Thu Apr 02 17:37:33 UTC 2009
>Last-Modified:  Thu Apr 02 17:37:33 UTC 2009
>Originator:     Greg Rivers
>Release:        RELENG_7 as of March 12
>Organization:
>Environment:
FreeBSD 7.0-STABLE Wed Mar 12 14:41:38 CDT 2008 i386
>Description:
dump frequently hangs in this state:

  UID   PID  PPID CPU PRI NI   VSZ   RSS MWCHAN STAT  TT       TIME COMMAND
    0 87976 29731   0   8  0 35852 34164 wait   I+    p2    0:00.51 dump 0afLC /dev/null 32 /dev/da0e (dump)
    0 87985 87976   0   4  0 35852 34220 sbwait I+    p2    0:01.06 dump: /dev/da0e: pass 3: 0.99% done, finished in 0:16 at Thu Mar 13 15:42:10 2008 (dump)
    0 87986 87985   0  20  0 35852 34180 pause  I+    p2    0:00.91 dump 0afLC /dev/null 32 /dev/da0e (dump)
    0 87987 87985   0  20  0 35852 34180 pause  I+    p2    0:00.91 dump 0afLC /dev/null 32 /dev/da0e (dump)
    0 87988 87985   0  20  0 35852 34180 pause  I+    p2    0:00.92 dump 0afLC /dev/null 32 /dev/da0e (dump)

It appears to be a race condition, as repeated attempts to dump the same
(clean) file system sometimes succeed and sometimes fail.
>How-To-Repeat:
dump a UFS2 filesystem.
>Fix:
The problem appears to be with the signal processing that schedules the
dump subprocesses.

A full ktrace of a hung dump session is available at
ftp://ftp.tharned.org/pub/dump-ktrace.bz2

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: iedowse 
State-Changed-When: Sat Mar 15 15:51:22 UTC 2008 
State-Changed-Why:  

Hi, could you try applying the patch that Jeff recently committed 
to -current: 

http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/kern/subr_sleepqueue.c.diff?r1=1.47;r2=1.48 

There was a race where a process calling pause() might go to sleep 
instead of handling a signal that had just arrived. The patch hasn't 
yet been merged into RELENG_7 but it would be good to get confirmation 
that it fixes the issue. 

Ian 


http://www.freebsd.org/cgi/query-pr.cgi?pr=121684 

From: linimon@lonesome.com (Mark Linimon)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/121684: dump(8) frequently hangs
Date: Sat, 15 Mar 2008 23:10:40 -0500

 ----- Forwarded message from Greg Rivers <gcr@tharned.org> -----
 
 From: Greg Rivers <gcr@tharned.org>
 To: iedowse@FreeBSD.org
 Cc: freebsd-bugs@FreeBSD.org
 
 Confirmed: Jeff's patch does appear to have fixed the problem.  Thanks!
 
 -- 
 Greg Rivers
 
 ----- End forwarded message -----
State-Changed-From-To: feedback->patched 
State-Changed-By: linimon 
State-Changed-When: Sun Mar 16 04:28:23 UTC 2008 
State-Changed-Why:  
Submitter notes jeff's patch fixes the problem.  Over to him as an 
MFC reminder. 


Responsible-Changed-From-To: freebsd-bugs->jeff 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sun Mar 16 04:28:23 UTC 2008 
Responsible-Changed-Why:  

http://www.freebsd.org/cgi/query-pr.cgi?pr=121684 

From: Andrew Hume <andrew@research.att.com>
To: bug-followup@FreeBSD.org, gcr@tharned.org
Cc:  
Subject: Re: bin/121684: dump(8) frequently hangs
Date: Wed, 19 Mar 2008 12:25:10 -0400

 --Apple-Mail-13-3444397
 Content-Transfer-Encoding: 7bit
 Content-Type: text/plain;
 	charset=US-ASCII;
 	delsp=yes;
 	format=flowed
 
 i am running on an 8 cpu machine (2 quad core dell 1950)
 and dump was alwayds hanging for a 1.3GB ufs filesystem.
 
 after applying jeff's patch, dump always succeeds but half teh time
 doesn't cleanup the children processes and hangs (apparently waiting  
 for them).
 at this point it claims the dump is done and this seems true.
 
 this is quite reproducible (about 50% of teh time); can i supply any  
 output
 or debugging?
 
 ------------------
 Andrew Hume  (best -> Telework) +1 732-886-1886
 andrew@research.att.com  (Work) +1 973-360-8651
 AT&T Labs - Research; member of USENIX and LOPSA
 
 --Apple-Mail-13-3444397--

From: Yoshihiro Ota <ota@j.email.ne.jp>
To: andrew@research.att.com, bug-followup@FreeBSD.org
Cc: gcr@tharned.org, linimon@lonesome.com
Subject: Re: bin/121684: dump(8) frequently hangs
Date: Tue, 22 Apr 2008 01:29:07 -0400

 Is http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/35214 related to or
 solve this bug? There were some patches supplied but not committed.  It
 looks very similar.
 
 Hiro

From: David <david.robertson@adestra.com>
To: bug-followup@FreeBSD.org, gcr@tharned.org
Cc:  
Subject: Re: bin/121684: dump(8) frequently hangs
Date: Fri, 20 Jun 2008 12:34:54 +0100

 Hi,
 
 I am seeing exactly the same thing as Andrew.
 
 David
State-Changed-From-To: patched->closed 
State-Changed-By: delphij 
State-Changed-When: Thu Apr 2 17:36:23 UTC 2009 
State-Changed-Why:  
Patch was MFC'ed by jeff@ on 2008/04/19 and is part of 7.1-RELEASE. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=121684 
>Unformatted:
