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

ChildQuery::Cancel() appears to violate lock ordering

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

            • Assignee:
              tarmstrong Tim Armstrong
              Reporter:
              tarmstrong Tim Armstrong

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment