Hello Tidy Bot, Alexey Serbin, Kudu Jenkins, Grant Henke, Todd Lipcon,

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

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

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

Change subject: KUDU-2378: fix another aligned load crash
......................................................................

KUDU-2378: fix another aligned load crash

The TestKuduBackup.testRandomBackupAndRestore test from the kudu-backup
project would crash a TSAN master from time to time, with a stack trace
ending in Variant::Reset. After some debugging, this turned out to be a
holdover from KUDU-2378, where clang emitted a movaps (Aligned Load)
instruction on a value that wasn't aligned. The holdover was missed
because it was a static_cast (the original search covered
reinterpret_casts); I did a search for other bad casts but found none.

Why TSAN? Probably because it's the only build to use libc++, whose
std::string uses the Small String Optimization to embed the data into the
string itself, thus raising the possibility of the string's data being
unaligned. By comparison, libstdc++'s COW std::string uses a separate
allocation for string data, which is likely always 16-byte aligned.

The patch includes a unit test that would repro the crash 100% of the time
when built for TSAN.

Change-Id: I13e23a9d88db878071faeff7b9de06d1bdd98357
---
M src/kudu/common/types.h
M src/kudu/common/wire_protocol-test.cc
2 files changed, 10 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/11/11911/3
--
To view, visit http://gerrit.cloudera.org:8080/11911
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I13e23a9d88db878071faeff7b9de06d1bdd98357
Gerrit-Change-Number: 11911
Gerrit-PatchSet: 3
Gerrit-Owner: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Grant Henke <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Todd Lipcon <[email protected]>

Reply via email to