FAST_ERESOURCE_PRECONDITION_VIOLATION -> EX_FAST_RESOURCE_ENABLE_LEGACY_APIS

Hi,

I got the following issue under verifier but I can not find anything related to EX_FAST_RESOURCE_ENABLE_LEGACY_APIS,
any idea? TIA

FAST_ERESOURCE_PRECONDITION_VIOLATION (1c6)
The current thread is performing an invalid call to a fast resource routine.
Arguments:
Arg1: 000000000000000f, The caller passed a fast resource to a legacy routine that
supports fast resources, but the fast resource was not
initialized with EX_FAST_RESOURCE_ENABLE_LEGACY_APIS.
Arg2: fffff807177c1c38, Pointer to the resource.
Arg3: 0000000000000000
Arg4: 0000000000000000

FAULTING_SOURCE_CODE:
426: KeEnterCriticalRegion();
427: ExAcquireResourceExclusiveLite(&Globals.Sessions.Lock, TRUE);
> 428: context = ExAllocatePool(FILTER_NONPAGED_POOL, sizeof(*context));
429: if (!context)
430: {
431: status = STATUS_INSUFFICIENT_RESOURCES;
432: leave;

Cool! That’s one I haven’t seen before.

The Windows and WDK version you’re using, please?

Peter

@“Peter_Viscarola_(OSR)” said:
Cool! That’s one I haven’t seen before.

The Windows and WDK version you’re using, please?

Peter

We are using Windows Server 2019 Standard Version: 1809 Build: 17763.1457
WDK 10.0.17134.0

Thanks.

So, not anything exotic, then. I expected to hear Win 11 and V.Next of the WDK.

Hmmmmm…

I’m also hitting this issue randomly with verifier (standard settings) enabled.

**WDK version: **10.0.14393.
**Target System: ** Windows 10, 64-bit

Here are the APIs used and code flow

ExInitializeResourceLite(&eresrclock)

KeEnterCriticalRegion();
ExAcquireResourceExclusiveLite(&eresrclock, TRUE);

ExReleaseResourceLite(&eresrclock);
KeLeaveCriticalRegion();

FAST_ERESOURCE_PRECONDITION_VIOLATION (1c6)
The current thread is performing an invalid call to a fast resource routine.
Arguments:
Arg1: 000000000000000f, The caller passed a fast resource to a legacy routine that
supports fast resources, but the fast resource was not
initialized with EX_FAST_RESOURCE_ENABLE_LEGACY_APIS.
Arg2: fffff8040710a230, Pointer to the resource.
Arg3: 0000000000000000
Arg4: 0000000000000000

Could someone guide on this?

Can you post a full stack? Is it reproducible? It might be a memory corruption otherwise.

@azys did you get to the bottom of this?

I can’t seem to find a lot of info on the FAST_ERESOURCE_PRECONDITION_VIOLATION and EX_FAST_RESOURCE_ENABLE_LEGACY_APIS. What is it referring to? Fast I/O, or what?