This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]