Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LockRecursionException on UnhandledExceptionBridge on 9.0.0 #513

Closed
theolivenbaum opened this issue Feb 8, 2024 · 8 comments
Closed

LockRecursionException on UnhandledExceptionBridge on 9.0.0 #513

theolivenbaum opened this issue Feb 8, 2024 · 8 comments
Labels

Comments

@theolivenbaum
Copy link

Just saw this exception when using Raygun4net, seems to be related to this file.

Unhandled Exception, will terminate now!
System.Threading.LockRecursionException: Write lock may not be acquired with read lock held. This pattern is prone to deadlocks. Please ensure that read locks are released before taking a write lock. If an upgrade is necessary, use an upgrade lock in place of the read lock.
   at System.Threading.ReaderWriterLockSlim.TryEnterWriteLockCore(TimeoutTracker timeout)
   at System.Threading.ReaderWriterLockSlim.EnterWriteLock()
   at Mindscape.Raygun4Net.UnhandledExceptionBridge.RemoveDeadHandler(WeakExceptionHandler handler) in C:\buildAgent\work\75116afedfe31196\Mindscape.Raygun4Net.NetCore.Common\UnhandledExceptionBridge.cs:line 72
   at Mindscape.Raygun4Net.UnhandledExceptionBridge.WeakExceptionHandler.Invoke(Exception exception, Boolean isTerminating) in C:\buildAgent\work\75116afedfe31196\Mindscape.Raygun4Net.NetCore.Common\UnhandledExceptionBridge.cs:line 123
   at Mindscape.Raygun4Net.UnhandledExceptionBridge.RaiseUnhandledException(Exception exception, Boolean isTerminating) in C:\buildAgent\work\75116afedfe31196\Mindscape.Raygun4Net.NetCore.Common\UnhandledExceptionBridge.cs:line 40
   at Mindscape.Raygun4Net.UnhandledExceptionBridge.<>c.<.cctor>b__3_1(Object sender, UnobservedTaskExceptionEventArgs args) in C:\buildAgent\work\75116afedfe31196\Mindscape.Raygun4Net.NetCore.Common\UnhandledExceptionBridge.cs:line 27
   at System.Threading.Tasks.TaskExceptionHolder.Finalize()
@theolivenbaum
Copy link
Author

Probably introduced by this change.

@theolivenbaum theolivenbaum changed the title LockRecursionException on UnhandledExceptionBridge LockRecursionException on UnhandledExceptionBridge on 9.0.0 Feb 8, 2024
@olane
Copy link

olane commented Feb 8, 2024

We have seen the same with this release.

@phillip-haydon
Copy link
Contributor

Thanks for raising this, I have unlisted v9.0.0 while we investigate and fix this.

@xenolightning
Copy link
Contributor

xenolightning commented Feb 8, 2024

Thanks for reporting this.

It looks to be caused by the dispatching to a dead handler, and trying to upgrade the lock.

This will be affecting 9.0.0 and 8.2.1, we've delisted both packages, and will be pushing a fix for it ASAP

@xenolightning
Copy link
Contributor

This has been fixed in #514

And released to nuget under 9.0.1

Again, thanks for raising this, and sorry for nuisance this release caused for you.

@theolivenbaum
Copy link
Author

No worries! Thanks for the quick fix!

@olane
Copy link

olane commented Apr 17, 2024

Was the wrong version delisted here? On NuGet I'm seeing 8.2.1 still present but 8.2.0 seems to be gone, but I think it should be the other way around: https://www.nuget.org/packages/Mindscape.Raygun4Net.AspNetCore/8.2.1#versions-body-tab

We just mistakenly upgraded to 8.2.1 and hit this again as a result.

@xenolightning
Copy link
Contributor

You're absolutely right @olane - thanks for the heads up.

I've delisted that package now, feel free to reach out if you run into any other issues when upgrading, cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants