mirror of
https://github.com/apache/impala.git
synced 2025-12-19 18:12:08 -05:00
All functions in the SpanManager class operate under the assumption that child_span_mu_ in the SpanManager class will be locked before the ClientRequestState lock. However, the ImpalaServer::ExecuteInternal function takes the ClientRequestState lock before calling SpanManager::EndChildSpanPlanning. If another function in the SpanManager class has already taken the child_span_mu_ lock and is waiting for the ClientRequestState lock, a deadlock occurs. This issue was found by running end-to-end tests with OpenTelemetry tracing enabled and a release buildof Impala. Testing accomplished by re-running the end-to-end tests with OpenTelemetry tracing enabled and verifying that the deadlock no longer occurs. Change-Id: I7b43dba794cfe61d283bdd476e4056b9304d8947 Reviewed-on: http://gerrit.cloudera.org:8080/23422 Reviewed-by: Joe McDonnell <joemcdonnell@cloudera.com> Reviewed-by: Michael Smith <michael.smith@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>