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

lxd/rsync: Tweaks Recv's internal synchronisation to avoid race #6389

Merged
merged 1 commit into from Nov 2, 2019

Conversation

@tomponline
Copy link
Member

tomponline commented Nov 2, 2019

This is just a hunch as to the possible cause of the race condition in rsync.Recv.

I believe the function go be exiting early (because the 2 synchronisation channels are filled with an error value) meaning the Recv function exists before the go routines, and in the situation where the Recv function is called immediately afterwards (when transferring multiple volume snapshots) and using a new wrapper of WebsocketIO (with its own lock) this could cause multiple writers to the parent websocket conn concurrently.

Signed-off-by: Thomas Parrott thomas.parrott@canonical.com

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
@tomponline tomponline requested a review from stgraber Nov 2, 2019
@tomponline

This comment has been minimized.

Copy link
Member Author

tomponline commented Nov 2, 2019

@stgraber this is just a test to see if it fixes the race conditions on jenkins.

@lxc-jenkins

This comment has been minimized.

Copy link

lxc-jenkins commented Nov 2, 2019

Testsuite passed

@stgraber stgraber merged commit 3115603 into lxc:master Nov 2, 2019
5 checks passed
5 checks passed
Branch target Branch target is correct
Details
DCO All commits signed-off
Details
Testsuite Build finished.
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@tomponline tomponline deleted the tomponline:tp-migration-race branch Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.