forked from grpc/grpc-java
-
Notifications
You must be signed in to change notification settings - Fork 0
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
[WIP] CSDS getSubscribedResourcesMetadata concurrency fix #18
Draft
sergiitk
wants to merge
6
commits into
master
Choose a base branch
from
csds-sync-fix
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sergiitk
force-pushed
the
csds-sync-fix
branch
from
December 29, 2021 03:25
5091d14
to
97e4c79
Compare
sergiitk
force-pushed
the
csds-sync-fix
branch
from
December 29, 2021 03:26
97e4c79
to
163e103
Compare
sergiitk
pushed a commit
that referenced
this pull request
Feb 27, 2024
As discovered by TSAN, the adsStream field is not synchronized. ``` WARNING: ThreadSanitizer: data race (pid=1625) Read of size 4 at 0x00009b66fc88 by thread T23 (mutexes: write M0): #0 io.grpc.xds.ControlPlaneClient.isReady()Z ControlPlaneClient.java:203 #1 io.grpc.xds.ControlPlaneClient.readyHandler()V ControlPlaneClient.java:211 #2 io.grpc.xds.ControlPlaneClient$AdsStream.onReady()V ControlPlaneClient.java:328 #3 io.grpc.xds.GrpcXdsTransportFactory$EventHandlerToCallListenerAdapter.onReady()V GrpcXdsTransportFactory.java:145 #4 io.grpc.PartialForwardingClientCallListener.onReady()V PartialForwardingClientCallListener.java:44 #5 io.grpc.ForwardingClientCallListener.onReady()V ForwardingClientCallListener.java:23 #6 io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onReady()V ForwardingClientCallListener.java:40 #7 io.grpc.PartialForwardingClientCallListener.onReady()V PartialForwardingClientCallListener.java:44 #8 io.grpc.ForwardingClientCallListener.onReady()V ForwardingClientCallListener.java:23 #9 io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onReady()V ForwardingClientCallListener.java:40 #10 io.grpc.internal.DelayedClientCall$DelayedListener.onReady()V DelayedClientCall.java:497 #11 io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamOnReady.runInternal()V ClientCallImpl.java:781 #12 io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamOnReady.runInContext()V ClientCallImpl.java:772 #13 io.grpc.internal.ContextRunnable.run()V ContextRunnable.java:37 #14 io.grpc.internal.SerializingExecutor.run()V SerializingExecutor.java:133 #15 java.util.concurrent.ThreadPoolExecutor.runWorker(Ljava/util/concurrent/ThreadPoolExecutor$Worker;)V ThreadPoolExecutor.java:1130 #16 java.util.concurrent.ThreadPoolExecutor$Worker.run()V ThreadPoolExecutor.java:630 #17 java.lang.Thread.run()V Thread.java:830 #18 (Generated Stub) <null> Previous write of size 4 at 0x00009b66fc88 by thread T4 (mutexes: write M1, write M2, write M3, write M4, write M5): #0 io.grpc.xds.ControlPlaneClient$AdsStream.cleanUp()V ControlPlaneClient.java:424 #1 io.grpc.xds.ControlPlaneClient$AdsStream.close(Ljava/lang/Exception;)V ControlPlaneClient.java:418 #2 io.grpc.xds.ControlPlaneClient$1.run()V ControlPlaneClient.java:130 #3 io.grpc.SynchronizationContext.drain()V SynchronizationContext.java:94 #4 io.grpc.SynchronizationContext.execute(Ljava/lang/Runnable;)V SynchronizationContext.java:126 #5 io.grpc.xds.XdsClientImpl.shutdown()V XdsClientImpl.java:207 #6 io.grpc.xds.SharedXdsClientPoolProvider$RefCountedXdsClientObjectPool.returnObject(Ljava/lang/Object;)Lio/grpc/xds/XdsClient; SharedXdsClientPoolProvider.java:144 #7 io.grpc.xds.SharedXdsClientPoolProvider$RefCountedXdsClientObjectPool.returnObject(Ljava/lang/Object;)Ljava/lang/Object; SharedXdsClientPoolProvider.java:102 #8 io.grpc.xds.XdsClientFederationTest.cleanUp()V XdsClientFederationTest.java:86 ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.