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 "Quanlong Huang (Jira)" <ji...@apache.org> on 2023/04/24 00:36:00 UTC

[jira] [Resolved] (IMPALA-12079) NoneType object is not iterable due to uncaught exceptions

     [ https://issues.apache.org/jira/browse/IMPALA-12079?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Quanlong Huang resolved IMPALA-12079.
-------------------------------------
     Fix Version/s: Impala 4.3.0
    Target Version: Impala 4.1.3
        Resolution: Fixed

> NoneType object is not iterable due to uncaught exceptions
> ----------------------------------------------------------
>
>                 Key: IMPALA-12079
>                 URL: https://issues.apache.org/jira/browse/IMPALA-12079
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Clients
>            Reporter: Quanlong Huang
>            Assignee: Quanlong Huang
>            Priority: Critical
>             Fix For: Impala 4.3.0
>
>
> We saw impala-shell crashed with the following error:
> {code:python}
> Query: ALTER table xxx recover partitions
> Unknown Exception : 'NoneType' object is not iterable
> Traceback (most recent call last):
>   File "/cs/cloudera/opt/cloudera/parcels/CDH-7.1.7-1.cdh7.1.7.p1055.31529794/bin/../lib/impala-shell/impala_shell.py", line 1131, in _execute_stmt
>     query_str, self.set_query_options)
>   File "/cs/cloudera/opt/cloudera/parcels/CDH-7.1.7-1.cdh7.1.7.p1055.31529794/lib/impala-shell/lib/impala_client.py", line 1069, in execute_query
>     handle, rpc_status = self._do_beeswax_rpc(lambda: self.imp_service.query(query))
> TypeError: 'NoneType' object is not iterable {code}
> After adding some logs in "_do_beeswax_rpc()", we found it's due to an uncaught exception:
> {code:python}
> <class 'socket.error'> [Errno 104] Connection reset by peer{code}
> Here is a code sniper (after adding the debug log) of impala_client.py:
> {code:python}
>   def _do_beeswax_rpc(self, rpc, suppress_error_on_cancel=True):
>     ...
>     except Exception as e:
>       ...
>       print(type(e), str(e))  # Added this debug log
>       if suppress_error_on_cancel and self.is_query_cancelled:
>         raise QueryCancelledByShellException()
>       else:
>         if "BeeswaxException" in str(e):
>           raise RPCException("ERROR: %s" % e.message)
>         if "QueryNotFoundException" in str(e):
>           raise QueryStateException('Error: Stale query handle')
>       # The exception doesn't match any cases above so the method returns None{code}
> Unfortunately, I can't reproduce this in house and we didn't get chance to dig into where the exception come from. We should fix impala-shell anyway to expose the exception instead of returning None and crashing itself.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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