question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

net5.0 on non-windows System.ArgumentNullException at System.Threading.Overlapped.Free

See original GitHub issue

Describe the bug After upgrading our application to .net5.0 we experience regular exceptions on linux docker containers with the stack below

Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter 'nativeOverlappedPtr')
   at System.Threading.Overlapped.Free(NativeOverlapped* nativeOverlappedPtr)
   at System.Runtime.IOThreadScheduler.ScheduledOverlapped.Cleanup()
   at System.Runtime.IOThreadScheduler.Cleanup()
   at System.Runtime.IOThreadScheduler.Finalize()
Aborted (core dumped)

To Reproduce .net5.0 application calling an external resource through WCF generated client code wsdl here running in linux docker container

Additional context We highly suspect something related to #4360 . At first glance the comments and changes seems to match our current issue. Strangely the change made in IOThreadScheduler.cs file seems to be the opposite of the original purpose of the PR.

Any help would be greatly appreciated Thanks in advance Morgan

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
wafcommented, Jan 26, 2021

Any chance this could be released as a patch? We’re also seeing this on Linux in production, and it’s crashing the process.

1reaction
BogdanovKirillcommented, Dec 1, 2020

Same issue with System.ServiceModel.Http 4.8 and System.ServiceModel.Primitives 4.8 packages. Downgrading to 4.7 could avoid this bug. I use .net3.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Overlapped.Free(NativeOverlapped*) Method
Frees the unmanaged memory associated with a native overlapped structure allocated by the Pack method. public: static void Free(System::Threading:: ...
Read more >
.Net core 3.1 c# Console Application crashing on docker ...
System.ArgumentNullException: Value cannot be null. (Parameter 'nativeOverlappedPtr') at System.Threading.Overlapped.Free(NativeOverlapped* ...
Read more >
System.Threading.Overlapped 4.3.0
Provides common types for interacting with asynchronous (or overlapped) input and output (I/O). Commonly Used Types: System.Threading.
Read more >
Chocolatey Software | NuGet Package Explorer 6.0.27
Chocolatey is software management automation for Windows that wraps installers, executables, zips, and scripts into compiled packages.
Read more >
C 10 and NET 6 – Modern Cross Platform Development Build apps ...
1. In Solution Explorer, right-click the Instrumenting project and select Manage NuGet Packages. · 2. Select the Browse tab. · 3. In the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found