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

test: fix concurrent map access in TestStatsFetcher #14496

Merged
merged 1 commit into from
Sep 8, 2022

Conversation

tgross
Copy link
Member

@tgross tgross commented Sep 8, 2022

The map of in-flight RPCs gets cleared by a goroutine in the test without first locking it to make sure that it's not being accessed concurrently by the stats fetcher itself. This can cause a panic in tests.

I hit this panic while testing #14484. The line of code was last touched in #14441 (the autopilot migration) but that just changed the inputs, not the access pattern. We should probably fix this in backports too but I don't think I've ever seen the failure there so it may not be possible to hit without the new autopilot library.

The map of in-flight RPCs gets cleared by a goroutine in the test without first
locking it to make sure that it's not being accessed concurrently by the stats
fetcher itself. This can cause a panic in tests.
Copy link
Contributor

@DerekStrickland DerekStrickland left a comment

Choose a reason for hiding this comment

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

:shipit:

@tgross tgross merged commit 3dab024 into main Sep 8, 2022
@tgross tgross deleted the stats-fetcher-test-panic branch September 8, 2022 14:41
tgross added a commit that referenced this pull request Sep 8, 2022
The map of in-flight RPCs gets cleared by a goroutine in the test without first
locking it to make sure that it's not being accessed concurrently by the stats
fetcher itself. This can cause a panic in tests.

Backport of #14496
tgross added a commit that referenced this pull request Sep 8, 2022
The map of in-flight RPCs gets cleared by a goroutine in the test without first
locking it to make sure that it's not being accessed concurrently by the stats
fetcher itself. This can cause a panic in tests.

Backport of #14496
tgross added a commit that referenced this pull request Sep 8, 2022
The map of in-flight RPCs gets cleared by a goroutine in the test without first
locking it to make sure that it's not being accessed concurrently by the stats
fetcher itself. This can cause a panic in tests.

Backport of #14496
tgross added a commit that referenced this pull request Sep 8, 2022
The map of in-flight RPCs gets cleared by a goroutine in the test without first
locking it to make sure that it's not being accessed concurrently by the stats
fetcher itself. This can cause a panic in tests.

Backport of #14496
tgross added a commit that referenced this pull request Sep 8, 2022
The map of in-flight RPCs gets cleared by a goroutine in the test without first
locking it to make sure that it's not being accessed concurrently by the stats
fetcher itself. This can cause a panic in tests.

Backport of #14496
tgross added a commit that referenced this pull request Sep 8, 2022
The map of in-flight RPCs gets cleared by a goroutine in the test without first
locking it to make sure that it's not being accessed concurrently by the stats
fetcher itself. This can cause a panic in tests.

Backport of #14496
@github-actions
Copy link

github-actions bot commented Jan 7, 2023

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
theme/testing Test related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants