Re: New locking test for the paulmckrcu/litmus github archive
From: Alan Stern
Date: Thu Jun 06 2024 - 14:52:10 EST
On Thu, Jun 06, 2024 at 10:57:42AM -0700, Paul E. McKenney wrote:
> On Thu, Jun 06, 2024 at 01:21:28PM -0400, Alan Stern wrote:
> > Okay. Don't we already have a litmus test in the archive that really
> > does create a deadlock? Something like: Lock Lock Unlock Unlock, all
> > using the same lock variable?
>
> We do have these guys:
>
> auto/C-RR-GR+RR-R+RR-R.litmus
> auto/C-RR-GR+RR-R.litmus
> auto/C-RW-GR+RW-R+RW-R.litmus
> auto/C-RW-GR+RW-R.litmus
> auto/C-WR-GR+WR-R+WR-R.litmus
> auto/C-WR-GR+WR-R.litmus
> auto/C-WW-GR+WW-R+WW-R.litmus
> auto/C-WW-GR+WW-R.litmus
> A synchronize_rcu() in an RCU read-side critical section.
>
> I added a manual/locked/self-deadlock.litmus, which is shown at the
> end of this email. Omitting the nested self-deadlocking acquisition
> and release gives one state with blank line. ;-)
Hah, because there is no "exists" clause and no variables other than the
spinlock itself.
> Or should I add a spin_is_locked() in order to get a non-empty
> state line?
It's fine the way it is.
Alan