Skip to content

Commit d54c8c9

Browse files
xds: Fix concurrent StreamObserver usage in ExternalProcessorClientInterceptorTest (grpc#12915)
Synchronize calls to the gRPC StreamObserver (responseObserver) inside mock ExternalProcessor implementations. The mock servers in several tests spawn background threads to handle requests, but they invoke responseObserver.onNext(), onCompleted(), and onError() concurrently without synchronization. Since standard StreamObservers are not thread-safe, this leads to ThreadSanitizer-reported data races in gRPC internals (such as ServerCallImpl). This change wraps all asynchronous/background invocations of responseObserver methods inside synchronized blocks on the observer instance to ensure serialized execution. Flagged by TSAN in b/533413322
1 parent 3b3002c commit d54c8c9

1 file changed

Lines changed: 259 additions & 180 deletions

File tree

0 commit comments

Comments
 (0)