Re: [PATCH] Netdump for review and testing -- preliminary version

From: Robert Watson <rwatson_at_FreeBSD.org>
Date: Fri, 15 Oct 2010 20:25:42 +0100 (BST)
On Thu, 14 Oct 2010, Attilio Rao wrote:

>> No, what I'm saying is: UMA needs to not call its drain handlers, and 
>> ideally not call into VM to fill slabs, from the dumping context. That's 
>> easy to implement and will cause the dump to fail rather than causing the 
>> system to hang.
>
> My point is, however, still the same: that should not happen just for the 
> netdump specific case but for all the dumping/KDB/panic cases (I know it is 
> unlikely current code !netdump calls into UMA but it is not an established 
> pre-requisite and may still happen that some added code does). I still see 
> this as a weakness on the infrastructure, independently from netdump. I can 
> see that your point is that it is vital to netdump correct behaviour though, 
> so I'd wonder if it worths fixing it now or later.

Quite a bit of our kernel and dumping infrastructure special cases debugging 
and dumping behavior to avoid sources of non-robustness.  For example, serial 
drivers avoid locking, and for disk dumps we bypass GEOM to avoid the memory 
allocation, freeing, and threading that it depends on.

The goal here is to be robust when handling dumps: hanging is worse than not 
dumping, since you won't get the dump either way, and if you don't reboot then 
the system requires manual intervention to recover.  Example of things that 
are critical to avoid include:

- The dumping thread tripping over locks held by the panicked thread, or by
   another now-suspended thread, leading to deadlock against a suspended
   thread.

- Corrupting dumps by increasing concurrency in the panic case.  We ran into a
   case a year or two ago where changing VM state during the dump on amd64
   caused file system corruption as the dump code assumed that the space
   required for a dump didn't change while dumping took place.

Any code dependency we add in the panic / KDB / dump path is one more risk 
that we don't successfully dump and reboot, so we need to minimize that code.

Robert
Received on Fri Oct 15 2010 - 17:25:43 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:08 UTC