Question about ERESOURCE

Hi all,

I have a ERESOURCE in my legacy file system filter driver. I am testing this
driver with IoStress on Windows 2000 SP4. After the test has been running
for several hours, I check the status of this resource. And I have the
following output in WinDbg.

3: kd> !locks 0x85D37438

Resource @ 0x85d37438 Shared 205 owning threads

Contention Count = 71446

*NumberOfExclusiveWaiters = 3*

Threads: 84c87390-01<*> 83c5ea70-01<*> 84452030-01<*> 8564a030-01<*>

853f6cf0-01<*> 841cb030-01<*> 854dbc10-01<*> 84324db0-01<*>

84ae8970-01<*> 84289030-01<*> 837a5030-01<*> 84c2ddb0-01<*>

83cc3230-01<*> 8354fc30-01<*> 8403dc70-01<*> 84552770-01<*>

855b5030-01<*> 84854030-01<*> 843248b0-01<*> 853e96f0-01<*>

84e7a030-01<*> 83c789f0-01<*> 853e9970-01<*> 853ef730-01<*>

83bafc90-01<*> 84a9e150-01<*> 83705830-01<*> 84eb3030-01<*>

853f2030-01<*> 84d8dc50-01<*> 852ff7b0-01<*> 8508edb0-01<*>

85117c70-01<*> 84dce890-01<*> 85441c50-01<*> 8359adb0-01<*>

83ca1db0-01<*> 84130db0-01<*> 84b03db0-01<*> 84acddb0-01<*>

84aa2030-01<*> 839f5db0-01<*> 83cd0db0-01<*> 84d8d390-01<*>

84cff710-01<*> 84bc3030-01<*> 854ad030-01<*> 8346eb70-01<*>

84a16030-01<*> 849abc70-01<*> 83e58030-01<*> 84f9bdb0-01<*>

855e63d0-01<*> 852a0d30-01<*> 8440d830-01<*> 8513cdb0-01<*>

85425a30-01<*> 83715030-01<*> 83fc74f0-01<*> 85093b30-01<*>

84a921f0-01<*> 84c83030-01<*> 845af030-01<*> 84ba1730-01<*>

840b7cd0-01<*> 846ecb90-01<*> 8346fb50-01<*> 845521b0-01<*>

8492ddb0-01<*> 8566f770-01<*> 852c4db0-01<*> 8529fdb0-01<*>

836cd7d0-01<*> 854e67d0-01<*> 85255530-01<*> 8489a710-01<*>

8479b810-01<*> 83615350-01<*> 84b8f370-01<*> 84092c70-01<*>

836f0030-01<*> 83688030-01<*> 851accf0-01<*> 854a6cb0-01<*>

83b40b70-01<*> 85384d30-01<*> 854d5030-01<*> 850f97f0-01<*>

854997f0-01<*> 850f8650-01<*> 84f75570-01<*> 8550a270-01<*>

84ec9310-01<*> 84e22c70-01<*> 84f757f0-01<*> 834b9990-01<*>

85499030-01<*> 84e22970-01<*> 8508a650-01<*> 842a6650-01<*>

84bd2030-01<*> 84320030-01<*> 84e19db0-01<*> 856237b0-01<*>

83f88030-01<*> 84324630-01<*> 835f9d30-01<*> 8548db70-01<*>

83a80030-01<*> 84a773d0-01<*> 84910db0-01<*> 84a00730-01<*>

84348250-01<*> 84032b30-01<*> 848d3030-01<*> 851e4590-01<*>

8470ed90-01<*> 8505bdb0-01<*> 853bccb0-01<*> 84a3b030-01<*>

8495b8d0-01<*> 852ef030-01<*> 84f67790-01<*> 8444ddb0-01<*>

84ec6830-01<*> 8551cb70-01<*> 84f33db0-01<*> 84dfe030-01<*>

8345cd70-01<*> 84e20b50-01<*> 855b8330-01<*> 84e90b10-01<*>

84958770-01<*> 850799b0-01<*> 834eb030-01<*> 84870030-01<*>

84ab5450-01<*> 83ab8730-01<*> 85213030-01<*> 838aa030-01<*>

846f37f0-01<*> 84fa9910-01<*> 854c0bf0-01<*> 84be74d0-01<*>

835717f0-01<*> 84ca9590-01<*> 84ededb0-01<*> 83501d50-01<*>

846d9430-01<*> 847a9890-01<*> 83ce4570-01<*> 84443030-01<*>

840c8c10-01<*> 8370f530-01<*> 84d602f0-01<*> 847d9030-01<*>

84eb1330-01<*> 8370fdb0-01<*> 853dc7b0-01<*> 85590650-01<*>

85436b50-01<*> 849fc9b0-01<*> 83e6a8f0-01<*> 84664550-01<*>

84672410-01<*> 835ee030-01<*> 8438e650-01<*> 83562d30-01<*>

846a3030-01<*> 8417e850-01<*> 84bafab0-01<*> 84068030-01<*>

8436adb0-01<*> 8403d9f0-01<*> 83ca19f0-01<*> 842de9f0-01<*>

84b5a930-01<*> 852c8030-01<*> 850d64d0-01<*> 834ccdb0-01<*>

848a89b0-01<*> 84483030-01<*> 852252d0-01<*> 84d949d0-01<*>

84e02030-01<*> 851e4c10-01<*> 84c2f250-01<*> 85605290-01<*>

84639a30-01<*> 854eb810-01<*> 85728030-01<*> 84a2d5f0-01<*>

8427e770-01<*> 84abf930-01<*> 84324b30-01<*> 850fa870-01<*>

850be030-01<*> 853a24f0-01<*> 84a66db0-01<*> 85162a70-01<*>

84bb0db0-01<*> 8384cdb0-01<*> 842f7850-01<*> 8490f0f0-01<*>

84ab6db0-01<*>

*WARNING: Exclusive waiters in event waitlist (2) != count in resource (3)*

Threads Waiting On Exclusive Access:

84b6f030 84f016f0

1 total locks, 1 locks currently held
My question is what does the warning mean. 2 waiters in the waitlist. But
the count in resource is 3 which means there should be 3 exclusive waiters.
I dumped the resource as the following.

3: kd> dt _ERESOURCE 0x85d37438 -r1
nt!_ERESOURCE
+0x000 SystemResourcesList : _LIST_ENTRY [0x85d374f8 - 0x85d3790c]
+0x000 Flink : 0x85d374f8 _LIST_ENTRY [ 0x85d375f8 -
0x85d37438 ]
+0x004 Blink : 0x85d3790c _LIST_ENTRY [ 0x85d37438 -
0x85d372d8 ]
+0x008 OwnerTable : 0x851c8008 _OWNER_ENTRY
+0x000 OwnerThread : 0
+0x004 OwnerCount : 223
+0x004 TableSize : 0xdf
+0x00c ActiveCount : 205
+0x00e Flag : 0
+0x010 SharedWaiters : 0x857172e8 _KSEMAPHORE
+0x000 Header : _DISPATCHER_HEADER
+0x010 Limit : 2147483647
+0x014 ExclusiveWaiters : 0x8517c5a8 _KEVENT
+0x000 Header : _DISPATCHER_HEADER
+0x018 OwnerThreads : [2] _OWNER_ENTRY
+0x000 OwnerThread : 0
+0x004 OwnerCount : 0
+0x004 TableSize : 0
+0x028 ContentionCount : 0x11716
+0x02c NumberOfSharedWaiters : 0
+0x02e NumberOfExclusiveWaiters : 3
+0x030 Address : (null)
+0x030 CreatorBackTraceIndex : 0
+0x034 SpinLock : 1

Can anyone explain this? Thanks.

I’ve seen this before; I suspect there was some sort of “window” in which the count could get out of synch. I’ve never seen it actually cause a problem and thus I just ignore it.

Tony
OSR