From nge@cs.hmc.edu  Thu Nov 11 20:28:46 2004
Return-Path: <nge@cs.hmc.edu>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id A977E16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 11 Nov 2004 20:28:46 +0000 (GMT)
Received: from smtp806.mail.sc5.yahoo.com (smtp806.mail.sc5.yahoo.com [66.163.168.185])
	by mx1.FreeBSD.org (Postfix) with SMTP id 6DFF343D2D
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 11 Nov 2004 20:28:46 +0000 (GMT)
	(envelope-from nge@cs.hmc.edu)
Received: from unknown (HELO mercury.lan) (nattylite@sbcglobal.net@63.207.140.109 with login)
  by smtp806.mail.sc5.yahoo.com with SMTP; 11 Nov 2004 20:28:46 -0000
Received: from mercury.lan (localhost [127.0.0.1])
	by mercury.lan (8.13.1/8.13.1) with ESMTP id iABKSj3P090587
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 11 Nov 2004 12:28:45 -0800 (PST)
	(envelope-from nate@mercury.lan)
Received: (from nate@localhost)
	by mercury.lan (8.13.1/8.13.1/Submit) id iABKSiKL090586;
	Thu, 11 Nov 2004 12:28:44 -0800 (PST)
	(envelope-from nate)
Message-Id: <200411112028.iABKSiKL090586@mercury.lan>
Date: Thu, 11 Nov 2004 12:28:44 -0800 (PST)
From: Nate Eldredge <nge@cs.hmc.edu>
Reply-To: Nate Eldredge <nge@cs.hmc.edu>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Bad dependencies for /etc/rc.d/savecore
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         73834
>Category:       conf
>Synopsis:       Bad dependencies for /etc/rc.d/savecore
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    dougb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 11 20:30:26 GMT 2004
>Closed-Date:    Mon Feb 13 19:30:10 GMT 2006
>Last-Modified:  Mon Feb 13 19:30:10 GMT 2006
>Originator:     Nate Eldredge
>Release:        FreeBSD 5.3-RELEASE i386
>Organization:
>Environment:
System: FreeBSD mercury.lan 5.3-RELEASE FreeBSD 5.3-RELEASE #0: Sun Nov 7 08:16:50 PST 2004 nate@mercury.lan:/medium/obj/medium/src/sys/MERCURY i386


	
>Description:
/etc/rc.d/savecore should have its dependecies set such that it runs
before swap1.  Since the dump device is normally a swap partition,
if swap1 runs first, it will swapon that partition before savecore runs,
thus preventing it from recovering the core dump.

>How-To-Repeat:
rcorder /etc/rc.d/*; observe that savecore comes after swap1
>Fix:
Should be trivial, but I don't know whether savecore should have a
BEFORE: swap1, or swap1 should depend on savecore, or whether some 
more generic dependency should be added.

>Release-Note:
>Audit-Trail:

From: Palle Girgensohn <girgen@FreeBSD.org>
To: bug-followup@FreeBSD.org, nge@cs.hmc.edu, stable@freebs.org
Cc:  
Subject: Re: conf/73834: Bad dependencies for /etc/rc.d/savecore
Date: Tue, 03 May 2005 00:58:32 +0200

 Hi!
 
 On <http://www.freebsd.org/releases/5.4R/todo.html>, there's a note that 
 "There are reports of problems getting dumps after panics." Are these 
 reports perhaps related to this PR, with a trivial fix? It seems this PR 
 needs to be adressed either way?
 
 /Palle
 

From: Nate Eldredge <nge@cs.hmc.edu>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: conf/73834: Bad dependencies for /etc/rc.d/savecore
Date: Fri, 9 Sep 2005 17:26:59 -0700 (PDT)

 This is still present in 5.4-RELEASE and it appears also CURRENT.  I just 
 thought I would bump it because I think it's been forgotten, it breaks a 
 significant debugging feature and the fix is trivial (I just don't know 
 which of the trivial fixes described above is philosophically better).
 
 -- 
 Nate Eldredge
 nge@cs.hmc.edu
Responsible-Changed-From-To: freebsd-bugs->freebsd-rc 
Responsible-Changed-By: dougb 
Responsible-Changed-When: Mon Dec 5 09:16:28 GMT 2005 
Responsible-Changed-Why:  

Bring this to the attention of the list 

http://www.freebsd.org/cgi/query-pr.cgi?pr=73834 
State-Changed-From-To: open->closed 
State-Changed-By: dougb 
State-Changed-When: Mon Feb 13 19:25:33 UTC 2006 
State-Changed-Why:  

First, it turns out that you can actually recover a dump 
even after the partition has been swapon'ed. Second, the 
problem you describe here has been discussed at great 
length on the freebsd-current mailing list. The short 
version is that there is a chicken and egg problem. In 
order to capture the dump, you need a file system to write 
to. In order to get a file system to write to, you need 
fsck. In order to allow fsck to run on a memory constrained 
system, you may need swap. Thus, the current thinking is 
that the status quo is the best of our current options. 


Responsible-Changed-From-To: freebsd-rc->dougb 
Responsible-Changed-By: dougb 
Responsible-Changed-When: Mon Feb 13 19:25:33 UTC 2006 
Responsible-Changed-Why:  

I'm closing this one. 

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