Skip to content

[Bug]: Single file mounts fail intermittently. #1251

@jglogan

Description

@jglogan

I have done the following

  • I have searched the existing issues
  • If possible, I've reproduced the issue using the 'main' branch of this project

Steps to reproduce

There is a problem in the virtualization framework where files with more than one hard link may not be accessible when mounted via virtiofs into a VM.

The problem would affect any such files in a virtiofs share, but it is particularly evident with our single-file mount method, where we create an isolated mount source directory on the host and create a link to the source file in that directory.

echo "Hello, world!" > hello.txt
container run -it --rm -v ${PWD}/hello.txt:/hello.txt alpine sh
cat hello.txt

Current behavior

Sometimes we see the expected behavior, but other times it's:

% container run -it --rm -v ${PWD}/hello.txt:/hello.txt alpine sh
Warning! Running debug build. Performance may be degraded.
/ # vi hello.txt 
/ # cat hello.txt
cat: can't open 'hello.txt': Permission denied
/ # 

Expected behavior

% container run -it --rm -v ${PWD}/hello.txt:/hello.txt alpine sh
Warning! Running debug build. Performance may be degraded.
/ # cat hello.txt 
Hello, world!
/ # 

Environment

- OS: 26
- Xcode: 26
- Container: main

Relevant log output

N/A

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    storageissues and features associated with storage.

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions