Adar Dembo has submitted this change and it was merged.

Change subject: locks: stop using errno around base::NumCPUs and 
base::MaxCPUIndex
......................................................................


locks: stop using errno around base::NumCPUs and base::MaxCPUIndex

It's not clear why we ever did this. InitializeSystemInfo() doesn't
explicitly set errno itself, nor does it clear it in the event of an ignored
error (e.g. ReadIntFromFile() on a file that doesn't exist).

Without this fix, I consistently get the following when I run rwlock-perf:

        Test   Threads  Cycles
------------------------------
WARNING: Logging before InitGoogleLogging() is written to STDERR
F0625 12:20:24.620546 12138 locks.h:163] Check failed: (*__errno_location ()) 
== 0 (2 vs. 0) No such file or directory
*** Check failure stack trace: ***

Amusingly, I only see this in release builds because in a dynamically linked
rwperf-test the very first call to InitializeSystemInfo() (subsequent calls
are cached) takes place in a location that doesn't check errno upon return.

Change-Id: I7c048a5a541bd3bfd54f8ac4acc1dd9e379c47ad
Reviewed-on: http://gerrit.cloudera.org:8080/3495
Tested-by: Kudu Jenkins
Reviewed-by: Todd Lipcon <t...@apache.org>
---
M src/kudu/consensus/log_index.cc
M src/kudu/experiments/rwlock-perf.cc
M src/kudu/rpc/negotiation.cc
M src/kudu/util/locks.h
4 files changed, 13 insertions(+), 14 deletions(-)

Approvals:
  Todd Lipcon: Looks good to me, approved
  Kudu Jenkins: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7c048a5a541bd3bfd54f8ac4acc1dd9e379c47ad
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <d...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>

Reply via email to