-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
fix race conditions on entry #1047
fix race conditions on entry #1047
Conversation
04ad9f3
to
c7278b2
Compare
This is still a bug. It can occur with any use of Entry and a hook (i.e. logrustash). |
Thank you @blocknonip and @lwsanty!!. Sorry for the stalebot spam. I thought it would only label/comment on issues, not PRs too. |
This lock is far too aggressive. It locks the entire logger, rather than a single entry as I believe it should. |
Agree, we should find a better solution than this one. |
@flimzy my apologies for merging this so quickly. would you want to work on a PR to lock only the entry? If not I can early this coming week. |
I looked at it briefly before posting my comment, and it wasn't immediately obvious the proper solution. It looks like we need to add a mutex to the While working on that, I ran into what may be other overly-aggressive locks which could be relaxed, too, but it's tricky to do that with confidence, without tests covering all possible races (which are incredibly hard to test). I'll try again if I have time, but you may get to it faster than me. |
…entry fix race conditions on entry
closes #1046