Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

percpu_rwlock assert sched_getcpu() within the range of visible CPUs is broken on OpenVZ #9619

Closed
FranckPachot opened this issue Aug 6, 2021 · 1 comment
Assignees
Labels
area/docdb YugabyteDB core features kind/bug This issue is a bug priority/medium Medium priority issue

Comments

@FranckPachot
Copy link
Contributor

FranckPachot commented Aug 6, 2021

Jira Link: DB-1453
In https://github.com/yugabyte/yugabyte-db/blob/master/src/yb/util/locks.h#L201 we have the following assert: CHECK_LT(cpu, n_cpus_); that checks that the processor we are scheduled on is within the range visible from /sys/devices/system/cpu/present

This, on some hypervisors like OpenVZ, fails because sched_getcpu() maps all host processors, but /sys exposes only the visible range. All details here: https://dev.to/yugabyte/visible-number-of-cpu-on-openvz-2h7d

@kmuthukk kmuthukk added the area/docdb YugabyteDB core features label Aug 6, 2021
@bmatican
Copy link
Contributor

bmatican commented Aug 6, 2021

I believe we've seen something like this in robin.io as well, but I think the checks are in place because the locks implementation rely on being able to explicitly use a range of cpus.

I think some of this functionality is ported over from chromium, not sure if there's something upstream we could bring in to cover for this here.

@bmatican bmatican added this to Backlog in YBase features via automation Aug 6, 2021
@yugabyte-ci yugabyte-ci added kind/bug This issue is a bug priority/medium Medium priority issue labels Jun 8, 2022
YBase features automation moved this from Backlog to Done Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docdb YugabyteDB core features kind/bug This issue is a bug priority/medium Medium priority issue
Projects
Development

No branches or pull requests

5 participants