Skip to content

Crash InvalidOperationException: 'overlapped' has already been freed. #61899

Open
@rgroenewoudt

Description

@rgroenewoudt

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

We are running into an issue that our application is crashing multiple times.

Windows event log:

Application: BackOffice.exe
CoreCLR Version: 8.0.1525.16413
.NET Version: 8.0.15
Description: The process was terminated due to an unhandled exception.
Exception Info: System.InvalidOperationException: 'overlapped' has already been freed.
   at System.Threading.ThreadPoolBoundHandle.OnNativeIOCompleted(IntPtr instance, IntPtr context, IntPtr overlappedPtr, UInt32 ioResult, UIntPtr numberOfBytesTransferred, IntPtr ioPtr)

2nd stacktrace:

Exception Info: System.ArgumentException: ‘overlapped’ has already been freed. (Parameter ‘overlapped’)
at Microsoft.AspNetCore.HttpSys.Internal.SafeNativeOverlapped.ReleaseHandle()
at System.Runtime.InteropServices.SafeHandle.InternalRelease(Boolean disposeOrFinalizeOperation)
at System.Runtime.InteropServices.SafeHandle.Finalize()

It seems related to http.sys

We have shared crashdumps with Microsoft on https://developercommunity.visualstudio.com/t/NET-8-native-crash-InvalidOperationExce/10897692

Expected Behavior

No response

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

8.0.408

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsfeature-httpsys

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions