Conversation
baelter
approved these changes
Mar 14, 2025
Member
baelter
left a comment
There was a problem hiding this comment.
The change makes sense without full head-wrapping achieved.
carlhoerberg
approved these changes
Mar 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm not entirely sure how this happened, but I managed to get a deadlock when running
lavinmqperf throughputagainst lavinmq via amqproxy. I couldn't reproduce with rabbitmq, but maybe it can happen with rabbitmq too (#198 could be the same problem).What I think happened is that one fiber in lavinmq held a lock while trying to write to a blocked socket (full buffer?), while the same happened for a fiber holding both the socket lock and the channels lock in
Upstream. By moving thesendcall to outside the channels lock other fibers in amqproxy could continue to operate and things moved.I know, very vauge description of the problem, but that's because I couldn't really wrap my head around it.
I had to run lavinmqperf with multiple publishers and consumers (
-x 5 -y 5) for it to happen, so I guess high throughput and multiple fibers had to be involved.