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

ChildQuery::Cancel() appears to violate lock ordering

    XMLWordPrintableJSON

Details

    Description

      The lock order is ImpalaServer::query_exec_state_map_lock_ -> QueryExecState::lock_, but there's a possible callstack that violates this.

      • ImpalaServer::CancelInternal() holding QueryExecState::lock_
      • calls QueryExecState::Cancel()
      • calls ChildQuery::Cancel()
      • calls ImpalaServer::CancelOperation()
      • calls ImpalaServer::GetQueryExecState(), which grabs ImpalaServer::query_exec_state_map_lock_

      This could lead to deadlock if another thread called GetQueryExecState() on the same ImpalaServer instance (i.e. HS2/beewax) for the same QueryExecState at the same time.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: