Skip to content

[metrics] fix tsan race#40517

Closed
markdroth wants to merge 1 commit intogrpc:masterfrom
markdroth:metrics_backend_service_label_tsan_fix
Closed

[metrics] fix tsan race#40517
markdroth wants to merge 1 commit intogrpc:masterfrom
markdroth:metrics_backend_service_label_tsan_fix

Conversation

@markdroth
Copy link
Member

Fixes a TSAN race accidentally introduced in #40486.

b/440289448

@markdroth markdroth requested a review from ctiller August 21, 2025 17:42
@markdroth markdroth added the release notes: no Indicates if PR should not be in release notes label Aug 21, 2025
Copy link
Member

@ctiller ctiller left a comment

Choose a reason for hiding this comment

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

I don't understand the race or the fix, but this seems like reasonable code.

@markdroth
Copy link
Member Author

Basically, the picker was directly accessing the RefCountedStringValue field in the LB policy itself instead of just taking its own ref to the RefCountedStringValue. The LB policy was resetting its field while the picker was still being used. I fixed the picker to take its own ref to the RefCountedStringValue so that it's not accessing the field in the LB policy anymore, so there's no more race.

asheshvidyut pushed a commit to asheshvidyut/grpc that referenced this pull request Aug 22, 2025
Fixes a TSAN race accidentally introduced in grpc#40486.

b/440289448

Closes grpc#40517

COPYBARA_INTEGRATE_REVIEW=grpc#40517 from markdroth:metrics_backend_service_label_tsan_fix 7b8291e
PiperOrigin-RevId: 797943490
paulosjca pushed a commit to paulosjca/grpc that referenced this pull request Aug 23, 2025
Fixes a TSAN race accidentally introduced in grpc#40486.

b/440289448

Closes grpc#40517

COPYBARA_INTEGRATE_REVIEW=grpc#40517 from markdroth:metrics_backend_service_label_tsan_fix 7b8291e
PiperOrigin-RevId: 797943490
anniefrchz pushed a commit to anniefrchz/grpc that referenced this pull request Sep 3, 2025
Fixes a TSAN race accidentally introduced in grpc#40486.

b/440289448

Closes grpc#40517

COPYBARA_INTEGRATE_REVIEW=grpc#40517 from markdroth:metrics_backend_service_label_tsan_fix 7b8291e
PiperOrigin-RevId: 797943490
asheshvidyut pushed a commit to asheshvidyut/grpc that referenced this pull request Sep 12, 2025
Fixes a TSAN race accidentally introduced in grpc#40486.

b/440289448

Closes grpc#40517

COPYBARA_INTEGRATE_REVIEW=grpc#40517 from markdroth:metrics_backend_service_label_tsan_fix 7b8291e
PiperOrigin-RevId: 797943490
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants