Skip to content

Assert failure(PID 5984 [0x00001760], Thread: 1888 [0x0760]): CONTRACT VIOLATION by CallCountingManager::OnCallCountThresholdReached within calls to KERNELBASE! EnumCalendarInfoExEx  #46512

@danmoseley

Description

@danmoseley

Globalization related tests are periodically failing with output like this

Assert failure(PID 5984 [0x00001760], Thread: 1888 [0x0760]): CONTRACT VIOLATION by CallCountingManager::OnCallCountThresholdReached at "F:\workspace\_work\1\s\src\coreclr\vm\callcounting.cpp" @ 725

MODE_COOPERATIVE encountered while thread is in preemptive state.

                        CONTRACT in CallCountingManager::OnCallCountThresholdReached at "F:\workspace\_work\1\s\src\coreclr\vm\callcounting.cpp" @ 725
                        CONTRACT in DispatchCallSimple at "F:\workspace\_work\1\s\src\coreclr\vm\callhelpers.cpp" @ 185
                        CONTRACT in ThreadNative::KickOffThread_Worker at "F:\workspace\_work\1\s\src\coreclr\vm\comsynchronizable.cpp" @ 148
                        CONTRACT in ManagedThreadBase_DispatchInner at "F:\workspace\_work\1\s\src\coreclr\vm\threads.cpp" @ 7293
                        CONTRACT in ManagedThreadBase_FullTransition at "F:\workspace\_work\1\s\src\coreclr\vm\threads.cpp" @ 7542
                        CONTRACT in ThreadNative::KickOffThread at "F:\workspace\_work\1\s\src\coreclr\vm\comsynchronizable.cpp" @ 196

We can't find the violated contract. Look for an old-style non-holder-based contract.


CORECLR! <no symbol> + 0x0 (0x00007ff8`11a93c82)
CORECLR! GetCLRRuntimeHost + 0x259212 (0x00007ff8`11de2f32)
CORECLR! <no symbol> + 0x0 (0x00007ff8`11af7229)
CORECLR! GetCLRRuntimeHost + 0x5CD7D5 (0x00007ff8`121574f5)
KERNELBASE! RegLoadMUIStringA + 0x17B37 (0x00007ff8`3c5b6437)
KERNELBASE! EnumCalendarInfoExEx + 0x5A (0x00007ff8`3c57fcda)
SYSTEM.PRIVATE.CORELIB! <no symbol> + 0x0 (0x00007ff8`114ea4dc)
SYSTEM.PRIVATE.CORELIB! <no symbol> + 0x0 (0x00007ff8`115e2528)
SYSTEM.PRIVATE.CORELIB! <no symbol> + 0x0 (0x00007ff8`115e22ca)
SYSTEM.PRIVATE.CORELIB! <no symbol> + 0x0 (0x00007ff8`115e1e85)
    File: F:\workspace\_work\1\s\src\coreclr\vm\callcounting.cpp Line: 725
    Image: C:\h\w\A2F3094A\p\dotnet.exe

----- end Thu 12/31/2020  8:15:58.95 ----- exit code -1073740286 ----------------------------------------------------------

It is happening ~2x a day over the last 10 days and only on windows.10.amd64.open.rt ### OS: Distro=WindowsProductType=8 WindowsInstallationType=Server Description=Microsoft Windows 10.0.14393 Version=Microsoft Windows NT 10.0.14393.0 Arch=X64 Rid=win10-x64

It occurs in these test jobs

System.Globalization.Tests
System.Globalization.Nls.Tests
System.Runtime.Tests

the stack always contains

KERNELBASE! Internal_EnumCalendarInfo + 0x225 (0x00007ff8`b074ff15)
KERNELBASE! EnumCalendarInfoExEx + 0x5A (0x00007ff8`b074fcda)

or

KERNELBASE! RegLoadMUIStringA + 0x17B37 (0x00007ff8`3c5b6437)
KERNELBASE! EnumCalendarInfoExEx + 0x5A (0x00007ff8`3c57fcda)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions