Skip to content

System.Net.Sockets.Tests tests fail with ObjectDisposedException #126183

Description

@danmoseley

Build Information

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1512502
Build error leg or test failing: System.Net.Sockets.Tests.WorkItemExecution
Pull request: #126006

Error Message

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

{
  "ErrorMessage": ["System.Net.Sockets.Tests", "ObjectDisposedException", "System.Net.Sockets.SafeSocketHandle"],
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

net11.0-osx-Debug-x64-Mono_Minijit_Debug-OSX.15.Amd64.Open

  Starting:    System.Net.Sockets.Tests (parallel test collections = on [2 threads], stop on fail = off)
[ERROR] FATAL UNHANDLED EXCEPTION: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Net.Sockets.SafeSocketHandle'.
   at System.Runtime.InteropServices.SafeHandle.DangerousAddRef(Boolean& success) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/SafeHandle.cs:line 165
   at System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller`1.ManagedToUnmanagedIn[[System.Runtime.InteropServices.SafeHandle, System.Private.CoreLib, Version=11.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].FromManaged(SafeHandle handle) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshalling/SafeHandleMarshaller.cs:line 32
   at Interop.Sys.Fcntl.SetIsNonBlocking(SafeHandle fd, Int32 isNonBlocking) in /_/artifacts/obj/System.Net.Sockets/Debug/net11.0-unix/Microsoft.Interop.LibraryImportGenerator/Microsoft.Interop.LibraryImportGenerator/LibraryImports.g.cs:line 314
   at System.Net.Sockets.SocketAsyncContext.SetHandleBlocking() in /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncContext.Unix.cs:line 1386
   at System.Net.Sockets.SafeSocketHandle.SetBlocking() in /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SafeSocketHandle.Unix.cs:line 154
   at System.Net.Sockets.SocketAsyncContext.ConnectOperation.InvokeCallback(Boolean allowPooling) in /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncContext.Unix.cs:line 681
   at System.Net.Sockets.SocketAsyncContext.OperationQueue`1[[System.Net.Sockets.SocketAsyncContext.WriteOperation, System.Net.Sockets, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].ProcessAsyncOperation(WriteOperation op) in /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncContext.Unix.cs:line 1027
   at System.Net.Sockets.SocketAsyncContext.ProcessAsyncWriteOperation(WriteOperation op) in /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncContext.Unix.cs:line 1468
   at System.Net.Sockets.SocketAsyncContext.WriteOperation.System.Threading.IThreadPoolWorkItem.Execute() in /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncContext.Unix.cs:line 347
   at System.Net.Sockets.SocketAsyncContext.AsyncOperation.Process() in /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncContext.Unix.cs:line 291
   at System.Net.Sockets.SocketAsyncContext.HandleEvents(SocketEvents events) in /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncContext.Unix.cs:line 2302
   at System.Net.Sockets.SocketAsyncEngine.System.Threading.IThreadPoolWorkItem.Execute() in /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEngine.Unix.cs:line 279
   at System.Threading.ThreadPoolWorkQueue.Dispatch() in /_/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPoolWorkQueue.cs:line 950
   at System.Threading.PortableThreadPool.WorkerThread.WorkerDoWork(PortableThreadPool threadPoolInstance) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.WorkerThread.cs:line 145
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() in /_/src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.WorkerThread.cs:line 121
   at System.Threading.Thread.StartHelper.RunWorker() in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Thread.cs:line 90

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1512502
Error message validated: [System.Net.Sockets.Tests ObjectDisposedException System.Net.Sockets.SafeSocketHandle]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 7/17/2026 11:25:31 AM UTC

Report

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 0 0

Report

Build Repository Test Pull Request
1512502 dotnet/runtime System.Net.Sockets.Tests.WorkItemExecution #130416

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
1 1 1

Report

Build Repository Test Pull Request
1612733 dotnet/runtime System.Net.Sockets.Tests.WorkItemExecution
1612492 dotnet/runtime System.Net.Sockets.Tests.WorkItemExecution #134210
1611188 dotnet/runtime System.Net.Sockets.Tests.WorkItemExecution #133696
1610552 dotnet/runtime System.Net.Sockets.Tests.WorkItemExecution #134584
1609145 dotnet/runtime System.Net.Sockets.Tests.WorkItemExecution #134424
1605789 dotnet/runtime System.Net.Sockets.Tests.WorkItemExecution #133804
1602519 dotnet/runtime System.Net.Sockets.Tests.WorkItemExecution #134124
1602112 dotnet/runtime System.Net.Sockets.Tests.WorkItemExecution #134121
1596873 dotnet/runtime System.Net.Sockets.Tests.WorkItemExecution #133921
1595579 dotnet/runtime System.Net.Sockets.Tests.WorkItemExecution #133599
1592269 dotnet/runtime System.Net.Sockets.Tests.WorkItemExecution #133413
1591631 dotnet/runtime System.Net.Sockets.Tests.WorkItemExecution #133599
1590382 dotnet/runtime System.Net.Sockets.Tests.WorkItemExecution #132953
1589850 dotnet/runtime System.Net.Sockets.Tests.WorkItemExecution #132687

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 6 14

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Known Build ErrorUse this to report build issues in the .NET Helix tabarea-System.Net.Socketsblocking-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