Skip to content

Test failure - System.NullReferenceException in System.Threading.Lock.TryInitializeStatics #94728

Closed
@jkotas

Description

@jkotas
Running assembly:System.Net.HttpListener.Tests, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
Process terminated. Exception thrown from SocketAsyncEngine event loop: System.TypeInitializationException: A type initializer threw an exception. To determine which type, inspect the InnerException's StackTrace property.
 ---> System.TypeInitializationException: A type initializer threw an exception. To determine which type, inspect the InnerException's StackTrace property.
 ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at System.Threading.Lock.TryInitializeStatics() + 0xf8
   at System.Threading.Lock.TryEnterSlow(Int32, Lock.ThreadId) + 0x16c
   at System.Threading.Lock.EnterAndGetCurrentThreadId() + 0x68
   at System.Runtime.CompilerServices.ClassConstructorRunner.Cctor.GetCctor(StaticClassConstructionContext*) + 0x38
   at System.Runtime.CompilerServices.ClassConstructorRunner.EnsureClassConstructorRun(StaticClassConstructionContext*) + 0x38
   at System.Runtime.CompilerServices.ClassConstructorRunner.CheckStaticClassConstructionReturnGCStaticBase(StaticClassConstructionContext*, Object) + 0x14
   at System.Diagnostics.Tracing.NativeRuntimeEventSource..cctor() + 0x58
   at System.Runtime.CompilerServices.ClassConstructorRunner.EnsureClassConstructorRun(StaticClassConstructionContext*) + 0xc8
   --- End of inner exception stack trace ---
   at System.Runtime.CompilerServices.ClassConstructorRunner.EnsureClassConstructorRun(StaticClassConstructionContext*) + 0x15c
   at System.Runtime.CompilerServices.ClassConstructorRunner.CheckStaticClassConstructionReturnGCStaticBase(StaticClassConstructionContext*, Object) + 0x14
   at System.Threading.PortableThreadPool..ctor() + 0x1b0
   at System.Threading.PortableThreadPool..cctor() + 0x68
   at System.Runtime.CompilerServices.ClassConstructorRunner.EnsureClassConstructorRun(StaticClassConstructionContext*) + 0xc8
   --- End of inner exception stack trace ---
   at System.Runtime.CompilerServices.ClassConstructorRunner.EnsureClassConstructorRun(StaticClassConstructionContext*) + 0x15c
   at System.Runtime.CompilerServices.ClassConstructorRunner.CheckStaticClassConstructionReturnGCStaticBase(StaticClassConstructionContext*, Object) + 0x14
   at System.Threading.ThreadPoolWorkQueue.Enqueue(Object, Boolean) + 0x140
   at System.Threading.ThreadPool.UnsafeQueueUserWorkItem(IThreadPoolWorkItem, Boolean) + 0x60
   at System.Net.Sockets.SocketAsyncEngine.EventLoop() + 0xc4
   at System.RuntimeExceptionHelpers.FailFast(String, Exception, String, RhFailFastReason, IntPtr, IntPtr) + 0x180
   at System.Net.Sockets.SocketAsyncEngine.EventLoop() + 0x160
   at System.Runtime.EH.DispatchEx(StackFrameIterator&, EH.ExInfo&) + 0x204
   at System.Runtime.EH.RhThrowEx(Object, EH.ExInfo&) + 0x44
   at System.Threading.Thread.StartThread(IntPtr) + 0x154

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=468884
Build error leg or test failing: System.Net.HttpListener.Tests.WorkItemExecution
Pull request: #94692

Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "System.Threading.Lock.TryInitializeStatics",
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=468884
Error message validated: System.Threading.Lock.TryInitializeStatics
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 11/14/2023 6:27:46 PM UTC

Report

Build Definition Test Pull Request
531213 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #97062
531121 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #97075
530911 dotnet/runtime Microsoft.Extensions.FileProviders.Physical.Tests.WorkItemExecution
530962 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #97114
530971 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #97080
530810 dotnet/runtime System.Formats.Tar.Tests.WorkItemExecution #97062
530819 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #97104
530811 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #97052
530826 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution
530592 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96841
530528 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #90505
530404 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96386
530373 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #97087
530327 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96354
529245 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #90505
530151 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #97096
530144 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96974
2355601 dotnet-runtime Device Startup - iOS NativeAOT HelloWorld nollvm nosymbols HybridGlobalization.WorkItemExecution
530041 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #97087
529935 dotnet/runtime System.IO.Tests.WorkItemExecution
529924 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #97079
529691 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #97068
529669 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #97058
529552 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #95980
529539 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96995
529444 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #97058
529413 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #97055
529298 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96890
529173 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96386
528933 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #94764
528672 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96896
528657 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96841
528612 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96678
528493 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96974
528295 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution
528343 dotnet/runtime System.IO.FileSystem.Tests.WorkItemExecution #96888
528270 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #94764
528225 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #97017
528183 dotnet/runtime System.IO.FileSystem.Tests.WorkItemExecution #96805
528007 dotnet/runtime JIT.CodeGenBringUpTests.WorkItemExecution
528035 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96982
528027 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96983
527919 dotnet/runtime JIT.CodeGenBringUpTests.WorkItemExecution #96982
527994 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #97005
527889 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #94764
527849 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96995
527816 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96201
527706 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96992
527644 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96991
527576 dotnet/runtime nativeaot/SmokeTests/Reflection/Reflection_FromUsage/Reflection_FromUsage.sh #96678
527456 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96676
527428 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96985
527361 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96969
527355 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96983
527210 dotnet/runtime System.Web.HttpUtility.Tests.WorkItemExecution
527253 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96741
527177 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96969
527171 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96894
527165 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution
526886 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution
526876 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution
526833 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96927
526822 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96960
526766 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96896
526623 dotnet/runtime System.Threading.Tasks.Dataflow.Tests.WorkItemExecution
526521 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96926
526484 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96794
526474 dotnet/runtime Microsoft.Extensions.Options.Tests.WorkItemExecution
526396 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96890
526349 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96896
526289 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96676
526254 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #95904
526165 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96936
526144 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96933
526132 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96931
525957 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96927
525923 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96926
525906 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96877
525842 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96924
525667 dotnet/runtime JIT.CodeGenBringUpTests.WorkItemExecution
525785 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96913
525765 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96921
525420 dotnet/runtime Microsoft.Extensions.Configuration.Xml.Tests.WorkItemExecution #96906
525477 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96805
525402 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96902
525362 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96880
525344 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96741
525261 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96678
525140 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96676
525105 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #95904
525086 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96893
524959 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96558
524821 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution
524798 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution
524790 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #95583
524255 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96829
524273 dotnet/runtime System.Net.Primitives.Pal.Tests.WorkItemExecution
524311 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96870
524291 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96867
524168 dotnet/runtime nativeaot.SmokeTests.WorkItemExecution #96805
Displaying 100 of 215 results

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
23 112 215

Metadata

Metadata

Assignees

Labels

Known Build ErrorUse this to report build issues in the .NET Helix tabarea-System.Threadingblocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions