[RFC][PATCH] Kprobes robust fault handling for i386

Frank Ch. Eigler fche@redhat.com
Tue Apr 25 14:21:00 GMT 2006


Prasanna S Panchamukhi <prasanna@in.ibm.com> writes:

> Please find the patch for robust fault handling of kprobes for i386
> architecture. [...]

This patch puts the setjmp into the kprobes layer, around the
invocation of the probe handler.  A longjmp due to a systemtap probe
problem would skip all the cleanup code (locking, error tracking,
context cleanup) that the probe handler boilerplate includes.  I had
previously imagined letting a probe handler include the setjmp
explicitly, so it can have its own cleanup code in systemtap-emitted
code.

This scheme would mean that the subject processor will not be able to
run any further systemtap probes, and probes on other processors will
timeout acquiring locks on any shared variables.  This would cause the
systemtap session to come to a prompt close due to MAXSKIPPED.

There are problems associated with overall session shutdown.  The
module removal code blocks until all running probe handler finish.
But if it has no way of knowing that one was "stuck", it could wait a
mighty long time.  This would likely have to be solved for the
proposed scheme to be acceptable.

- FChE



More information about the Systemtap mailing list