cirruslabs / tart

macOS and Linux VMs on Apple Silicon to use in CI and other automations
https://tart.run
Other
3.8k stars 111 forks source link

Mounted volumes flake with "No such file or directory" #567

Open fkorotkov opened 1 year ago

fkorotkov commented 1 year ago

There is a bug in virtiofs integration that is reported as FB12594177 (please bring attention to it if you have contacts at Apple) where "No such file or directory" can be reported for a file on the mounted volume even thought these files are there.

Here are steps to reproduce with Tart:

git clone https://github.com/devMEremenko/XcodeBenchmark
tart clone ghcr.io/cirruslabs/macos-ventura-xcode:latest ventura-xcode
ventura-xcode tart run --dir=$PWD/XcodeBenchmark ventura-xcode 

Then inside the VM you can go to "/Volumes/My Shared Files" and run "sh benchmark.sh" to simulate the load.

jlsalmon commented 1 year ago

@fkorotkov Would you be open to the suggestion of adding FB12594177 to OpenRadar? http://openradar.appspot.com

fkorotkov commented 1 year ago

@jlsalmon thanks for noting OpenRadar. Just duplicated it there.

On a side note there are bunch of reports of flakes and other bugs in virtiofs on macOS in Docker for Mac issues. Seems it's a more wide spread issue then we initially though. 😪

sanieldalib commented 1 year ago

I'm planning on testing out with Sonoma to see if this is still an issue. Has anyone tried it out yet?

jlsalmon commented 1 year ago

I did try a Sonoma host with a Ventura guest, and anecdotally experienced fewer issues with my specific workload, but non-zero, and the benchmark still failed. Have not tried a Sonoma/Sonoma pair yet.

fkorotkov commented 1 year ago

Same here. Tested on some Betas for both host and guest back in July and still could reproduce. 😓 Haven't tried released version though!

sanieldalib commented 5 months ago

Is this still an issue through the latest 14.4.1 macOS release?

fkorotkov commented 5 months ago

@sanieldalib, unfortunately, yes. As we understand this feature of Virtualization.Framework was envisioned for "sharing a few files from Desktop" and is not ready for heavy I/O. Right now the workaround is to use either block devices or mounting additional disks with --disk.

sanieldalib commented 5 months ago

@fkorotkov Thanks mate.

As we understand this feature of Virtualization.Framework was envisioned for "sharing a few files from Desktop" and is not ready for heavy I/O.

Is this based on a response from Apple on your Feedback Ticket? If so, does that mean that we should not consider directory mounting as a viable option?

fkorotkov commented 5 months ago

Yeah, somewhat along the lines of my Feedback Ticket. Have no information if it will be improved in the next macOS version. I wouldn't put hopes on it.