Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-6945

TaskCancelAsyncProducerConsumerITCase.testCancelAsyncProducerAndConsumer instable test case

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.3.1, 1.4.0
    • Fix Version/s: 1.4.0, 1.3.2
    • Component/s: Tests
    • Labels:

      Description

      The test case TaskCancelAsyncProducerConsumerITCase.testCancelAsyncProducerAndConsumer sometimes fails with a NullPointerException [1]. The reason is that contains a race condition between a check and the initialization logic of a Thread.

      [1] https://s3.amazonaws.com/archive.travis-ci.org/jobs/243036022/log.txt

        Issue Links

          Activity

          Hide
          till.rohrmann Till Rohrmann added a comment -

          1.4.0: 0c4f7988dc8c947eb7bda3afa8c58ace04d4d1d8
          1.3.2: a2768695923dc48ba02fa7714d82d833ca98a092

          Show
          till.rohrmann Till Rohrmann added a comment - 1.4.0: 0c4f7988dc8c947eb7bda3afa8c58ace04d4d1d8 1.3.2: a2768695923dc48ba02fa7714d82d833ca98a092
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/flink/pull/4139

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/flink/pull/4139
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user tillrohrmann commented on the issue:

          https://github.com/apache/flink/pull/4139

          Merging this PR since it is trivial.

          Show
          githubbot ASF GitHub Bot added a comment - Github user tillrohrmann commented on the issue: https://github.com/apache/flink/pull/4139 Merging this PR since it is trivial.
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user tillrohrmann opened a pull request:

          https://github.com/apache/flink/pull/4139

          FLINK-6945 Fix TaskCancelAsyncProducerConsumerITCase by removing race condition

          The TaskCacnelAsyncProducerConsumerITCase#testCancelAsyncProducerAndConsumer test case
          sometimes failed with a NPE because of a race condition. The problem was that some
          invokables set static fields which are checked in the main thread. Since we checked
          the wrong field, the one for the consumer, after making sure that the producer
          is running, this could lead to a race condition if the consumer wasn't running yet.

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/tillrohrmann/flink fixTaskCancelAsyncProducerConsumerITCase

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/flink/pull/4139.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #4139


          commit a1356b951326d7f40a05eb61034a46b941d18faa
          Author: Till Rohrmann <trohrmann@apache.org>
          Date: 2017-06-19T07:54:35Z

          FLINK-6945 Fix TaskCancelAsyncProducerConsumerITCase by removing race condition

          The TaskCacnelAsyncProducerConsumerITCase#testCancelAsyncProducerAndConsumer test case
          sometimes failed with a NPE because of a race condition. The problem was that some
          invokables set static fields which are checked in the main thread. Since we checked
          the wrong field, the one for the consumer, after making sure that the producer
          is running, this could lead to a race condition if the consumer wasn't running yet.


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user tillrohrmann opened a pull request: https://github.com/apache/flink/pull/4139 FLINK-6945 Fix TaskCancelAsyncProducerConsumerITCase by removing race condition The TaskCacnelAsyncProducerConsumerITCase#testCancelAsyncProducerAndConsumer test case sometimes failed with a NPE because of a race condition. The problem was that some invokables set static fields which are checked in the main thread. Since we checked the wrong field, the one for the consumer, after making sure that the producer is running, this could lead to a race condition if the consumer wasn't running yet. You can merge this pull request into a Git repository by running: $ git pull https://github.com/tillrohrmann/flink fixTaskCancelAsyncProducerConsumerITCase Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/4139.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #4139 commit a1356b951326d7f40a05eb61034a46b941d18faa Author: Till Rohrmann <trohrmann@apache.org> Date: 2017-06-19T07:54:35Z FLINK-6945 Fix TaskCancelAsyncProducerConsumerITCase by removing race condition The TaskCacnelAsyncProducerConsumerITCase#testCancelAsyncProducerAndConsumer test case sometimes failed with a NPE because of a race condition. The problem was that some invokables set static fields which are checked in the main thread. Since we checked the wrong field, the one for the consumer, after making sure that the producer is running, this could lead to a race condition if the consumer wasn't running yet.

            People

            • Assignee:
              till.rohrmann Till Rohrmann
              Reporter:
              till.rohrmann Till Rohrmann
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development