Skip to content
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

Address a data race on numMessages in DirectStreamObserver.java #31763

Closed
wants to merge 1 commit into from

Conversation

t2h6
Copy link

@t2h6 t2h6 commented Jul 3, 2024

Fixes a data race found in DirectStreamObserver.java (between onNext() and <init>):

WARNING: ThreadSanitizer: data race (pid=9059)
  Read of size 4 at 0x00009409f010 by thread T3381 (mutexes: write M0):
    #0 org.apache.beam.sdk.fn.stream.DirectStreamObserver.onNext(Ljava/lang/Object;)V DirectStreamObserver.java:72 
    #1 org.apache.beam.fn.harness.control.BeamFnControlClient.sendInstructionResponse(Lorg/apache/beam/model/fnexecution/v1/BeamFnApi$InstructionResponse;)V BeamFnControlClient.java:175 
    #2 org.apache.beam.fn.harness.control.BeamFnControlClient$InboundObserver.lambda$onNext$0(Lorg/apache/beam/model/fnexecution/v1/BeamFnApi$InstructionRequest;)V BeamFnControlClient.java:116 
    #3 org.apache.beam.fn.harness.control.BeamFnControlClient$InboundObserver$$Lambda$562.run()V ?? 
    #4 java.util.concurrent.Executors$RunnableAdapter.call()Ljava/lang/Object; Executors.java:515 
    #5 java.util.concurrent.FutureTask.run()V FutureTask.java:264 
    #6 org.apache.beam.sdk.util.UnboundedScheduledExecutorService$ScheduledFutureTask.run()V UnboundedScheduledExecutorService.java:163 
    #7 java.util.concurrent.ThreadPoolExecutor.runWorker(Ljava/util/concurrent/ThreadPoolExecutor$Worker;)V ThreadPoolExecutor.java:1130 
    #8 java.util.concurrent.ThreadPoolExecutor$Worker.run()V ThreadPoolExecutor.java:630 
    #9 java.lang.Thread.run()V Thread.java:830 
    #10 (Generated Stub) <null> 

  Previous write of size 4 at 0x00009409f010 by thread T3293:
    #0 org.apache.beam.sdk.fn.stream.DirectStreamObserver.<init>(Ljava/util/concurrent/Phaser;Lio/grpc/stub/CallStreamObserver;I)V DirectStreamObserver.java:56 
    #1 org.apache.beam.sdk.fn.stream.DirectStreamObserver.<init>(Ljava/util/concurrent/Phaser;Lio/grpc/stub/CallStreamObserver;)V DirectStreamObserver.java:59 
    #2 org.apache.beam.sdk.fn.stream.OutboundObserverFactory$DirectClient.outboundObserverFor(Lorg/apache/beam/sdk/fn/stream/OutboundObserverFactory$BasicFactory;Lio/grpc/stub/StreamObserver;)Lio/grpc/stub/StreamObserver; OutboundObserverFactory.java:98 
    #3 org.apache.beam.fn.harness.control.BeamFnControlClient.<init>(Lorg/apache/beam/model/fnexecution/v1/BeamFnControlGrpc$BeamFnControlStub;Lorg/apache/beam/sdk/fn/stream/OutboundObserverFactory;Ljava/util/concurrent/Executor;Ljava/util/EnumMap;)V BeamFnControlClient.java:87 
    #4 org.apache.beam.fn.harness.FnHarness.main(Ljava/lang/String;Lorg/apache/beam/sdk/options/PipelineOptions;Ljava/util/Set;Lorg/apache/beam/model/pipeline/v1/Endpoints$ApiServiceDescriptor;Lorg/apache/beam/model/pipeline/v1/Endpoints$ApiServiceDescriptor;Lor FnHarness.java:409 

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

@github-actions github-actions bot added the java label Jul 3, 2024
@t2h6 t2h6 marked this pull request as ready for review July 3, 2024 17:00
@kennknowles
Copy link
Member

I'm not wholly convinced this result is legitimate. It seems to be saying that the objects construction is in a data race with a callback on that object.

Copy link
Contributor

github-actions bot commented Jul 3, 2024

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

Copy link
Contributor

github-actions bot commented Sep 2, 2024

This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the [email protected] list. Thank you for your contributions.

@github-actions github-actions bot added the stale label Sep 2, 2024
Copy link
Contributor

github-actions bot commented Sep 9, 2024

This pull request has been closed due to lack of activity. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.

@github-actions github-actions bot closed this Sep 9, 2024
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