mirror of https://github.com/grpc/grpc.git
[XdsClient] fix ubsan failure (#38726)
This fixes a ubsan failure introduced in #38698. In xDS fallback, when a higher-priority server comes back online, we [remove the lower-priority channels from the authority state](pull/35264/merge686fc9dbeb/src/core/xds/xds_client/xds_client.cc (L535)
), but unreffing the channels triggers a call to `MaybeRemoveUnsubscribedCacheEntriesForTypeLocked()`, which [attempts to access the list of channels](686fc9dbeb/src/core/xds/xds_client/xds_client.cc (L1788)
) while we're in the process of modifying it. Example failure: https://btx.cloud.google.com/invocations/69469281-f334-4a1f-91b4-3eb8905b63f4/targets/%2F%2Ftest%2Fcpp%2Fend2end%2Fxds:xds_fallback_end2end_test@experiment%3Dno_server_listener;config=79d74d08dc8cd749c211bbf112a92eee46adbf3f6203bc27099b142ea4e7aac9/log Closes #38726 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/38726 from markdroth:xds_client_unsubscribe_resubscribe_race_fix207c37c31f
PiperOrigin-RevId: 726322804
parent
81e51de2e4
commit
822f9b1519
1 changed files with 7 additions and 0 deletions
Loading…
Reference in new issue