[DTrace-devel] [PATCH] cg: implement concurrent probe execution protection

Kris Van Hees kris.van.hees at oracle.com
Mon Mar 4 19:30:19 UTC 2024


On Mon, Mar 04, 2024 at 06:53:08PM +0000, Nick Alcock wrote:
> On 4 Mar 2024, Kris Van Hees via DTrace-devel stated:
> 
> > +	 *	if (dctx.mst->prid != 0)// jne %r1, 0, lbl_fast
> > +	 *		goto exit;
> >  	 *	dctx.mst = rc;		// stdw [%r9 + DCTX_MST], %r7
> >  	 *	dctx.mst->prid = PRID;	// stw [%r7 + DMST_PRID], PRID
> 
> Isn't this still a little racy? What happens if the probe is preempted
> after the conditional but before the assignment? Don't you get two
> concurrent probe executions?

There is a very minimal race possible here, yes, but that cannot be resolved
in the current code base without more invasive work.

A more thorough solution is being worked on as well.



More information about the DTrace-devel mailing list