From nobody@FreeBSD.org  Wed Mar  9 20:28:25 2011
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 3BB18106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  9 Mar 2011 20:28:25 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 11D818FC12
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  9 Mar 2011 20:28:25 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p29KSOvI062305
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 9 Mar 2011 20:28:24 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p29KSOSW062304;
	Wed, 9 Mar 2011 20:28:24 GMT
	(envelope-from nobody)
Message-Id: <201103092028.p29KSOSW062304@red.freebsd.org>
Date: Wed, 9 Mar 2011 20:28:24 GMT
From: Andrew Boyer <aboyer@averesystems.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: System can't dump corefile
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         155421
>Category:       kern
>Synopsis:       [hang] System can't dump corefile [regression]
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    avg
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 09 20:30:12 UTC 2011
>Closed-Date:    Mon Jul 16 11:14:33 UTC 2012
>Last-Modified:  Mon Jul 16 11:14:33 UTC 2012
>Originator:     Andrew Boyer
>Release:        8.2
>Organization:
Avere Systems
>Environment:
FreeBSD node1 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011     root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
Release 8.2 (and 8.2-RC3 before it, at least) do not appear to be able
to dump core.  This works reliably in previous releases.

node1 is an 8-core system with 72GB of RAM and a 250GB drive plugged
into an onboard ICH10R SATA port.

node2 is an 8-core system with 64GB of RAM and a 250GB drive plugged
into an onboard ESB2 SATA port.

8.2 was installed from a USB drive.  All space was allocated to the
first slice and the default partition scheme was used.  swap is set
to 4GB.

dumpdev="AUTO" is set in /etc/rc.conf, and /dev/dumpdev exists.

Initiating a core with 'sysctl debug.kdb.panic=1' results in one of
several hangs:

 - no progress at all
 - very, very slow progress
 - a secondary panic on 'bufwrite: buffer is not busy'
 - other secondary panics

Examples:
=== node1 ===
# sysctl debug.kdb.panic=1
debug.kdb.panic: 0panic: kdb_sysctl_panic
cpuid = 4
KDB: stack backtrace:
...
Uptime: 20m50s
Physical memory: 73706 MB
Dumping 2780 MB:

=== node2 ===
# sysctl debug.kdb.panic=1
debug.kdb.panic: 0panic: kdb_sysctl_panic
cpuid = 4
KDB: stack backtrace:
...
Uptime: 5m50s
Physical memory: 65521 MB
Dumping 2437 MB:

Other things I have tried with the same results:
- Explicitly specifying the dump device e.g. 'dumpon -v /dev/ad0s1b'
- Increasing swap from 4GB to 32GB
- Changing the SATA controller mode to Compatible, Enhanced, and AHCI
- Booting from a SAS HDD connected to a SAS1068e

>How-To-Repeat:
1. Set dumpdev to 'AUTO' in /etc/rc.conf
2. Run '/etc/rc.d/dumpon restart', or just reboot
3. Run 'sysctl debug.kdb.panic=1'

>Fix:
The issue may be that the syncer is still doing filesystem updates in
parallel with the attempt to dump core.  I added enough debugging output
to follow the dumper's progress through the first few steps of the dump.
It doesn't seem right that other things are running in parallel with a
panic/coredump.

>Release-Note:
>Audit-Trail:
Date: Wed, 08 Feb 2012 17:17:48 +0100
From: rank1seeker@gmail.com
To: bug-followup@FreeBSD.org,
  aboyer@averesystems.com
Subject: Followup: [hang] System can't dump corefile [regression]

 I can confirm existance of this problem.

 However, it doesn't occur on ALL machines(8.2), so it's also not
 reproducible on ALL machines(8.2).

 I have 3 machines running R8.2.  On first (i386) and second (amd64)
 dump works.  On third (amd64 - my laptop) dump hangs as OP described

 omagoj Smol=E8i=E6
Responsible-Changed-From-To: freebsd-bugs->avg 
Responsible-Changed-By: avg 
Responsible-Changed-When: Wed Mar 14 20:23:35 UTC 2012 
Responsible-Changed-Why:  
Take as a possible duplicate of PR 139614. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=155421 
State-Changed-From-To: open->patched 
State-Changed-By: avg 
State-Changed-When: Thu Jun 7 08:12:04 UTC 2012 
State-Changed-Why:  
Update to the state of of PR 139614 

http://www.freebsd.org/cgi/query-pr.cgi?pr=155421 
State-Changed-From-To: patched->closed 
State-Changed-By: avg 
State-Changed-When: Mon Jul 16 11:14:06 UTC 2012 
State-Changed-Why:  
See PR 139614. 

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