-
Notifications
You must be signed in to change notification settings - Fork 28
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
cset error :failed to create shield, hint: do other cpusets exist? #34
Comments
I have the same error
|
It looks like there are some assumptions about existing cpusets, manually creating a set with
Removing the docker cset so there's nothing there doesn't seem to help either. (Also you can enable debug outputs with |
Manually creating and moving processes between sets still works, for example:
I cannot however alter the docker cpuset
|
Applying this patch (without the python2 part) seems to resolve the issue, at least for me: |
Iiiinteresting, I'll have to try this patch. It's not the root issue but in case it's useful for others, to control the docker cset you need to change the cgroup driver to |
@ryankurte Report to me if this patch works for your case, in that case I can open a PR. |
Posting a cleaned version of the patch here if someone wants to try it: cpuset.txt |
@thiagokokada The patch fixed the error that I had. Although I am curious why commenting two lines fixed the whole problem? I am interested to know more about this |
I really don't understand too much about the code to know why this fixes the problem, but AFAIK this is probably skipping some guards. My use case is to isolate CPUs for a VM in libvirt. Without this patch libvirt (that AFAIK uses cpuset syscall, not this program, internally) can't migrate the vCPUs to the isolated CPUs, but with this patch it works fine. It definitely works fine for me, because there is no user space or kernel threads running in the VM (this VM is highly sensitive to latency so any thread stealing CPU cycles results in huge spikes in latency). |
So I think this is the options that commenting those lines disable: https://github.com/lpechacek/cpuset/blob/master/cpuset/commands/set.py#L166-L171. They're not exposed in Maybe a patch exposing those options to |
So we have those calls in That basically is this function: https://github.com/lpechacek/cpuset/blob/master/cpuset/commands/set.py#L383-L400 So yeah, it basically uses |
A slightly better patch: cpuset2.txt |
Dropping the CPU exclusivity of the cpuset won't keep the CPUs "shielded" as intended. I don't think this is an approach that would be broadly acceptable. @thiagokokada Do you also have a cpuset cgroup on your system that intersects the shielded CPUs (as in the original report)? What happens if you exclude the offending CPUs from that cgroup? |
I also had this error:
I see I have no docker containers running:
But I do have a cpu set for docker:
But on another machine, where cset shield works just fine, I have:
So on the first machine I tried removing the cpus assigned to docker:
Then the list looks like this:
And I am able to create a shield with no errors:
|
Hello, i got an error when I try to use shield on Ubuntu.
Maybe the same as #26 ?
Tested with the current and the 1.6 version.
Same with manually install the latest package on 19.10
Thanks.
The text was updated successfully, but these errors were encountered: