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: remove deadlock in multiPacketListener #211

Merged
merged 12 commits into from
Sep 18, 2024
Merged

Conversation

sbruens
Copy link

@sbruens sbruens commented Sep 16, 2024

The multiPacketListener and virtualPacketConn are prone to deadlocks during concurrent ReadFrom() and Close() operations. A deadlock when closing connections concurrently with ongoing read operations is preventing the config from getting reloaded on receiving multiple SIGHUP signals.

@sbruens sbruens changed the title Sbruens/deadlock fix: remove deadlock in multiPacketListener Sep 16, 2024
service/listeners.go Outdated Show resolved Hide resolved
service/listeners.go Outdated Show resolved Hide resolved
service/listeners.go Show resolved Hide resolved
service/listeners.go Outdated Show resolved Hide resolved
service/listeners.go Show resolved Hide resolved
Copy link

@fortuna fortuna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should still check the if the readCh is closed, but otherwise LGTM

@sbruens sbruens merged commit 8ee3b79 into master Sep 18, 2024
5 checks passed
@sbruens sbruens deleted the sbruens/deadlock branch September 18, 2024 19:48
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.

2 participants