Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-3906

LLVM fails to resolve symbols in release builds of Impalad

    XMLWordPrintableJSON

Details

    Description

      With lazy materialization of the LLVM module's bitcode, it's assumed that functions referenced by global variables can be resolved to native code in the Impalad binary so they are safe to be removed if they are not directly or indirectly referenced by IR functions used in the query. However, it appears that gcc may actually optimize some of the functions away (e.g. via inlining) so LLVM may fail to resolve certain unmaterialized IR functions as externally defined functions in Impalad when compiling the module.

      This failure only manifests in release builds:
      http://sandbox.jenkins.cloudera.com/job/impala-cdh5-trunk-exhaustive-release/120
      http://sandbox.jenkins.cloudera.com/job/impala-cdh5-trunk-exhaustive-release/121

      CORE: ./core.1469121921.3631.impalad
      BINARY: ./be/build/latest/service/impalad
      Core was generated by `/data/jenkins/workspace/impala-umbrella-build-and-test/repos/Impala/be/build/la'.
      Program terminated with signal 6, Aborted.
      #0  0x0000003c30c328e5 in raise () from /lib64/libc.so.6
      To enable execution of this file add
              add-auto-load-safe-path /data/jenkins/workspace/impala-umbrella-build-and-test/Impala-Toolchain/gcc-4.9.2/lib64/libstdc++.so.6.0.20-gdb.py
      line to your configuration file "/var/lib/jenkins/.gdbinit".
      To completely disable this security protection add
              set auto-load safe-path /
      line to your configuration file "/var/lib/jenkins/.gdbinit".
      For more information about this security protection see the
      "Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
              info "(gdb)Auto-loading safe path"
      #0  0x0000003c30c328e5 in raise () from /lib64/libc.so.6
      #1  0x0000003c30c340c5 in abort () from /lib64/libc.so.6
      #2  0x0000000001b92e74 in google::DumpStackTraceAndExit() ()
      #3  0x0000000001b8c30d in google::LogMessage::Fail() ()
      #4  0x0000000001b8ec36 in google::LogMessage::SendToLog() ()
      #5  0x0000000001b8be2d in google::LogMessage::Flush() ()
      #6  0x0000000001b8f6de in google::LogMessageFatal::~LogMessageFatal() ()
      #7  0x0000000000c13118 in impala::LlvmCodegenHandleError (user_data=) at /data/jenkins/workspace/impala-umbrella-build-and-test/repos/Impala/be/src/codegen/llvm-codegen.cc:101
      #8  0x0000000001ad5f43 in llvm::report_fatal_error(llvm::Twine const&, bool) ()
      #9  0x000000000186f6bf in llvm::RuntimeDyldImpl::resolveExternalSymbols() ()
      #10 0x000000000186f6e4 in llvm::RuntimeDyldImpl::resolveRelocations() ()
      #11 0x0000000001720c3f in llvm::MCJIT::finalizeLoadedModules() ()
      #12 0x0000000001720fc1 in llvm::MCJIT::finalizeObject() ()
      #13 0x0000000000c1aa30 in impala::LlvmCodeGen::FinalizeModule (this=0xe909a80) at /data/jenkins/workspace/impala-umbrella-build-and-test/repos/Impala/be/src/codegen/llvm-codegen.cc:825
      #14 0x0000000000abd1ae in Java_com_cloudera_impala_service_FeSupport_NativeEvalConstExprs (env=0x89591e8, caller_class=) at /data/jenkins/workspace/impala-umbrella-build-and-test/repos/Impala/be/src/service/fe-support.cc:111
      
      F0721 04:27:25.126313  4604 llvm-codegen.cc:101] LLVM hit fatal error: Program used external function '_ZN5boost9date_time10date_facetINS_9gregorian4dateEcSt19ostreambuf_iteratorIcSt11char_traitsIcEEED0Ev' which could not be resolved!
      

      Attachments

        Activity

          People

            kwho Michael Ho
            kwho Michael Ho
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: