Repository: kudu
Updated Branches:
  refs/heads/master 68c185747 -> 4cd6338e6

KUDU-2336. diagnostics_log: fix an assertion failure for null stack frames

On my Ubuntu 16 box, in ASAN builds, it seems I sometimes get a stack
frame with a nullptr address. This caused SymbolSet::Add(...) to fail an
assertion since it uses google::dense_hash_set<> which requires that
there be one key reserved as a non-insertable "empty" marker. We were
using nullptr for that but not checking before potentially inserting it.

This adds a simple workaround. Without the patch, if I started a tserver
with --diagnostics-log-stack-traces-interval-ms=10, it would crash about
10% of the time with the following assertion failure:

  std::pair<iterator, bool> google::dense_hashtable<...>...:
  Assertion `!equals(std::forward<K>(key), key_info.empty_key) && "Inserting 
the empty key"' failed.

Change-Id: I73ada54bef056b665c03ca142a3995ae6ad59230
Tested-by: Todd Lipcon <>
Reviewed-by: Alexey Serbin <>


Branch: refs/heads/master
Commit: 4cd6338e60101b7c442ee7f8c28215ea3558cbf1
Parents: 68c1857
Author: Todd Lipcon <>
Authored: Mon Mar 12 15:41:57 2018 -0700
Committer: Todd Lipcon <>
Committed: Tue Mar 13 01:39:24 2018 +0000

 src/kudu/server/ | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/kudu/server/ 
index a185bd2..179b502 100644
--- a/src/kudu/server/
+++ b/src/kudu/server/
@@ -89,7 +89,10 @@ class DiagnosticsLog::SymbolSet {
   // Return true if the addr was added, false if it already existed.
   bool Add(void* addr) {
-    return InsertIfNotPresent(&set_, addr);
+    // We can't add nullptr since that's the 'empty' key. However this
+    // also will never have a real symbol, so we'll just pretend it's already
+    // present.
+    return addr && InsertIfNotPresent(&set_, addr);
   void ResetIfLogRolled(int roll_count) {

Reply via email to