Skip to content

fix: remove deadlock in multiPacketListener#211

Merged
sbruens merged 12 commits into
masterfrom
sbruens/deadlock
Sep 18, 2024
Merged

fix: remove deadlock in multiPacketListener#211
sbruens merged 12 commits into
masterfrom
sbruens/deadlock

Conversation

@sbruens

@sbruens sbruens commented Sep 16, 2024

Copy link
Copy Markdown

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
Comment thread service/listeners.go Outdated
Comment thread service/listeners.go Outdated
@sbruens sbruens requested a review from fortuna September 18, 2024 14:30
Comment thread service/listeners.go
Comment thread service/listeners.go Outdated
Comment thread service/listeners.go
@sbruens sbruens requested a review from fortuna September 18, 2024 17:30

@fortuna fortuna left a comment

Copy link
Copy Markdown

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
@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