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 2017/06/30 18:48:03 UTC

[kudu-CR](branch-1.4.x) Work around another OpenSSL thread safety bug

Todd Lipcon has uploaded a new change for review.

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

Change subject: Work around another OpenSSL thread safety bug
......................................................................

Work around another OpenSSL thread safety bug

In the course of debugging some CHECK failures and TSAN errors, I found
that older versions of OpenSSL have non-threadsafe OBJ_create and even
ERR_peek_error methods. This commit fixes an instance where we were
calling OBJ_create concurrently by wrapping it in a std::call_once. I
don't have a fix for ERR_peek_err unsafety, since that's used
pervasively in most methods touching OpenSSL.

Side note: for debugging issues like this, I find it helpful to run ASAN
with the following options:

ASAN_OPTIONS="fast_unwind_on_malloc=0"

That option typically makes races more reproducible, and produces better
stack traces as well.

Change-Id: I9a9fe1a32f77bf24a5c7e692a55b8ad96488d409
Reviewed-on: http://gerrit.cloudera.org:8080/6997
Tested-by: Kudu Jenkins
Reviewed-by: Alexey Serbin <as...@cloudera.com>
(cherry picked from commit d0270172e91bf6bcb045cb63a731609472fa6be4)
---
M src/kudu/security/cert-test.cc
M src/kudu/security/cert.cc
2 files changed, 31 insertions(+), 6 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9a9fe1a32f77bf24a5c7e692a55b8ad96488d409
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: branch-1.4.x
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>

[kudu-CR](branch-1.4.x) Work around another OpenSSL thread safety bug

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

Change subject: Work around another OpenSSL thread safety bug
......................................................................


Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9a9fe1a32f77bf24a5c7e692a55b8ad96488d409
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: branch-1.4.x
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No

[kudu-CR](branch-1.4.x) Work around another OpenSSL thread safety bug

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

Change subject: Work around another OpenSSL thread safety bug
......................................................................


Work around another OpenSSL thread safety bug

In the course of debugging some CHECK failures and TSAN errors, I found
that older versions of OpenSSL have non-threadsafe OBJ_create and even
ERR_peek_error methods. This commit fixes an instance where we were
calling OBJ_create concurrently by wrapping it in a std::call_once. I
don't have a fix for ERR_peek_err unsafety, since that's used
pervasively in most methods touching OpenSSL.

Side note: for debugging issues like this, I find it helpful to run ASAN
with the following options:

ASAN_OPTIONS="fast_unwind_on_malloc=0"

That option typically makes races more reproducible, and produces better
stack traces as well.

Change-Id: I9a9fe1a32f77bf24a5c7e692a55b8ad96488d409
Reviewed-on: http://gerrit.cloudera.org:8080/6997
Tested-by: Kudu Jenkins
Reviewed-by: Alexey Serbin <as...@cloudera.com>
(cherry picked from commit d0270172e91bf6bcb045cb63a731609472fa6be4)
Reviewed-on: http://gerrit.cloudera.org:8080/7344
Reviewed-by: Dan Burkert <da...@apache.org>
---
M src/kudu/security/cert-test.cc
M src/kudu/security/cert.cc
2 files changed, 31 insertions(+), 6 deletions(-)

Approvals:
  Dan Burkert: Looks good to me, approved
  Kudu Jenkins: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9a9fe1a32f77bf24a5c7e692a55b8ad96488d409
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: branch-1.4.x
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR](branch-1.4.x) Work around another OpenSSL thread safety bug

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

Change subject: Work around another OpenSSL thread safety bug
......................................................................


Patch Set 1:

Cherry-picking to 1.4.x since I got TSAN failures on an attempted cherry-pick to this branch

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9a9fe1a32f77bf24a5c7e692a55b8ad96488d409
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: branch-1.4.x
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No