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

IPC + PID Namespace from host does not work in combination #7100

Closed
mario19911 opened this issue Jul 28, 2020 · 1 comment
Closed

IPC + PID Namespace from host does not work in combination #7100

mario19911 opened this issue Jul 28, 2020 · 1 comment
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@mario19911
Copy link

mario19911 commented Jul 28, 2020

Description

I am trying to run two containers, both with --ipc=host and --pid=host. With this combination I am not able to see the shared memories from container A in container B. When I remove --pid=host it is working.

Steps to reproduce the issue:

  1. Create a container which creates a shared memory (shm_server from https://www.cs.cf.ac.uk/Dave/C/node27.html)

  2. Startup container A with podman run -it --ipc=host --pid=host --rm /bin/bash

  3. Startup shm_server in container and check it with ipcs -m

  4. Startup the second container with podman run -it --ipc=host --pid=host --rm /bin/bash and check the same with ipcs -m (cannot see the shared memory created in container A)

  5. Startup the second container again with podman run -it --ipc=host --rm /bin/bash and check ipcs -m --> does work

Describe the results you received:
When both namespaces are set to "host" I cannot see the generated shared memories.

Describe the results you expected:
To see the shared memory of container A in container B.

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

Version:      2.0.3
API Version:  1
Go Version:   go1.14.2
Built:        Thu Jan  1 01:00:00 1970
OS/Arch:      linux/amd64

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.15.0
  cgroupVersion: v1
  conmon:
    package: 'conmon: /usr/libexec/podman/conmon'
    path: /usr/libexec/podman/conmon
    version: 'conmon version 2.0.18, commit: '
  cpus: 1
  distribution:
    distribution: ubuntu
    version: "20.04"
  eventLogger: file
  hostname: mario-VirtualBox
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 5.4.0-42-generic
  linkmode: dynamic
  memFree: 138342400
  memTotal: 2084356096
  ociRuntime:
    name: runc
    package: 'runc: /usr/sbin/runc'
    path: /usr/sbin/runc
    version: 'runc version spec: 1.0.1-dev'
  os: linux
  remoteSocket:
    path: /run/podman/podman.sock
  rootless: false
  slirp4netns:
    executable: ""
    package: ""
    version: ""
  swapFree: 383512576
  swapTotal: 470282240
  uptime: 16h 29m 40.51s (Approximately 0.67 days)
registries:
  search:
  - docker.io
  - quay.io
store:
  configFile: /etc/containers/storage.conf
  containerStore:
    number: 8
    paused: 0
    running: 1
    stopped: 7
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /var/lib/containers/storage
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 548
  runRoot: /var/run/containers/storage
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 1
  Built: 0
  BuiltTime: Thu Jan  1 01:00:00 1970
  GitCommit: ""
  GoVersion: go1.14.2
  OsArch: linux/amd64
  Version: 2.0.3

**Additional environment details (AWS, VirtualBox, physical, etc.):Ubuntu 20.04 in VirtualBox

@mheon
Copy link
Member

mheon commented Jul 31, 2020

This is fixed now, via #7109

@mheon mheon closed this as completed Jul 31, 2020
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

No branches or pull requests

2 participants