-
Notifications
You must be signed in to change notification settings - Fork 287
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
Files on Windows mount volume have wrong timestamp while being read #5543
Comments
very likely to be the same root issue as with #5528 |
Confirmed, I reproduced this on my machine. |
I have reproduced this by doing the while loop and then the stat in the same terminal, no need for a second terminal. However, I can't reproduce it reliably with either recipe. Maybe 1 in every 3 or 4 times. |
I'm having lots of issues that file changes in mounted volumes are not detected (both in php and nodejs development), i guess this is the root cause as well. |
Update: we've now managed to make a minimal repro case for this and we're working on finding the root cause. Interestingly, turning off file caching doesn't seem to fix it as we assumed it would. |
We have a new private build which (we believe) fixes this bug. https://download-stage.docker.com/win/stable/42579/Docker%20Desktop%20Installer.exe. Please try it and let us know how you get on. |
@stephen-turner great work i will try it now and report back if i have any issues. |
No, just running the installer should upgrade cleanly (in both cases). |
First of all, thank you for the quick effort. For the new build I have not been able to see the wrong timestamp anymore, when using the stat command. This makes the Wildfly application server redeploy my artifacts in an infinite loop. |
Thanks for retesting it, @bechhansen. It's hard to tell whether that's the same issue or not from the description. If you were able to produce a set of repro steps, that would be very helpful. |
I think I have found the Java code for the deployment scanner in Wildfly. I think this is the method that detects if a files has changed and should be redeployed.
I will try to find the time to build a Docker Image with a Java code snippet using this method to reproduce the issue. |
@bechhansen Thanks. It would be interesting to know whether you see incorrect file or folder timestamps inside the container when this issue occurs. |
I have created a small Java application that is using the aforementioned method. The image is build and pushed to Docker Hub. It should be able to run by doing:
I have not personally tested it on 2.2.0.1, as I have deadlines preventing me from uninstalling/installing Docker. Maybe you can have a go? |
I don't see any problems running that even on 2.2.0.0. What is the directory structure of your project? If you have nested directories mounted inside different containers, you are probably seeing #5530. |
For me everything seems fixed. Thanks for all the hard work! |
2.2.0.1 seems to have fixed the saving problems we were seeing in VS Code with remote containers: worked for me. |
I have now had the time to look into this again. You are absolutely right. My application did not reproduce the issue. I have had another look at the Wildfly deployment code, and I have created another small application I think is reproducing the issue. It is located here: The application is creating two files, and tries to set the modification timestamp of the second file to be the same as for the first file. Apparently there is an issue with setting the modification time. I have push the new application as a Docker image under the name
If you run the container without using host volume you should see that everything works:
But run it using a volume on your Windows host, you should be able to see it fail:
|
Sometimes I actually get an error telling me that the file I'm trying to set modification time for does not exist, even though I have just created it. I don't see this behavior when not using a volume. I think this is also a bug.
If you see the same error, try to run the container a few more times. |
@bechhansen Thanks for the repro case. We've released a new version, which I've tested fixes this. You can get it from https://download-stage.docker.com/win/stable/42644/Docker%20Desktop%20Installer.exe. Thanks again for helping us pin down these issues. |
Thank you. I can confirm 2.2.0.2 has fixed the issue. |
Great, thank you for testing it and confirming. |
We have just released 2.2.0.3, which fixes this issue, so closing this ticket. In case any Edge users are watching this ticket, it will be on the Edge channel tomorrow too. |
I got the update notification for |
@EricHripko yes, |
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
When accessing files located on a Windows mount from within a container, I expect to get the correct access, modify and change timestamps of the file.
E.g. when calling the command stat on a file, I expect something like:
Actual behavior
When calling stat on a file, while it is being read from another command prompt I get this result:
The timestamp seems to be undefined.
We have see this behavior on two individual Windows computers efter updating Docker today.
The bug makes our Wildfly server auto deploy our application over and over again, as the server think our deployable artifacts has changed.
Information
Windows Version:
Windows 10
Docker Desktop Version:
2.2.0.0 (42247)
Are you running inside a virtualized Windows e.g. on a cloud server or on a mac VM:
Hyper-V
Steps to reproduce the behavior
I have created the issue sometime by doing something like:
See that timestamps are:
Access: 1970-01-01 00:00:00.000000000 +0000
Modify: 1970-01-01 00:00:00.000000000 +0000
Change: 1970-01-01 00:00:00.000000000 +0000
The text was updated successfully, but these errors were encountered: