You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Bikramjeet Vig (JIRA)" <ji...@apache.org> on 2017/10/19 23:34:02 UTC

[jira] [Resolved] (IMPALA-6002) Impala should install an LLVM diagnostic handler

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

Bikramjeet Vig resolved IMPALA-6002.
------------------------------------
       Resolution: Fixed
    Fix Version/s: Impala 2.11.0

https://github.com/apache/incubator-impala/commit/048ce2af9c5c2a8431f4518fa34e11c0db8e0d8b

IMPALA-6002: Add a LLVM diagnostic handler for LLVM linker errors
Currently if llvm encounters an error it calls exit() and this kills
the impalad process. This patch adds a diagnostic handler that llvm
can use to pass the error up to impala instead of crashing it.

Testing:
Added a test which induces an error in llvm and makes sure that its
passed up to impala code and handled correctly.

Change-Id: I907ff1f8975c02d422b4a669afbfc2e536ddf1ff
Reviewed-on: http://gerrit.cloudera.org:8080/8233
Reviewed-by: Bikramjeet Vig <bi...@cloudera.com>
Tested-by: Impala Public Jenkins

> Impala should install an LLVM diagnostic handler
> ------------------------------------------------
>
>                 Key: IMPALA-6002
>                 URL: https://issues.apache.org/jira/browse/IMPALA-6002
>             Project: IMPALA
>          Issue Type: Sub-task
>          Components: Backend
>    Affects Versions: Impala 2.11.0
>            Reporter: Tim Armstrong
>            Assignee: Bikramjeet Vig
>            Priority: Critical
>             Fix For: Impala 2.11.0
>
>
> LLVM has an interface to install a diagnostic handler to handle errors. The default behaviour will exit the process immediately, which is not desirable if the problem is something like a malformed IR UDF.  See IMPALA-5999 for an example.
> http://llvm.org/doxygen/DiagnosticHandler_8h_source.html
> I can cause the Impala daemon to exit by inducing a linking error with an IR UDF:
> {noformat}
> $hdfs dfs -cp /test-warehouse/test-udfs.ll /test-warehouse/test-udfs2.ll
> [localhost:21000] > create function identity(boolean) returns boolean
> location '/test-warehouse/test-udfs.ll' symbol='Identity';
> Query: create function identity(boolean) returns boolean
> location '/test-warehouse/test-udfs.ll' symbol='Identity'
> Fetched 0 row(s) in 0.21s
> [localhost:21000] > create function identity(int) returns int
> location '/test-warehouse/test-udfs2.ll' symbol='Identity';
> Query: create function identity(int) returns int
> location '/test-warehouse/test-udfs2.ll' symbol='Identity'
> Fetched 0 row(s) in 0.04s
> [localhost:21000] > select identity(bool_col), identity(int_col) from functional.alltypestiny;
> Query: select identity(bool_col), identity(int_col) from functional.alltypestiny
> Query submitted at: 2017-09-29 15:36:27 (Coordinator: http://tarmstrong-box:25000)
> Error communicating with impalad: TSocket read 0 bytes
> {noformat}
> In the error log:
> {noformat}
> error: Linking globals named 'global_array_2': symbol multiply defined!
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)