Docker Community Forums

Share and learn in the Docker community.

File change notifications broken, osxfs fails silently


(Cloeper) #1

Expected behavior

File change notifications a triggered in docker container when a linked file is changed in OSX. Should happen for all files.

Actual behavior

No change notification is triggered in the docker container for some files. Running inotifywait produces nothing when changing file. If file is modified in the container, change notification is triggered. Some file changes are picked up, but which files will trigger a change notification seem to change every time I run docker-compose up

Information

Docker for Mac: version: mac-v1.12.0-beta16.2
OS X: version 10.11.5 (build: 15F34)
logs: /tmp/20160627-143556.tar.gz
failure: No error was detected
[OK]     docker-cli
[OK]     app
[OK]     menubar
[OK]     virtualization
[OK]     system
[OK]     osxfs
[OK]     db
[OK]     slirp
[OK]     moby-console
[OK]     logs
[OK]     vmnetd
[OK]     env
[OK]     moby
[OK]     driver.amd64-linux

OSX 10.11.5

Steps to reproduce the behavior

  1. Run docker-compose up
  2. Modify linked files in OSX
  3. File change notifications are not delivered to container

More Info

Despite the fact that the diagnostic tool says osxfx is [OK], the logs show around 4000 errors with osxfs. There are a few categories of errors that occur:

One instance of ‘Resource busy’
Docker[com.docker.osxfs][959] <Error>: transfused: Event mkdir [dir_in_OSX] error: Resource busy

1000s of not found errors:

  1. Docker[com.docker.osxfs] <Error>: transfused: Event symlink [file_path] error: No such file or directory
  2. Docker[com.docker.osxfs] <Error>: transfused: Event truncate [file_path] error: No such file or directory
  3. Docker[com.docker.osxfs] <Error>: transfused: Event chmod [file_path] error: No such file or directory
  4. Docker[com.docker.osxfs] <Error>: transfused: Event mkdir [file_path] error: No such file or directory

1000s of state not recoverable errors:

  1. Docker[com.docker.osxfs] <Error>: transfused: Event symlink [file_path] error: State not recoverable
  2. Docker[com.docker.osxfs] <Error>: transfused: Event truncate [file_path] error: State not recoverable
  3. Docker[com.docker.osxfs] <Error>: transfused: Event chmod [file_path] error: State not recoverable
  4. Docker[com.docker.osxfs] <Error>: transfused: Event mkdir [file_path] error: State not recoverable

(Itaylor) #2

@cloeper and I are running the the same code on the same OS version and this happens to him but not to me. Avoiding these types of “works on my machine” issues is one of the main reasons we’re using docker. We’ve both taken a try at troubleshooting his issue and neither of us can figure out what’s going on here.


(Aaron Jensen) #3

I’m seeing something similar. For me, I only see it when I try to watch with multiple things at once. For example, I start webpack dev server, karma, and eslint-watch. When I do this, karma’s webpack misses file changes to my specs (but strangely not my project files).

If I do not start eslint-watch, karma’s webpack watch works fine. I also often get two watch triggers on eslint-watch for files that change.

By the way, where are you seeing those logs?


(Cloeper) #4

Those logs are coming from docker-system.log in /tmp/20160627-143556.tar.gz.


(Itaylor) #5

We found the log statements by bringing up the diagnose window and then opening the tarball it creates (listed as logs: in the same window the diagnose runs in). The file inside of that tarball is the docker-system.log with the errors.


(Evanc) #6

I’m experiencing the same symptoms, but I don’t see that error in my logs. I uploaded my diagnostic if it’s helpful: C1DEA990-D233-48F3-A746-9BBA4A73E1F1


(Martinentwistle) #7

I am experiencing similar issues I think. If I delete and re-create a directory on the Host, the container can no longer interact with that directory. I get the same errors in my logs:

E.g.
: transfused: Event symlink /Users/xxxxx/Library/Preferences/com.apple.systempreferences.plist.j9dZzrz error: State not recoverable

: transfused: Event mkdir /Users/xxxxx/temp error: Resource busy Jun 28 17:20:01 xxxxxxxx Docker[10069]
: transfused: Event symlink /Users/xxxxx/temp/y error: No such file or directory

but the diagnostic tool says everything is OK.

I did post: Directories deleted and recreated on host cause mounted volume to become disconnected before I came across this post.


(Rostchri) #8

Ok this is a serious issue and can easily be reproduced:

inside a running docker-container:
/# df
Filesystem 1K-blocks Used Available Use% Mounted on
none 61891364 2192652 56531736 4% /
tmpfs 1024196 0 1024196 0% /dev
tmpfs 1024196 0 1024196 0% /sys/fs/cgroup
shm 65536 0 65536 0% /dev/shm
/dev/vda2 61891364 2192656 56531732 4% /etc/resolv.conf
/dev/vda2 61891364 2192656 56531732 4% /etc/hostname
/dev/vda2 61891364 2192656 56531732 4% /etc/hosts
osxfs 999365024 833099872 166009152 83% /config

/ # cd /config/
/config # mkdir test
/config # mv test newtest
/config # cd newtest
/config/newtest # ls -all
total 1
drwxr-xr-x 2 root root 68 Aug 9 22:30 .
drwxr-xr-x 6 root root 204 Aug 9 22:30 …
/config/newtest # touch 1
touch: 1: No such file or directory <— BANG This should not happen. Return-code = 1 which is very bad …
/config/newtest # echo $?
1
/config/newtest # ls -all <— The file itself is present but the Return-code above should not be 1 …
total 1
drwxr-xr-x 4 root root 136 Aug 9 22:31 .
drwxr-xr-x 6 root root 204 Aug 9 22:30 …
-rw-r–r-- 1 root root 0 Aug 9 22:30 1