On Fri, Oct 15, 2010 at 12:25 PM, Robert Watson <rwatson_at_freebsd.org> wrote: > 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. But there are already some cases that aren't properly handled today in the ddb area dealing with dumping that aren't handled properly. Take for instance the following two scenarios: 1. Call doadump twice from the debugger. 2. Call doadump, exit the debugger, reenter the debugger, and call doadump again. Both of these scenarios hang reliably for me. I'm not saying that we should regress things further, but I'm just noting that there are most likely a chunk of edgecases that aren't being handled properly when doing dumps that could be handled better / fixed. Thanks, -GarrettReceived on Fri Oct 15 2010 - 17:39:13 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:08 UTC