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 2019/04/04 17:10:02 UTC

[jira] [Commented] (IMPALA-7288) Codegen crash in FinalizeModule()

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

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

Commit a26392c6d11bd4b6367936c7a1188292027e2d2d in impala's branch refs/heads/2.x from Bikramjeet Vig
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=a26392c ]

IMPALA-7288: Fix Codegen Crash in FinalizeModule()

Currently codegen crashed during FinalizeModule() where it tries to
clean up half-baked handcrafted functions. This happens only for the
cases where the code generating the handcrafted IR calls
eraseFromParent() on failure which also deletes the memory held by the
function pointer and therefore causes a crash during clean up in
FinalizeModule().

Testing:
Added regression tests that verify that failure code paths in
the previously offending methods don't crash Impala.

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


> Codegen crash in FinalizeModule()
> ---------------------------------
>
>                 Key: IMPALA-7288
>                 URL: https://issues.apache.org/jira/browse/IMPALA-7288
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Backend
>    Affects Versions: Impala 2.12.0, Impala 3.1.0
>            Reporter: Balazs Jeszenszky
>            Assignee: Bikramjeet Vig
>            Priority: Blocker
>             Fix For: Impala 3.1.0
>
>
> The following sequence crashes Impala 2.12 reliably:
> {code}
> CREATE TABLE test (c1 CHAR(6),c2 CHAR(6));
> select 1 from test t1, test t2
> where t1.c1 = FROM_TIMESTAMP(cast(t2.c2 as string), 'yyyyMMdd');
> {code}
> hs_err_pid has:
> {code}
> #
> # A fatal error has been detected by the Java Runtime Environment:
> #
> #  SIGSEGV (0xb) at pc=0x0000000003b36ce4, pid=28459, tid=0x00007f2c49685700
> #
> # JRE version: Java(TM) SE Runtime Environment (8.0_162-b12) (build 1.8.0_162-b12)
> # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.162-b12 mixed mode linux-amd64 compressed oops)
> # Problematic frame:
> # C  [impalad+0x3736ce4]  llvm::Value::getContext() const+0x4
> {code}
> Backtrace is:
> {code}
> #0  0x00007f2cb217a5f7 in raise () from /lib64/libc.so.6
> #1  0x00007f2cb217bce8 in abort () from /lib64/libc.so.6
> #2  0x00007f2cb4de2f35 in os::abort(bool) () from /usr/java/latest/jre/lib/amd64/server/libjvm.so
> #3  0x00007f2cb4f86f33 in VMError::report_and_die() () from /usr/java/latest/jre/lib/amd64/server/libjvm.so
> #4  0x00007f2cb4de922f in JVM_handle_linux_signal () from /usr/java/latest/jre/lib/amd64/server/libjvm.so
> #5  0x00007f2cb4ddf253 in signalHandler(int, siginfo*, void*) () from /usr/java/latest/jre/lib/amd64/server/libjvm.so
> #6  <signal handler called>
> #7  0x0000000003b36ce4 in llvm::Value::getContext() const ()
> #8  0x0000000003b36cff in llvm::Value::getValueName() const ()
> #9  0x0000000003b36de9 in llvm::Value::getName() const ()
> #10 0x0000000001ba6bb2 in impala::LlvmCodeGen::FinalizeModule (this=0x9b53980)
>     at /usr/src/debug/impala-2.12.0-cdh5.15.0/be/src/codegen/llvm-codegen.cc:1076
> #11 0x00000000018f5c0f in impala::FragmentInstanceState::Open (this=0xac0b400)
>     at /usr/src/debug/impala-2.12.0-cdh5.15.0/be/src/runtime/fragment-instance-state.cc:255
> #12 0x00000000018f3699 in impala::FragmentInstanceState::Exec (this=0xac0b400)
>     at /usr/src/debug/impala-2.12.0-cdh5.15.0/be/src/runtime/fragment-instance-state.cc:80
> #13 0x00000000019028c3 in impala::QueryState::ExecFInstance (this=0x9c6ad00, fis=0xac0b400)
>     at /usr/src/debug/impala-2.12.0-cdh5.15.0/be/src/runtime/query-state.cc:410
> #14 0x000000000190113c in impala::QueryState::<lambda()>::operator()(void) const (__closure=0x7f2c49684be8)
>     at /usr/src/debug/impala-2.12.0-cdh5.15.0/be/src/runtime/query-state.cc:350
> #15 0x00000000019034dd in boost::detail::function::void_function_obj_invoker0<impala::QueryState::StartFInstances()::<lambda()>, void>::invoke(boost::detail::function::function_buffer &) (function_obj_ptr=...)
>     at /usr/src/debug/impala-2.12.0-cdh5.15.0/toolchain/boost-1.57.0-p3/include/boost/function/function_template.hpp:153
> {code}
> Crash is at https://github.com/cloudera/Impala/blob/cdh5-2.12.0_5.15.0/be/src/codegen/llvm-codegen.cc#L1070-L1079.
> The repro steps seem to be quite specific.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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