Affects Version/s: 2.10.0
Fix Version/s: None
Environment is latest branch-2 head
OS: RHEL 7.4
Out of ~10 container allocations with GPU requirement, at least 1 of the allocated containers would lose GPU isolation. Even if I asked for 1 GPU, I could still have visibility to all GPUs on the same machine when running nvidia-smi.
The funny thing is even though I have visibility to all GPUs at the moment of executing container-executor (say ordinal 0,1,2,3), but cgroups jailed the process's access to only that single GPU after sometime.
The underlying process trying to access GPU would take the initial information as source of truth and try to access physical 0 GPU which is not really available to the process. This results in a [CUDA_ERROR_INVALID_DEVICE: invalid device ordinal] error.
Validated the container-executor commands are correct:
So most likely a race condition between these two operations?
Another potential theory is the cgroups creation for the container actually failed but the error was swallowed silently.