Bug 73834

Summary: Bad dependencies for /etc/rc.d/savecore
Product: Base System Reporter: Nate Eldredge <nge>
Component: confAssignee: Doug Barton <dougb>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.3-RELEASE   
Hardware: Any   
OS: Any   

Description Nate Eldredge 2004-11-11 20:30:26 UTC
/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.

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.
How-To-Repeat: rcorder /etc/rc.d/*; observe that savecore comes after swap1
Comment 1 Palle Girgensohn freebsd_committer freebsd_triage 2005-05-02 23:58:32 UTC
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
Comment 2 Nate Eldredge 2005-09-10 01:26:59 UTC
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
Comment 3 Doug Barton freebsd_committer freebsd_triage 2005-12-05 09:16:28 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-rc


Bring this to the attention of the list
Comment 4 Doug Barton freebsd_committer freebsd_triage 2006-02-13 19:25:33 UTC
State Changed
From-To: open->closed


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. 


Comment 5 Doug Barton freebsd_committer freebsd_triage 2006-02-13 19:25:33 UTC
Responsible Changed
From-To: freebsd-rc->dougb


I'm closing this one.