FAIL: kernel fault injection
zachary.loafman at isilon.com
Tue May 12 16:26:39 UTC 2009
On Tue, May 12, 2009 at 03:56:51PM +0100, Rui Paulo wrote:
> On 11 May 2009, at 17:29, Zachary Loafman wrote:
> This is great and I would like to see this go in. I just have to minor
> modifications (possible bikeshed, but whatever):
> * What about kern.fail_point instead of fail_point.kern ? This framework
> seems to be only for kernel.
It's only for the kernel, but loadable modules can use it as well. It's
kind of a question of whether you want the available fail points in one
tree, but away from their respective namespace, or whether you want them
in the tree associated with their namespace. Thinking about it more,
kern.fail_point might make more sense - I like seeing testing related
things grouped with the thing its testing.
> * On the man page, you don't explain the 'sleep' type. Is that on
Oversight, I'll include it in the final.
> About the CAVEAT section on the man page (second paragraph), do you have
> any ideas to evaluate if msleep is being called on a correct context?
I haven't actually thought about it too long. If we factored out the
"for (lle = td->td_sleeplocks ..." section from witness_warn, we could
potentially make the sleepable lock state. But witness isn't always
enabled. Nor are sleepable locks the only real issue with msleep()ing.
If you build the fail point manually, you can add fail points that
invoke a defined sleep function on timeout() (instead of just calling
msleep). You can build fail points manually using a set of lower level
fail_point_* routines, one of which is fail_point_set_sleep_fn. I
haven't had a chance to write up the man page for those yet.
Thanks for the comments!
More information about the freebsd-arch