You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2021/03/16 02:15:00 UTC

[jira] [Commented] (IMPALA-10367) Impala-shell internal error - UnboundLocalError, local variable 'retry_msg' referenced before assign

    [ https://issues.apache.org/jira/browse/IMPALA-10367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17302160#comment-17302160 ] 

ASF subversion and git services commented on IMPALA-10367:
----------------------------------------------------------

Commit 573c60a29849643b03fcd3a24ff88bdccc13fdac in impala's branch refs/heads/master from Abhishek Rawat
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=573c60a ]

IMPALA-10367: Impala-shell internal error -
UnboundLocalError, local variable 'retry_msg' referenced before assign

ImpalaHS2Client._open_session() has a 'retry_msg' variable which was
not initialized in the code-path where retry was disabled. If an
exception was hit with retry disabled, a compile time error was
generated.

The fix is to initialize 'retry_msg' in the non retry code-path.

Testing:
- Forced exception in ImpalaHS2Client._open_session() and verified that
proper error message was generated.
- Ran impala-shell e2e and custom cluster tests.

Change-Id: I50a08a62a332de759022d0a4862e74f5a81945d9
Reviewed-on: http://gerrit.cloudera.org:8080/17172
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>


> Impala-shell internal error - UnboundLocalError, local variable 'retry_msg' referenced before assign
> ----------------------------------------------------------------------------------------------------
>
>                 Key: IMPALA-10367
>                 URL: https://issues.apache.org/jira/browse/IMPALA-10367
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Clients
>    Affects Versions: Impala 4.0
>            Reporter: Tim Armstrong
>            Assignee: Abhishek Rawat
>            Priority: Critical
>              Labels: regression
>
> I saw this error when cancelling a query from impala-shell.
> {noformat}
> [localhost.EXAMPLE.COM:21050] tpch_parquet> explain select STRAIGHT_JOIN count(distinct l_partkey)
> from lineitem join [BROADCAST] supplier on l_suppkey = s_suppkey;
> Query: explain select STRAIGHT_JOIN count(distinct l_partkey)
> from lineitem join [BROADCAST] supplier on l_suppkey = s_suppkey
> Caught exception [Errno 4] Interrupted system call, type=<class 'socket.error'> in ExecuteStatement.
>  Cancelling Query
> Caught exception [Errno 4] Interrupted system call, type=<class 'socket.error'> in CloseSession.
> Warning: close session RPC failed: [Errno 4] Interrupted system call, <class 'socket.error'>
> Opened TCP connection to localhost.EXAMPLE.COM:21050
> Caught exception [Errno 4] Interrupted system call, type=<class 'socket.error'> in ExecuteStatement.
> Caught exception [Errno 4] Interrupted system call, type=<class 'socket.error'> in CloseSession.
> Warning: close session RPC failed: [Errno 4] Interrupted system call, <class 'socket.error'>
> Error connecting: UnboundLocalError, local variable 'retry_msg' referenced before assign
> {noformat}
> This code was introduced by IMPALA-9466. I looked at the code briefly and AFAICT it happens when the retry logic is disabled but we hit a TTransportException or similar error.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org