You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2018/01/05 16:56:38 UTC

impala git commit: IMPALA-6296: Avoid crash caused by DCHECK in Codegen in debug mode

Repository: impala
Updated Branches:
  refs/heads/master b4a73a68f -> eea8ade36


IMPALA-6296: Avoid crash caused by DCHECK in Codegen in debug mode

Currently, when debug mode is enabled, any query using codegen can result
in an Impala daemon crash as it hits a DCHECK.

This patch ensures the DCHECK is hit only when specific condition is met to
avoid the crash. That condition here is to DCHECK only when 'emit_perf_map_'
evaluates to True ensuring 'perf_map_lock_' is not empty when asserted.

Change-Id: I93e2b1efb325100d01d398e68e789d87b877167e
Reviewed-on: http://gerrit.cloudera.org:8080/8923
Reviewed-by: Tim Armstrong <ta...@cloudera.com>
Reviewed-by: Thomas Tauber-Marshall <tm...@cloudera.com>
Tested-by: Impala Public Jenkins


Project: http://git-wip-us.apache.org/repos/asf/impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/impala/commit/eea8ade3
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/eea8ade3
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/eea8ade3

Branch: refs/heads/master
Commit: eea8ade36de084aac01ca81c71a3ce00254cd396
Parents: b4a73a6
Author: manaswinimaharana <ma...@gmail.com>
Authored: Fri Dec 29 10:40:31 2017 -0500
Committer: Impala Public Jenkins <im...@gerrit.cloudera.org>
Committed: Fri Jan 5 02:18:05 2018 +0000

----------------------------------------------------------------------
 be/src/codegen/codegen-symbol-emitter.cc | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/impala/blob/eea8ade3/be/src/codegen/codegen-symbol-emitter.cc
----------------------------------------------------------------------
diff --git a/be/src/codegen/codegen-symbol-emitter.cc b/be/src/codegen/codegen-symbol-emitter.cc
index a81ec83..0706d69 100644
--- a/be/src/codegen/codegen-symbol-emitter.cc
+++ b/be/src/codegen/codegen-symbol-emitter.cc
@@ -86,10 +86,12 @@ void CodegenSymbolEmitter::NotifyObjectEmitted(const llvm::object::ObjectFile& o
 }
 
 void CodegenSymbolEmitter::NotifyFreeingObject(const llvm::object::ObjectFile& obj) {
-  lock_guard<SpinLock> perf_map_lock(perf_map_lock_);
-  DCHECK(perf_map_.find(obj.getData().data()) != perf_map_.end());
-  perf_map_.erase(obj.getData().data());
-  WritePerfMapLocked();
+  if (emit_perf_map_) {
+    lock_guard<SpinLock> perf_map_lock(perf_map_lock_);
+    DCHECK(perf_map_.find(obj.getData().data()) != perf_map_.end());
+    perf_map_.erase(obj.getData().data());
+    WritePerfMapLocked();
+  }
 }
 
 void CodegenSymbolEmitter::ProcessSymbol(llvm::DIContext* debug_ctx,