-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
Running chmod on file results in 'text file busy' when running straight after. #9547
Comments
Hit by another example of this when doing something entirely different.
The first time was with own custom build scripts and could come up with workaround. This time was when trying to build squid from source code. Because it is a timing issue of sorts, is hit and miss as to whether works or not. For the case of boot2docker on MacOS X where using Vagrant, this sort of issue appears to be more easily triggered. |
This also happens when building containers with
|
Also happens on
Seems like a workaround would be to |
Same issue here:
The line it fails on looks like:
I tried upgrading docker to the latest available in the PPA repo (1.4.1) and I still have the same issue:
Futher details: Ubuntu 14.10/x86_64 with all of the latest updates as of yesterday. |
For some additional data points, I was unable to reproduce this for: Ubuntu (using btrfs storage driver):
CentOS 7 (using devicemapper storage driver):
After upgrading the Ubuntu machine to 1.4.1 I was still unable to reproduce:
|
I also get the "Text file busy" error message, however, during installation of a newer version of a package. I belive the root-cause is probably same as described above. I get this problem for: distribution: Ubuntu 14.04 and distribution: Debian wheezy backport |
Same issue:
Generated by: Version (
Workaround: |
A (hopefully) better 'workaround' is to use sync:
|
I tried |
I was having a similar issue; switching to the 'overlay' storage driver seems to have resolved it. |
I have same problem. |
Could you add "docker info" in addition to "docker version" output, It shows more relevant details I think. |
Containers: 3 |
Any ideas? This error seems to happen at random...
|
So the detailed reports all have |
I can add another output if needed:
Ubuntu 14.04LTS. |
I've started to run into this problem as well. I'm running a docker build in a Vagrant VM. I get this error docker infoContainers: 8 docker versionClient version: 1.6.2 |
Using boot2docker on mac, and using the workaround 'sync' like this bellow, I haven't the 'text file busy error message'.
|
Using |
I also had this issue. |
Using sync helped me get passed this issue too. Thanks @dreuter ! |
I never saw this issue until I switched from boot2docker with VirtualBox to docker-machine with Fusion. The same Dockerfile that would build without hiccups with the VirtualBoxified boot2docker VM would fail with "Text file busy" after trying to execute an injected bash script immediately after Either |
|
- On the server this issue occured: moby/moby#9547
- Same as for af0b516 See moby/moby#9547
I confirm that problem has not yet been solved, and for me the solution was to switch to overlay2 storage driver. Docker info:
Docker version:
|
When running pod ok k8s, I have an error : sh: /entrypoint.sh : Text file busy Looking in moby/moby#9547, I added a sync between the chmod and the script startup. After that, all my microservices started correctly
You might see the entrypoint script throw out errors like the following: ``` /usr/bin/mount: Text file busy ``` This is due to this bug (likely in AUFS): moby/moby#9547 This patch workarounds it by inserting a `sync` in between.
I am seeing this (in The machines all have Linux 4.4.0, though slightly different builds. There is one significant difference though:
So confirming this is an aufs issue. |
If possible, I would recommend switching to the default (overlay2) storage driver. To switch, the easiest way is to "clean" the docker storage that's in use (stopping the docker service, and removing |
This looks to be an issue with |
This modification fixes issues on slow arm SBCs where we may get a problem chmodding a file and then using it right after. Upstream bug: moby/moby#9547
Dockerfile contents are:
Contents of 'a.sh' are:
The file
a.sh
is already set to be executable.Contents of 'b.sh' are:
The file
b.sh
is not executable.When image is built and then run one gets the error:
What appears to be happening is that the execution of
chmod +x b.sh
just prior to trying to runningb.sh
is leaving it in the 'Text file busy' state for long enough that then running it fails.Docker version information is:
The text was updated successfully, but these errors were encountered: