Mike Percy has submitted this change and it was merged.

Change subject: KUDU-1785. Fix potential crash in TabletCopySourceSession
......................................................................


KUDU-1785. Fix potential crash in TabletCopySourceSession

This patch fixes a crash in TabletCopySourceSession that can result from
dereferencing a null pointer. This may occur when a follower initiates a
TabletCopy session with a source server while the source server is
bootstrapping the given tablet.

Added a stress test in tablet_copy_client_session-itest to trigger the
issue.

I looped the new test 300x each on RELEASE and TSAN modes with 8 stress
threads and got no failures:

- http://dist-test.cloudera.org/job?job_id=mpercy.1481118736.17656
- http://dist-test.cloudera.org/job?job_id=mpercy.1481118870.18180

I disabled the "fix" and ran the test again 300 times without stress
threads. I got a 100% failure rate on TSAN and a >90% failure rate in
RELEASE mode, making this a pretty reliable test for the race we are
trying to trigger:

- http://dist-test.cloudera.org/job?job_id=mpercy.1481119582.18826
- http://dist-test.cloudera.org/job?job_id=mpercy.1481119710.19325

Change-Id: I6f3ec35885dbf1a81c23ac10b1c9556dfddbd4b7
Reviewed-on: http://gerrit.cloudera.org:8080/5363
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <a...@cloudera.com>
---
M src/kudu/integration-tests/CMakeLists.txt
M src/kudu/integration-tests/cluster_itest_util.cc
M src/kudu/integration-tests/cluster_itest_util.h
A src/kudu/integration-tests/tablet_copy_client_session-itest.cc
M src/kudu/tserver/tablet_copy_service.cc
M src/kudu/tserver/tablet_copy_source_session.cc
6 files changed, 214 insertions(+), 21 deletions(-)

Approvals:
  Adar Dembo: Looks good to me, approved
  Kudu Jenkins: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6f3ec35885dbf1a81c23ac10b1c9556dfddbd4b7
Gerrit-PatchSet: 7
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Mike Percy <mpe...@apache.org>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Dinesh Bhat <din...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mpe...@apache.org>
Gerrit-Reviewer: Tidy Bot

Reply via email to