Hello Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/5741
to look at the new patch set (#7).
Change subject: Control mutex stack walking in DEBUG mode with a gflag
......................................................................
Control mutex stack walking in DEBUG mode with a gflag
In the case of a CHECK() failure, both the crashing thread and the
AsyncLogger thread may simultaneously attempt to symbolize their stacks.
AsyncLogger does this simply by acquiring a Mutex in RunThread(), which
triggers stack collection in DEBUG mode, while the crashing thread is
collecting the stack trace in order to print an important error message.
google::GetStackTrace() only allows access by one thread at a time. If
more than one thread attempts to invoke this function simultaneously,
there is a CAS that determines excluvisity. The "loser" of this contest
gets a short-circuit return along with a "0 length" stack trace,
indicating failure to collect the stack trace. I filed a glog issue
related to improving this behavior at:
https://github.com/google/glog/issues/160
So, when the AsyncLogger thread wins this race against a CHECK-crashing
thread, the crashing thread ends up with an empty stack trace being
printed, which is detrimental to diagnosing the problem.
This patch disables the Mutex owner stack trace collection on DEBUG
builds by default, only enabling it when a hidden gflag is set.
Change-Id: Ie4593cf7173867ce2f6151e03df0be94f97d95d2
---
M src/kudu/util/mutex.cc
1 file changed, 16 insertions(+), 3 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/41/5741/7
--
To view, visit http://gerrit.cloudera.org:8080/5741
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ie4593cf7173867ce2f6151e03df0be94f97d95d2
Gerrit-PatchSet: 7
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Mike Percy <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <[email protected]>
Gerrit-Reviewer: Todd Lipcon <[email protected]>