Skip to content

Conversation

@aidenwallis
Copy link

@aidenwallis aidenwallis commented Dec 18, 2025

Addresses #119 !

I discovered that the deadlock happens as a result of #113 moving the Unlock() calls on the batch mutexes to be a defer. This happens because the unlocks run after the defer finish(thunk) is called for the tracer.

The simplest way to fix this seems to be to simply revert the defer statements added in that PR, and keep everything else, from reading this code, I don't believe this should cause any other issues since no where else early returns in that function.

I left a comment to give a little bit of context for whoever comes to refactoring that part next, and included a unit test which simulates the POC of the bug I created here, to ensure there isn't a regression accidentally introduced in the future.

Thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant