-
Notifications
You must be signed in to change notification settings - Fork 116
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
EOVERFLOW error when using an osxfs mount inside an overlay filesystem #3643
Comments
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
All of our developers on OSX are seeing this exact same issue. Avoiding the overlay in our case is not really feasible because things like the linux builds do not like case-insensitive filesystems. Any suggestions on what we can do to provide more information to help get this issue resolved? |
/remove-lifecycle stale |
Under certain circumstances, the `ls` command can't be invoked in mac. This avoids it by moving the `ls` to build time. See docker/for-mac#3643 Fixes #232
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
/remove-lifecycle stale This is still happening daily. Anybody have any cycles? |
Apologies for taking so long to follow up here. We're no longer using this setup, but I don't think it's a Docker bug. Disabling FSEvents had the illusion (for awhile) of fixing the problem, but did not completely solve it. For posterity, I'll note that I did find a funny hack for disabling FSEvents for a specific folder on macOS. If the path on the host contains a subfolder named ".ubd" (e.g., /Users/aaron/.ubd/share), changes to any files underneath will be ignored with respect to FSEvents (I figured this out by disassembling fseventsd). Sadly, that's insufficient. Here's the rub, from the overlayfs documentation:
Basically, if you share a folder from the host into a container and use it as a lower layer in an overlay mount, then any subsequent changes to that folder on the host will produce undefined behavior. This seems to be exacerbated by FSEvents, but even if you disable them, overlayfs can end up in a bad state. FWIW, in our case this would usually manifest in ESTALE errors. We've concluded that overlayfs is not well suited to this use case. To avoid file syncing, I would suggest using osxfs with to an out-of-source build setup instead, similar to what CMake recommends, i.e.:
This is more elegant than having to sync on every change (there are lots of existing solutions out there for that), but may require a lot of rework depending on your project. |
Well, !@#%!@ - thanks for the info Aaron. Looks like some poor slob (me) will get to go rewrite large chunks of our build system. Or we ditch MacOS... not sure which is more expensive. My time or a few dozen beefy linux boxes for the developers instead of their Macs... |
Closed issues are locked after 30 days of inactivity. If you have found a problem that seems similar to this, please open a new issue. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
Expected behavior
I'm trying to use overlayfs to create a union mount out of two filesystems, like follows:
(1) fuse.osxfs at /srv/share (lower layer; read-only)
(2) ext4 Docker volume at /data (upper layer; read-write)
Imagine that /srv/share contains software that I want to build in the container from source. Furthermore, I want to use overlayfs to merge this source filesystem with a separate writable volume such that during compilation, all build artifacts are written to the Docker volume at the /data mount (as opposed to polluting the pristine source tree through the shared /srv mount).
Note: Just to dispel any potential confusion, I'm aware that Docker itself works in part by leveraging overlayfs as a storage driver. This is a separate use case.
Actual behavior
It mostly works, except after any change to the filesystem on the host side (e.g., touching a new file), a subsequent
readdir()
on the container side results inEOVERFLOW
("Value too large for defined data type"), as follows:Please see below for a simple procedure to reproduce. I believe it to be highly reproducible, as I was able to replicate the issue easily on two separate machines, and my co-workers have witnessed this behavior well.
Information
Steps to reproduce the behavior
With a fresh install of Docker for Mac 2.0.0.3 (Engine 18.09.2):
To get out of this state, we can make a
stat(2)
system call on the shared filesystem mount (accomplished here with themountpoint(1)
tool):I believe the root cause of this bug is related to the integrated support for FSEvents/inotify translation. I developed this theory by noticing that whenever I make a change to the source on the host side, it results in some FUSE lookup traffic:
To test my theory, I sent the
STOP
signal to the macOS fseventsd daemon, and this prevented the issue:Since the osxfs drivers are closed-source, I cannot debug any further.
Furthermore, I haven't found a way to disable the FSEvents feature. Is it possible? Any other suggested workarounds you can think of would be highly appreciated.
The text was updated successfully, but these errors were encountered: