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: systemtap crashed the kernel


Hi -

On Wed, Mar 21, 2007 at 04:21:51PM -0400, John Liang wrote:
> This issue turns to be a bnx2 driver issue and has
> nothing to do with systemtap. 

Thanks for the update.


> But while I was working on the issue, I wonder how systemtap
> protects global variables by concurrent multiple threads with
> multiple CPUs. For example, one probe would call to "delete an
> array" while another or the same probe is trying to read an element
> of this array at the same time.

We use rwlocks for script-level global variables.  If those two probes
run at the same time on a different processor, one of them will be
delayed very briefly, waiting for the other probe finish and release
the lock.  If this does not happen "soon" (as defined by configurable
parameters), the loser probe is skipped entirely.  (After a
configurable number of skipped probes, the entire script aborts.)

Write some test scripts, and look at the generated C code with "stap -p3".

- FChE


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