-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
macos/9pfs: funky recursive readdir() results on mounted volumes #21097
Comments
The default file system for QEMU version of Podman machine is plan9. When we switch to using applehv, it will be virtiofsd. It would be interesting to see if the problem disappears with the switch. |
Seems to be specific to virtfs-on-darwin, does not reproduce on Linux. $ podman-remote-static --connection podman-machine-default run --rm -it -v $HOME/foo:/tmp alpine:latest find /tmp
/tmp
/tmp/bar
/tmp/bar/baz So probably: none of the above, but most likely in the 9p server (or corner case in 9p client) |
the problem doesn't occur when running my reproducer directly on CoreOS via |
A friendly reminder that this issue had no activity for 30 days. |
podman 5.0 uses virtiofs with apple hypervisor so I suggest you retry with that, either way this is doe snot seem to be bug in podman |
thanks. I can't reproduce the issue with 5.0, so whichever component it was in, this issue can be closed. |
Issue Description
Several commands hang when recursing into directory structures mounted from macOS into podman containers. The problem does not occur in the container filesystem; only within mounted volumes.
It appears to be related to opendir()/readdir() returning strange results; it's triggerable using busybox find(1) on alpine (musl), for example: see below.
I'm not at all sure if the problem is in podman, the CoreOS kernel, musl in alpine, or what, but thus far I've only been able to repro it with podman on macos, so I'm reporting it here.
Steps to reproduce the issue
Steps to reproduce the issue
podman machine start && cd $HOME && mkdir foo foo/bar foo/bar/baz
podman run --rm -it -v $HOME/foo:/tmp alpine:latest find /tmp
The problem does not occur if
foo/bar/baz
does not exist, or is not a directory; it appears two levels of directories are required to trigger it.Describe the results you received
Describe the results you expected
podman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
No
Additional environment details
I'm not sure how to upgrade podman from 4.7.2 in the coreos image; 4.8.2 does not appear to be available.
Additional information
The following program demonstrates the strange results from readdir(), modelled after the busybox find(1) implementation:
when run in the alpine:latest container with the mounts from the repro steps, outputs:
i.e., it appears that after recursing into /tmp/bar and returning from that recurse, readdir() returns the results from the start all over again even though opendir() on it was only called once, at the beginning.
The text was updated successfully, but these errors were encountered: