Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-4409

ImpalaServer::CancelInternal() can deadlock

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: Impala 2.7.0, Impala 2.8.0
    • Fix Version/s: Impala 2.8.0
    • Component/s: Distributed Exec
    • Labels:

      Description

      While looking through the code to understand another potential bug, I found out that CancelInternal() violates the lock ordering in ImpalaServer by acquiring SessionState::lock_ while holding QueryExecState::lock_. This could cause a hang if a number of threads were holding the right locks at the right time. I traced out the lock dependencies using a directed graph, which I've attached.

        Attachments

        1. impala-server-lock-order.dot
          1.0 kB
          Tim Armstrong
        2. impala-server-lock-order.pdf
          19 kB
          Tim Armstrong

          Activity

            People

            • Assignee:
              tarmstrong Tim Armstrong
              Reporter:
              tarmstrong Tim Armstrong
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: