The SRW lock is being acquired recursively by the same thread |
Application Verifier break message
The SRW lock is being acquired recursively by the same thread.
Probable cause
This stop is generated if an SRW lock is being acquired recursively by the same thread.
Information displayed by Application Verifier
Parameter 1 � SRW lock address
Parameter 2 � Address of the first �acquire� stack trace.
Parameter 3 � Not used
Parameter 4 � Not used
Additional Information
Verifier Stop Code 0253.
If you acquire an SRW lock recursively, the result can be a deadlock and a thread that blocks indefinitely. Recursive acquisition of an SRW lock in exclusive mode will cause a deadlock. Recursive acquisition of an SRW lock in shared mode will cause a deadlock when there is a thread waiting for exclusive access. Consider the example below.
-
Thread A acquires the SRW lock in shared mode.
-
Thread B tries to acquire the SRW lock in exclusive mode and waits.
-
Thread A tries to acquire the SRW lock in shared mode recursively. This will be successful as long as there is no exclusive waiter (in this case B). Since SRW locks do not have writer starvation, thread A waits behind thread B. Now Thread B is waiting for Thread A, which is in turn waiting for Thread B, This is a circular wait, which results in a deadlock.
To debug this stop, use the following debugger commands:
kb - to get the current stack trace. The stack trace shows you where the SRW lock is being acquired recursively.
dps parameter 2 � to get the first �acquire� stack trace. The first �acquire� stack trace shows you where the lock was acquired.