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 tsh player issues #11491

Merged
merged 3 commits into from
Mar 29, 2022
Merged

Fix tsh player issues #11491

merged 3 commits into from
Mar 29, 2022

Conversation

zmb3
Copy link
Collaborator

@zmb3 zmb3 commented Mar 27, 2022

This commit fixes race conditions in the tsh session player by using
a condition variable to detect state changes rather than unsafely
polling a variable that is written by a separate goroutine.

In addition, fix an off by one error when resuming playback
after pausing. The player's position variable has always stored
the index of the last succesfully played event, so when we resume
playback we should start at position+1 to not re-play the previous
event twice.

Fixes #11479

@zmb3 zmb3 force-pushed the zmb3/tsh-play-race branch 3 times, most recently from 4ff97a1 to 96d6cb4 Compare March 28, 2022 14:30
@zmb3 zmb3 marked this pull request as ready for review March 28, 2022 14:30
@zmb3 zmb3 added tsh tsh - Teleport's command line tool for logging into nodes running Teleport. backport-required labels Mar 28, 2022
@zmb3 zmb3 force-pushed the zmb3/tsh-play-race branch 3 times, most recently from 3707b36 to 6bff75f Compare March 28, 2022 17:30
lib/client/player.go Outdated Show resolved Hide resolved
lib/client/player.go Outdated Show resolved Hide resolved
lib/client/player.go Outdated Show resolved Hide resolved
lib/client/player.go Outdated Show resolved Hide resolved
zmb3 added 2 commits March 29, 2022 10:14
This commit fixes race conditions in the tsh session player by using
a condition variable to detect state changes rather than unsafely
polling a variable that is written by a separate goroutine.

In addition, fix an off by one error when resuming playback
after pausing. The player's position variable has always stored
the index of the last succesfully played event, so when we resume
playback we should start at position+1 to not re-play the previous
event twice.

Fixes #11479
@zmb3 zmb3 force-pushed the zmb3/tsh-play-race branch from 7bffe29 to 79161fd Compare March 29, 2022 16:15
@zmb3 zmb3 enabled auto-merge (squash) March 29, 2022 21:28
@zmb3 zmb3 merged commit 8901b1c into master Mar 29, 2022
@zmb3 zmb3 deleted the zmb3/tsh-play-race branch March 29, 2022 22:25
zmb3 added a commit that referenced this pull request Mar 29, 2022
This commit fixes race conditions in the tsh session player by using
a condition variable to detect state changes rather than unsafely
polling a variable that is written by a separate goroutine.

In addition, fix an off by one error when resuming playback
after pausing. The player's position variable has always stored
the index of the last succesfully played event, so when we resume
playback we should start at position+1 to not re-play the previous
event twice.

Fixes #11479
zmb3 added a commit that referenced this pull request Mar 29, 2022
This commit fixes race conditions in the tsh session player by using
a condition variable to detect state changes rather than unsafely
polling a variable that is written by a separate goroutine.

In addition, fix an off by one error when resuming playback
after pausing. The player's position variable has always stored
the index of the last succesfully played event, so when we resume
playback we should start at position+1 to not re-play the previous
event twice.

Fixes #11479
zmb3 added a commit that referenced this pull request Mar 29, 2022
This commit fixes race conditions in the tsh session player by using
a condition variable to detect state changes rather than unsafely
polling a variable that is written by a separate goroutine.

In addition, fix an off by one error when resuming playback
after pausing. The player's position variable has always stored
the index of the last succesfully played event, so when we resume
playback we should start at position+1 to not re-play the previous
event twice.

Fixes #11479
zmb3 added a commit that referenced this pull request Mar 31, 2022
This commit fixes race conditions in the tsh session player by using
a condition variable to detect state changes rather than unsafely
polling a variable that is written by a separate goroutine.

In addition, fix an off by one error when resuming playback
after pausing. The player's position variable has always stored
the index of the last succesfully played event, so when we resume
playback we should start at position+1 to not re-play the previous
event twice.

Fixes #11479
zmb3 added a commit that referenced this pull request Mar 31, 2022
This commit fixes race conditions in the tsh session player by using
a condition variable to detect state changes rather than unsafely
polling a variable that is written by a separate goroutine.

In addition, fix an off by one error when resuming playback
after pausing. The player's position variable has always stored
the index of the last succesfully played event, so when we resume
playback we should start at position+1 to not re-play the previous
event twice.

Fixes #11479
zmb3 added a commit that referenced this pull request Apr 1, 2022
This commit fixes race conditions in the tsh session player by using
a condition variable to detect state changes rather than unsafely
polling a variable that is written by a separate goroutine.

In addition, fix an off by one error when resuming playback
after pausing. The player's position variable has always stored
the index of the last succesfully played event, so when we resume
playback we should start at position+1 to not re-play the previous
event twice.

Fixes #11479
zmb3 added a commit that referenced this pull request Apr 1, 2022
This commit fixes race conditions in the tsh session player by using
a condition variable to detect state changes rather than unsafely
polling a variable that is written by a separate goroutine.

In addition, fix an off by one error when resuming playback
after pausing. The player's position variable has always stored
the index of the last succesfully played event, so when we resume
playback we should start at position+1 to not re-play the previous
event twice.

Fixes #11479
zmb3 added a commit that referenced this pull request Apr 1, 2022
This commit fixes race conditions in the tsh session player by using
a condition variable to detect state changes rather than unsafely
polling a variable that is written by a separate goroutine.

In addition, fix an off by one error when resuming playback
after pausing. The player's position variable has always stored
the index of the last succesfully played event, so when we resume
playback we should start at position+1 to not re-play the previous
event twice.

Fixes #11479
zmb3 added a commit that referenced this pull request Apr 1, 2022
This commit fixes race conditions in the tsh session player by using
a condition variable to detect state changes rather than unsafely
polling a variable that is written by a separate goroutine.

In addition, fix an off by one error when resuming playback
after pausing. The player's position variable has always stored
the index of the last succesfully played event, so when we resume
playback we should start at position+1 to not re-play the previous
event twice.

Fixes #11479
zmb3 added a commit that referenced this pull request Apr 1, 2022
This commit fixes race conditions in the tsh session player by using
a condition variable to detect state changes rather than unsafely
polling a variable that is written by a separate goroutine.

In addition, fix an off by one error when resuming playback
after pausing. The player's position variable has always stored
the index of the last succesfully played event, so when we resume
playback we should start at position+1 to not re-play the previous
event twice.

Fixes #11479
zmb3 added a commit that referenced this pull request Apr 1, 2022
This commit fixes race conditions in the tsh session player by using
a condition variable to detect state changes rather than unsafely
polling a variable that is written by a separate goroutine.

In addition, fix an off by one error when resuming playback
after pausing. The player's position variable has always stored
the index of the last succesfully played event, so when we resume
playback we should start at position+1 to not re-play the previous
event twice.

Fixes #11479
@webvictim webvictim mentioned this pull request Apr 19, 2022
@webvictim webvictim mentioned this pull request Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-required tsh tsh - Teleport's command line tool for logging into nodes running Teleport.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Race condition in tsh play
3 participants