'Windbg "!locks" command doesn't work, can I get information anyway?

While debugging dump files, regularly I need to check for locks, for which I use the windbg extension command !locks. When everything goes well, this provides an output like the following:

CritSec +54a8a8 at 0054a8a8
WaiterWoken        No
LockCount          0
RecursionCount     1
OwningThread       13d8
EntryCount         0
ContentionCount    0
*** Locked

CritSec +b73a8d at 00135e8d
WaiterWoken        No
LockCount          0
RecursionCount     1
OwningThread       55f3
EntryCount         0
ContentionCount    0
*** Locked

...

Scanned 662 critical sections

Sometimes, however, I get following error message:

Stopped scanning because of problem reading critical section debug info

Scanned 7 critical sections

Is it possible to have some information anyway? (E.g. where is that critical section debug info, how can I read it without the !locks command, ...)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source