We found in an exhausitive build that test_error_query_state failed after the specified timeout, which is 300 seconds as set up in IMPALA-9833 at https://github.com/apache/impala/blame/master/tests/query_test/test_observability.py#L805.
According to the attached console output, the test started to execute at 17:58:34 and failed at 18:03:34 (after 300 seconds have passed).
In the corresponding log of impalad, we have the following entry, we found the following entry corresponding to the executed query.
Using the query id (a849da33d0fd09b9:eb891b0e00000000), I excerpted the log entries between the time this query was registered and this query was deleted and then attached those log entries.
Tim Armstrong and Quanlong Huang reviewed the patch recently. Probably you could provide some insight into it. Assigned the JIRA to Quanlong for now but feel free to re-assign it as you see appropriate. Also let me know if you need other log files to debug the issue.