mirror of
https://github.com/apache/impala.git
synced 2025-12-25 02:03:09 -05:00
It can be useful to get a stacktrace for a running impala-shell for debugging. This uses Python 3's faulthandler to handle the SIGUSR1, so it prints a stacktrace for all threads when it receives SIGUSR1. This does not implement an equivalent functionality for Python 2. Python 2 doesn't have the faulthandler library, and hand tests showed that sending SIGUSR1 to Python 2 impala-shell can interrupt network calls and abort a running query. Testing: - Added a test that verifies the stacktrace is printed and a running query succeeds. Change-Id: If7dae2686b65a1a4f02488abadca3b3c90e48bf1 Reviewed-on: http://gerrit.cloudera.org:8080/21611 Reviewed-by: Yida Wu <wydbaggio000@gmail.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Reviewed-by: Michael Smith <michael.smith@cloudera.com>