CertSafari
    Databricks Certified Data Engineer Professional· Lessons

    Domain 8 · Lesson 40/46

    Spark UI, Thread Dumps, and Cluster Logs for Troubleshooting

    Identify pertinent diagnostic information using Spark UI, cluster logs, system tables, and query profiles to troubleshoot errors.

    10 min read
    2% of exam
    4 sources
    Published 2 Oct 2026
    Docs as of 30 Sep 2026

    What you will be able to do

    • Use the Spark UI to go from a job to its stages, tasks and executors to find where a workload is failing or stalling
    • Take a thread dump of a hanging task or a stuck driver
    • Pick driver logs, executor logs or the compute event log for a given symptom, and say which access modes let you read each one
    • Use a termination error code from the compute event log to find the cause and fix of a failed cluster launch

    Key concept

    Drill-down from Spark UI to logs — Troubleshooting a Spark workload works like a funnel. You start at the job, move to the stage, then to the task and the executor it ran on. Then you leave the UI for the driver or executor logs, because they hold the stack traces and output that the UI does not show.

    1.Reading the Spark UI: from job to task

    To open the Spark UI, go to the Compute page, select your compute, and click the Spark UI tab. It shows what your application is doing while it runs. The top level is a list of jobs. Click a job to see its stages and a DAG visualization of the operations and how they depend on each other. Click a stage to see its individual tasks. The task page is the deepest the Spark UI goes. It shows how many tasks ran, which executors ran them, and shuffle information.

    The docs say plainly that "Grayed boxes represent skipped stages." Structured Streaming checkpoints its state, so streaming DAGs often show skipped stages, and that is normal. On the task page, check that the tasks are spread across several executors. If one executor does all the work while others sit idle, you have a parallelism problem, even if nothing fails.

    When a streaming job is running, a Streaming tab appears. It shows the input rate, the processing time and the last 1000 completed batches. Rule of thumb: "it is good if you can process each batch within 80% of your batch processing time." If processing time comes close to or goes over the batch interval, batches queue up into a backlog that can eventually take the stream down. If the Streaming tab is missing altogether, the stream probably never started. In that case, look in the driver logs (covered below).

    For slow or costly workloads, Databricks has a separate Spark UI guide with a fixed order of steps. It starts with the Jobs Timeline and works down to the cause of a slow stage.

    Checkpoint 1 of 6· Put it in order

    Put the Spark UI cost-and-performance diagnosis steps in the order the guide gives them

    1. 1.Look for skew or spill
    2. 2.Use the Jobs Timeline to identify major issues
    3. 3.Determine if longest stage is I/O bound
    4. 4.Look at longest stage
    5. 5.Look for other causes of slow stage runtime

    Checkpoint 2 of 6· Exam question

    A data engineer runs a Spark SQL query on a SQL warehouse that joins a 900 GB fact table to a 50 GB dimension table on `region_id`. The query profile shows an Exchange operator consuming 70% of wall-clock time, with 220 GB of `spill (disk)` reported and one task running far longer than the others on that shuffle stage. Which diagnosis best matches this query profile evidence?

    Sources12

    2.Thread dumps for hanging tasks and stuck drivers

    Sometimes nothing fails and nothing finishes. For that case the Spark UI gives you thread dumps: a snapshot of the states of a JVM's threads. The docs say "Thread dumps are useful in debugging a specific hanging or slow-running task."

    Getting a task's thread dump takes several steps, because you have to link a task to the executor it runs on. Open the Jobs tab, then the job, then the stage. In the stage's Tasks list, note the Task ID and Executor ID. Then go to the Executors tab, find that executor's row, and click the link in the Thread Dump column. In the dump, pick the thread whose name contains TID followed by your Task ID.

    The driver can hang too. Typical signs are no Spark progress bars at all, or progress bars stuck at 100%. For that, you don't need a task: on the Executors tab, find the driver row and click its Thread Dump link.

    Checkpoint 3 of 6· Check yourself

    A notebook query's progress bar has sat at 100% for 20 minutes and nothing else happens. Where is the most direct place to look in the Spark UI?

    Sources1

    3.Driver logs vs executor logs, and who can read them

    The Spark UI shows you where something went wrong. The logs show you why. Driver logs hold exception stack traces. For example, if a streaming job never starts, "You can drill into the Driver logs to look at the stack trace of the exception." They also capture output from your code: "Any print statements as part of the DAG shows up in the logs too."

    Executor logs are what you need when particular tasks misbehave. From the task details page, find which executor ran the task. Then on the compute UI page, click the number of nodes, then the master. From there, "You can choose the worker where the suspicious task was run and then get to the log4j output."

    Who can read driver and executor logs, by compute access mode
    LogStandard access modeDedicated access mode
    Driver logsWorkspace admins onlyThe dedicated user or group, and workspace admins
    Executor logsNot availableThe dedicated user or group, and workspace admins

    Checkpoint 4 of 6· Check yourself

    A workspace admin needs executor logs to investigate a failing task on Standard access mode compute. What happens?

    Checkpoint 5 of 6· Exam question

    A Structured Streaming job's micro-batches have started taking roughly eight times longer than usual. In the Spark UI, the engineer opens the Stages tab for the slow batch and finds a stage with a long tail: 199 of 200 tasks finish in under 10 seconds, but one task runs for over 20 minutes and shows a much larger `Shuffle Read Size` than the others. Which of the following are appropriate next steps to confirm and address this using the Spark UI? (Select all that apply)(Select 3)

    Sources1

    4.Compute event logs and termination error codes

    Some failures happen before Spark even starts. The compute won't launch, or it terminates by itself. The Spark UI has nothing to show in that case. The compute event log is where you look instead. Databricks frames its troubleshooting guidance around this: "Use the error code from your cluster event log to find the relevant cause and recommended fix." For example, if a new workspace's first compute doesn't respond, the advice is: "After approximately 20-30 minutes, check your compute event log." There you may find a network-misconfiguration message. If the metastore is not working, look for METASTORE_DOWN events in your compute event logs.

    What matters for the exam is reading the error code to tell *your* configuration problems apart from transient provider problems:

    Reading termination errors from the compute event log
    What the event log reportsWhat it meansRecommended response
    Not enough free addresses in subnetThe subnet has too few free IP addressesUse a different or auto availability zone, expand the CIDR range, or clean up unused network resources
    Insufficient capacity for the instance type in the zoneAWS has no capacity for that instance type thereChange the zone or instance type, use on-demand instead of spot, or enable flexible node types
    INSTANCE_INITIALIZING ... threshold 700 seconds timed outVM bootstrap timed out (network, artifact downloads or provider)Check connectivity to artifact storage and the control plane, DNS, and firewall rules
    CLOUD_PROVIDER_LAUNCH_FAILUREThe cloud provider failed to launch the VMTry again later, since most of these are transient
    CLUSTER_OPERATION_TIMEOUT (SERVICE_FAULT)An internal operation missed its deadline (Databricks or provider side)Retry; if it keeps happening, contact support with the cluster ID and timestamp

    Checkpoint 6 of 6· Match them up

    Match each symptom to the diagnostic source you should open first

    Tap a term, then the definition that fits it.

    Sources34

    Exam traps

    Each one states something that sounds right. Open it to see what is actually true.

    1. 1.A grayed-out stage in the Spark UI DAG means the stage failed.Why is that wrong?

      Grayed boxes are skipped stages. Spark didn't need to recompute them because the data was already checkpointed or cached.

      Covered in Reading the Spark UI: from job to task

    2. 2.Workspace admins can always read executor logs, whatever the access mode.Why is that wrong?

      On Standard access mode, executor logs are not available at all. Admins can read driver logs there, but not executor logs.

      Covered in Driver logs vs executor logs, and who can read them

    3. 3.A CLUSTER_OPERATION_TIMEOUT termination means your workload or cluster configuration is wrong.Why is that wrong?

      This code points to a problem on the Databricks or cloud-provider side. It is usually transient and clears when you retry.

      Covered in Compute event logs and termination error codes

    Sources

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “it is good if you can process each batch within 80% of your batch processing time.”
      ↩︎ Reading the Spark UI: from job to task
      “Thread dumps are useful in debugging a specific hanging or slow-running task.”
      ↩︎ Thread dumps for hanging tasks and stuck drivers
      “If the task has finished running, you will not find a matching thread”
      ↩︎ Thread dumps for hanging tasks and stuck drivers
      “For compute with Standard access mode, only workspace admins can access driver logs.”
      ↩︎ Driver logs vs executor logs, and who can read them
      “You can choose the worker where the suspicious task was run and then get to the log4j output.”
      ↩︎ Driver logs vs executor logs, and who can read them
      “This is the most granular level of debugging you can get into from the Spark UI for a Spark application.”
      ↩︎ Key concept
      “Grayed boxes represent skipped stages.”
      ↩︎ Exam trap 1
      “Executor logs are not available for compute with Standard access mode.”
      ↩︎ Exam trap 2
      “If the data is checkpointed or cached, then Spark skips recomputing those stages.”
      ↩︎ Prediction
      “In the Executors table, in the driver row, click the link in the Thread Dump column.”
      ↩︎ Checkpoint
      “Executor logs are not available for compute with Standard access mode.”
      ↩︎ Checkpoint
    2. 2.
      “Use the Jobs Timeline to identify major issues”
      ↩︎ Checkpoint
    3. 3.
      “Try again later, as most cloud provider launch failures are transient.”
      ↩︎ Compute event logs and termination error codes
      “This indicates a problem on the Databricks or cloud-provider side rather than a problem with your workload.”
      ↩︎ Exam trap 3
      “Use the error code from your cluster event log to find the relevant cause and recommended fix.”
      ↩︎ Checkpoint
    4. 4.
      “After approximately 20-30 minutes, check your compute event log.”
      ↩︎ Compute event logs and termination error codes

    Continue to page 2 of 2

    Query Profiles and System Tables for Diagnosing Databricks Workloads

    Spotted a mistake, or was something unclear? Tell us.