Skip to content

Conversation

jsquyres
Copy link
Member

Trying out to run processes via mpirun in Podman containers has shown
that the CMA btl_vader_single_copy_mechanism does not work when user
namespaces are involved.

Creating containers with Podman requires at least user namespaces to be
able to do unprivileged mounts in a container

Even if running the container with user namespace user ID mappings which
result in the same user ID on the inside and outside of all involved
containers, the check in the kernel to allow ptrace (and thus
process_vm_{read,write}v()), fails if the same IDs are not in the same
user namespace.

One workaround is to specify '--mca btl_vader_single_copy_mechanism none'
and this commit adds code to automatically skip CMA if user namespaces
are detected and fall back to MCA_BTL_VADER_EMUL.

Signed-off-by: Adrian Reber areber@redhat.com
(cherry picked from commit fc68d8a)

@jsquyres
Copy link
Member Author

FYI @adrianreber

@bwbarrett Thoughts on bringing this back to v3.0.x?

@jsquyres jsquyres added the NEWS label Sep 21, 2019
@ibm-ompi
Copy link

The IBM CI (GNU Compiler) build failed! Please review the log, linked below.

Gist: https://gist.github.com/9bb9548c565aef8af0feab982bb05982

@ibm-ompi
Copy link

The IBM CI (XL Compiler) build failed! Please review the log, linked below.

Gist: https://gist.github.com/b0175ddd3d85b4b86d4fa80ee3072fef

Trying out to run processes via mpirun in Podman containers has shown
that the CMA btl_vader_single_copy_mechanism does not work when user
namespaces are involved.

Creating containers with Podman requires at least user namespaces to be
able to do unprivileged mounts in a container

Even if running the container with user namespace user ID mappings which
result in the same user ID on the inside and outside of all involved
containers, the check in the kernel to allow ptrace (and thus
process_vm_{read,write}v()), fails if the same IDs are not in the same
user namespace.

One workaround is to specify '--mca btl_vader_single_copy_mechanism none'
and this commit adds code to automatically skip CMA if user namespaces
are detected and fall back to MCA_BTL_VADER_NONE (as opposed to
MCA_BTL_VADER_EMUL on master as of 2019-09-21 and the v4.0.x branch).

Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
(cherry picked from commit fc68d8a)
@jsquyres jsquyres merged commit ff293ec into open-mpi:v3.0.x Oct 15, 2019
@jsquyres jsquyres deleted the pr/v3.0.x/vader-do-not-use-cma branch October 15, 2019 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants