Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GCP auth filter] hold ref to service config (grpc#37831)
This fixes the following crash: https://btx.cloud.google.com/invocations/3a7065d4-db7f-4f01-a239-5376b7f5ee8b/targets/%2F%2Ftest%2Fcpp%2Fend2end%2Fxds:xds_gcp_authn_end2end_test@experiment%3Dwork_serializer_dispatch;config=1a7dc092b28796b045d00aec96c95b85c1d4dc656912e0021a1fc84b3ecb2ac9/log The problem is caused by a race whereby the channel swaps out the service config due to a resolver update while the old dynamic filter stack is still processing calls in another thread. The GCP auth filter was dereferencing the old service config but not holding a ref to it. I've fixed this by having it hold a ref. In the long run, I suspect that we may run into other cases like this, in which case we may want the dynamic filter stack itself to hold a ref to the service config, so that individual filters don't have to. Closes grpc#37831 COPYBARA_INTEGRATE_REVIEW=grpc#37831 from markdroth:gcp_auth_race_fix f2a0d1d PiperOrigin-RevId: 681221795
- Loading branch information