Todd Lipcon has submitted this change and it was merged. Change subject: KUDU-1290. Fix CHECK failures when some CPUs are disabled ......................................................................
KUDU-1290. Fix CHECK failures when some CPUs are disabled This adds a new function base::MaxCPUID() which uses /sys/devices/system/cpu/present to determine which CPUs are present on the system. This is an alternative to base::NumCPUs() which doesn't count any CPUs which have been administratively disabled. The few places where we use CPU ID to index into a collection are changed to use this new API. I verified that, if I disabled one of my CPUs, the master crashed a few minutes after startup without the patch. With the patch, it seems stable. Change-Id: I7959e87aba4a694b60ee36adddfd32fef631d8aa Reviewed-on: http://gerrit.cloudera.org:8080/1864 Reviewed-by: Adar Dembo <[email protected]> Tested-by: Internal Jenkins --- M src/kudu/cfile/bloomfile.cc M src/kudu/gutil/sysinfo.cc M src/kudu/gutil/sysinfo.h M src/kudu/util/locks.h 4 files changed, 74 insertions(+), 15 deletions(-) Approvals: Internal Jenkins: Verified Adar Dembo: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/1864 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7959e87aba4a694b60ee36adddfd32fef631d8aa Gerrit-PatchSet: 4 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Todd Lipcon <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Dan Burkert <[email protected]> Gerrit-Reviewer: Internal Jenkins Gerrit-Reviewer: Todd Lipcon <[email protected]>
