Menu ▾ ▴

#3 deadlock bug for ReaderWriterLock in cluster.cs

v1.0_(example)
open
nobody
deadlock (1)
5
2017-07-06
2017-07-06
Tim Jiang
No

I am a recent user of it and found a bug in cluster.cs. I am not sure if it still exists in the new version and if it's a good idea to report but I feel the impulse of doing it.

For ReaderWriterLock which is used for _jobsLock
Defines a lock that supports single writers and multiple readers.
https://msdn.microsoft.com/en-us/library/system.threading.readerwriterlock(v=vs.110).aspx
But I found two writers running in the dump file.
Two threads requesting the writer lock.
One is running Fail()>SaveState()>_jobsLock.AcuireWriterLock(),
The other is in Request()>SaveState()>_jobsLock.AcuireWriterLock()

Using ReaderWriterLockSlim may fix it.

Thank you for your attention.

Kind Regards

Tim Jiang, Software Developer

Discussion


Log in to post a comment.