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

A deadlock while using K8s HA service

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • None
    • None
    • None

    Description

      The `KubernetesStateHandleStore` using the same threadPoolExecutor with the Dispatcher to check `checkAndUpdateConfigMap`, which will lead to a deadlock.

      example:

       private CompletableFuture<Void> removeJob(JobID jobId, CleanupJobState cleanupJobState)
      
      { final DispatcherJob job = checkNotNull(runningJobs.remove(jobId)); final CompletableFuture<Void> jobTerminationFuture = job.closeAsync(); return jobTerminationFuture.thenRunAsync( () -> cleanUpJobData(jobId, cleanupJobState.cleanupHAData), ioExecutor); }
      

      will finally call

       public CompletableFuture<Boolean> checkAndUpdateConfigMap(
       String configMapName,
       Function<KubernetesConfigMap, Optional<KubernetesConfigMap>> function) {
       ...
       CompletableFuture.supplyAsync(..., kubeClientExecutorService)
       ...
       }
      

      And the ioExecutor and kubeClientExecutorService  is the same executor.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              yittg Yi Tang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: