You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Todd Lipcon (Code Review)" <ge...@cloudera.org> on 2018/03/12 22:51:53 UTC

[kudu-CR] diagnostics log: fix an assertion failure for null stack frames

Hello Adar Dembo,

I'd like you to do a code review. Please visit

    http://gerrit.cloudera.org:8080/9591

to review the following change.


Change subject: diagnostics_log: fix an assertion failure for null stack frames
......................................................................

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:

Change-Id: I73ada54bef056b665c03ca142a3995ae6ad59230
kudu-master: ../../thirdparty/installed/common/include/sparsehash/internal/densehashtable.h:969: std::pair<iterator, bool> google::dense_hashtable<void *, void *, std::hash<void *>, google::dense_hash_set<void *, std::hash<void *>, std::equal_to<void *>, google::libc_allocator_with_realloc<void *> >::Identity, google::dense_hash_set<void *, std::hash<void *>, std::equal_to<void *>, google::libc_allocator_with_realloc<void *> >::SetKey, std::equal_to<void *>, google::libc_allocator_with_realloc<void *> >::insert_noresize(K &&, Args &&...) [Value = void *, Key = void *, HashFcn = std::hash<void *>, ExtractKey = google::dense_hash_set<void *, std::hash<void *>, std::equal_to<void *>, google::libc_allocator_with_realloc<void *> >::Identity, SetKey = google::dense_hash_set<void *, std::hash<void *>, std::equal_to<void *>, google::libc_allocator_with_realloc<void *> >::SetKey, EqualKey = std::equal_to<void *>, Alloc = google::libc_allocator_with_realloc<void *>, K = void *const &, Args = <void *const &>]: Assertion `!equals(std::forward<K>(key), key_info.empty_key) && "Inserting the empty key"' failed.
---
M src/kudu/server/diagnostics_log.cc
1 file changed, 4 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/91/9591/1
-- 
To view, visit http://gerrit.cloudera.org:8080/9591
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I73ada54bef056b665c03ca142a3995ae6ad59230
Gerrit-Change-Number: 9591
Gerrit-PatchSet: 1
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>

[kudu-CR] KUDU-2336. diagnostics log: fix an assertion failure for null stack frames

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/9591 )

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


Patch Set 2: Code-Review+2


-- 
To view, visit http://gerrit.cloudera.org:8080/9591
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I73ada54bef056b665c03ca142a3995ae6ad59230
Gerrit-Change-Number: 9591
Gerrit-PatchSet: 2
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Tue, 13 Mar 2018 01:39:10 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-2336. diagnostics log: fix an assertion failure for null stack frames

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has posted comments on this change. ( http://gerrit.cloudera.org:8080/9591 )

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


Patch Set 2: Verified+1

Precommit failed due to clock sync again


-- 
To view, visit http://gerrit.cloudera.org:8080/9591
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I73ada54bef056b665c03ca142a3995ae6ad59230
Gerrit-Change-Number: 9591
Gerrit-PatchSet: 2
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Tue, 13 Mar 2018 01:37:14 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-2336. diagnostics log: fix an assertion failure for null stack frames

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins, Adar Dembo, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/9591

to look at the new patch set (#2).

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

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:

kudu-master: ../../thirdparty/installed/common/include/sparsehash/internal/densehashtable.h:969:
  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
---
M src/kudu/server/diagnostics_log.cc
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/91/9591/2
-- 
To view, visit http://gerrit.cloudera.org:8080/9591
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I73ada54bef056b665c03ca142a3995ae6ad59230
Gerrit-Change-Number: 9591
Gerrit-PatchSet: 2
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] diagnostics log: fix an assertion failure for null stack frames

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/9591 )

Change subject: diagnostics_log: fix an assertion failure for null stack frames
......................................................................


Patch Set 1:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/9591/1//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/9591/1//COMMIT_MSG@7
PS1, Line 7: diagnostics_log: fix an assertion failure for null stack frames
You can tag KUDU-2336 here.


http://gerrit.cloudera.org:8080/#/c/9591/1//COMMIT_MSG@20
PS1, Line 20: kudu-master: ../../thirdparty/installed/common/include/sparsehash/internal/densehashtable.h:969: std::pair<iterator, bool> google::dense_hashtable<void *, void *, std::hash<void *>, google::dense_hash_set<void *, std::hash<void *>, std::equal_to<void *>, google::libc_allocator_with_realloc<void *> >::Identity, google::dense_hash_set<void *, std::hash<void *>, std::equal_to<void *>, google::libc_allocator_with_realloc<void *> >::SetKey, std::equal_to<void *>, google::libc_allocator_with_realloc<void *> >::insert_noresize(K &&, Args &&...) [Value = void *, Key = void *, HashFcn = std::hash<void *>, ExtractKey = google::dense_hash_set<void *, std::hash<void *>, std::equal_to<void *>, google::libc_allocator_with_realloc<void *> >::Identity, SetKey = google::dense_hash_set<void *, std::hash<void *>, std::equal_to<void *>, google::libc_allocator_with_realloc<void *> >::SetKey, EqualKey = std::equal_to<void *>, Alloc = google::libc_allocator_with_realloc<void *>, K = void *const &, Args = <void *const &>]: Assertion `!equals(std::forward<K>(key), key_info.empty_key) && "Inserting the empty key"' failed.
Nit: could you move this be to about Change-Id? And maybe reformat/elide some of the templating to make the error more clear?



-- 
To view, visit http://gerrit.cloudera.org:8080/9591
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I73ada54bef056b665c03ca142a3995ae6ad59230
Gerrit-Change-Number: 9591
Gerrit-PatchSet: 1
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Comment-Date: Mon, 12 Mar 2018 23:00:02 +0000
Gerrit-HasComments: Yes

[kudu-CR] diagnostics log: fix an assertion failure for null stack frames

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has posted comments on this change. ( http://gerrit.cloudera.org:8080/9591 )

Change subject: diagnostics_log: fix an assertion failure for null stack frames
......................................................................


Patch Set 1:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/9591/1//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/9591/1//COMMIT_MSG@7
PS1, Line 7: diagnostics_log: fix an assertion failure for null stack frames
> You can tag KUDU-2336 here.
ah I missed that this was filed. Done.


http://gerrit.cloudera.org:8080/#/c/9591/1//COMMIT_MSG@20
PS1, Line 20: kudu-master: ../../thirdparty/installed/common/include/sparsehash/internal/densehashtable.h:969: std::pair<iterator, bool> google::dense_hashtable<void *, void *, std::hash<void *>, google::dense_hash_set<void *, std::hash<void *>, std::equal_to<void *>, google::libc_allocator_with_realloc<void *> >::Identity, google::dense_hash_set<void *, std::hash<void *>, std::equal_to<void *>, google::libc_allocator_with_realloc<void *> >::SetKey, std::equal_to<void *>, google::libc_allocator_with_realloc<void *> >::insert_noresize(K &&, Args &&...) [Value = void *, Key = void *, HashFcn = std::hash<void *>, ExtractKey = google::dense_hash_set<void *, std::hash<void *>, std::equal_to<void *>, google::libc_allocator_with_realloc<void *> >::Identity, SetKey = google::dense_hash_set<void *, std::hash<void *>, std::equal_to<void *>, google::libc_allocator_with_realloc<void *> >::SetKey, EqualKey = std::equal_to<void *>, Alloc = google::libc_allocator_with_realloc<void *>, K = void *const &, Args = <void *const &>]: Assertion `!equals(std::forward<K>(key), key_info.empty_key) && "Inserting the empty key"' failed.
> Nit: could you move this be to about Change-Id? And maybe reformat/elide so
ah, git hook gone awry



-- 
To view, visit http://gerrit.cloudera.org:8080/9591
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I73ada54bef056b665c03ca142a3995ae6ad59230
Gerrit-Change-Number: 9591
Gerrit-PatchSet: 1
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Mon, 12 Mar 2018 23:22:33 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-2336. diagnostics log: fix an assertion failure for null stack frames

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has removed a vote on this change.

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


Removed Verified-1 by Kudu Jenkins (120)
-- 
To view, visit http://gerrit.cloudera.org:8080/9591
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: deleteVote
Gerrit-Change-Id: I73ada54bef056b665c03ca142a3995ae6ad59230
Gerrit-Change-Number: 9591
Gerrit-PatchSet: 2
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] KUDU-2336. diagnostics log: fix an assertion failure for null stack frames

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/9591 )

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

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:

kudu-master: ../../thirdparty/installed/common/include/sparsehash/internal/densehashtable.h:969:
  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
Reviewed-on: http://gerrit.cloudera.org:8080/9591
Tested-by: Todd Lipcon <to...@apache.org>
Reviewed-by: Alexey Serbin <as...@cloudera.com>
---
M src/kudu/server/diagnostics_log.cc
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Todd Lipcon: Verified
  Alexey Serbin: Looks good to me, approved

-- 
To view, visit http://gerrit.cloudera.org:8080/9591
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I73ada54bef056b665c03ca142a3995ae6ad59230
Gerrit-Change-Number: 9591
Gerrit-PatchSet: 3
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>