Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-22653

executorAddress registered in CoarseGrainedSchedulerBackend.executorDataMap is null

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.2.2, 2.3.0
    • Component/s: Scheduler
    • Labels:
      None

      Description

      In CoarseGrainedSchedulerBackend.RegisterExecutor the executor data address (executorRef.address) can be null.

      val data = new ExecutorData(executorRef, executorRef.address, hostname,
      cores, cores, logUrls)

      At this point the executorRef.address can be null, there is actually code above it that handles this case:

      // If the executor's rpc env is not listening for incoming connections, `hostPort`
      // will be null, and the client connection should be used to contact the executor.
      val executorAddress = if (executorRef.address != null)

      { executorRef.address }

      else

      { context.senderAddress }

      But it doesn't use executorAddress when it creates the ExecutorData.

      This causes removeExecutor to never remove it properly from addressToExecutorId.

      addressToExecutorId -= executorInfo.executorAddress

      This is also a memory leak and can also call onDisconnected to call disableExecutor when it shouldn't.

        Attachments

          Activity

            People

            • Assignee:
              tgraves Thomas Graves
              Reporter:
              tgraves Thomas Graves
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: