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 2016/09/14 16:55:05 UTC

[kudu-CR] test main: avoid signals for timeout handling

Hello Adar Dembo, Alexey Serbin,

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

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

to review the following change.

Change subject: test_main: avoid signals for timeout handling
......................................................................

test_main: avoid signals for timeout handling

Previously we used setitimer() to trigger test timeouts after the
appropriate delay. However, this caused the timeout code to run in a
signal handler, which TSAN flagged as unsafe because it allocates
memory.

This changes it to just use its own thread which sleeps before aborting
the process after the prescribed timeout.

The resulting behavior should be the same, though will avoid a bunch of
confusing spew in TSAN builds that time out.

Change-Id: I0af2485c14db366a409ba1409fa01314396d030a
---
M src/kudu/util/test_main.cc
1 file changed, 17 insertions(+), 34 deletions(-)


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

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

[kudu-CR] test main: avoid signals for timeout handling

Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change.

Change subject: test_main: avoid signals for timeout handling
......................................................................


Patch Set 1:

Build Started http://104.196.14.100/job/kudu-gerrit/3422/

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0af2485c14db366a409ba1409fa01314396d030a
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
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-HasComments: No

[kudu-CR] test main: avoid signals for timeout handling

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

Change subject: test_main: avoid signals for timeout handling
......................................................................


test_main: avoid signals for timeout handling

Previously we used setitimer() to trigger test timeouts after the
appropriate delay. However, this caused the timeout code to run in a
signal handler, which TSAN flagged as unsafe because it allocates
memory.

This changes it to just use its own thread which sleeps before aborting
the process after the prescribed timeout.

The resulting behavior should be the same, though will avoid a bunch of
confusing spew in TSAN builds that time out.

Change-Id: I0af2485c14db366a409ba1409fa01314396d030a
Reviewed-on: http://gerrit.cloudera.org:8080/4415
Tested-by: Kudu Jenkins
Reviewed-by: Alexey Serbin <as...@cloudera.com>
---
M src/kudu/util/test_main.cc
1 file changed, 17 insertions(+), 34 deletions(-)

Approvals:
  Alexey Serbin: Looks good to me, approved
  Kudu Jenkins: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0af2485c14db366a409ba1409fa01314396d030a
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
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>

[kudu-CR] test main: avoid signals for timeout handling

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change.

Change subject: test_main: avoid signals for timeout handling
......................................................................


Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0af2485c14db366a409ba1409fa01314396d030a
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
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-HasComments: No