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

fix dead lock while get connecions #268

Merged
merged 5 commits into from Mar 6, 2024

Conversation

qzhuyan
Copy link
Collaborator

@qzhuyan qzhuyan commented Mar 6, 2024

Catched by proper tests,

In quicer:get_connections call, while holding the lock of r_ctx, deref c_ctx may cause connection close and then trigger callback that destroy c_ctx which try to lock r_ctx in another thread, causing dead lock.

solution is to deref c_ctx after unlock r_ctx.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 8171327323

Details

  • 12 of 12 (100.0%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.2%) to 87.361%

Files with Coverage Reduction New Missed Lines %
src/quicer_stream.erl 1 78.72%
Totals Coverage Status
Change from base Build 8094481333: 0.2%
Covered Lines: 3774
Relevant Lines: 4320

💛 - Coveralls

@qzhuyan qzhuyan merged commit 574417a into emqx:main Mar 6, 2024
24 checks passed
@qzhuyan qzhuyan deleted the dev/william/proper-tests branch March 6, 2024 14:50
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.

None yet

3 participants