{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/9547","labels_url":"https://api.github.com/repos/docker/docker/issues/9547/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/9547/comments","events_url":"https://api.github.com/repos/docker/docker/issues/9547/events","html_url":"https://github.com/docker/docker/issues/9547","id":51213350,"number":9547,"title":"Running chmod on file results in 'text file busy' when running straight after.","user":{"login":"GrahamDumpleton","id":507637,"avatar_url":"https://avatars.githubusercontent.com/u/507637?v=3","gravatar_id":"","url":"https://api.github.com/users/GrahamDumpleton","html_url":"https://github.com/GrahamDumpleton","followers_url":"https://api.github.com/users/GrahamDumpleton/followers","following_url":"https://api.github.com/users/GrahamDumpleton/following{/other_user}","gists_url":"https://api.github.com/users/GrahamDumpleton/gists{/gist_id}","starred_url":"https://api.github.com/users/GrahamDumpleton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrahamDumpleton/subscriptions","organizations_url":"https://api.github.com/users/GrahamDumpleton/orgs","repos_url":"https://api.github.com/users/GrahamDumpleton/repos","events_url":"https://api.github.com/users/GrahamDumpleton/events{/privacy}","received_events_url":"https://api.github.com/users/GrahamDumpleton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2014-12-07T10:01:00Z","updated_at":"2015-04-07T23:52:48Z","closed_at":null,"body":"Dockerfile contents are:\r\n\r\n```\r\nFROM debian\r\nWORKDIR /app\r\nCOPY . /app\r\nCMD [ \"/app/a.sh\" ]\r\n```\r\n\r\nContents of 'a.sh' are:\r\n\r\n```\r\n#!/bin/sh\r\necho 'A'\r\nsh /app/b.sh 1\r\nchmod +x /app/b.sh\r\n/app/b.sh 2\r\n```\r\n\r\nThe file ``a.sh`` is already set to be executable.\r\n\r\nContents of 'b.sh' are:\r\n\r\n```\r\n#!/bin/sh\r\necho 'B', $@\r\n```\r\n\r\nThe file ``b.sh`` is not executable.\r\n\r\nWhen image is built and then run one gets the error:\r\n\r\n```\r\n$ docker run --rm busy-text-file\r\nA\r\nB, 1\r\n/app/a.sh: 5: /app/a.sh: /app/b.sh: Text file busy\r\n```\r\n\r\nWhat appears to be happening is that the execution of ``chmod +x b.sh`` just prior to trying to running ``b.sh`` is leaving it in the 'Text file busy' state for long enough that then running it fails.\r\n\r\nDocker version information is:\r\n\r\n```\r\nClient version: 1.3.2\r\nClient API version: 1.15\r\nGo version (client): go1.3.3\r\nGit commit (client): 39fa2fa\r\nOS/Arch (client): darwin/amd64\r\nServer version: 1.3.1\r\nServer API version: 1.15\r\nGo version (server): go1.3.3\r\nGit commit (server): 4e9bbfa\r\n```\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/90763723","html_url":"https://github.com/docker/docker/issues/9547#issuecomment-90763723","issue_url":"https://api.github.com/repos/docker/docker/issues/9547","id":90763723,"user":{"login":"ghmlee","id":2618612,"avatar_url":"https://avatars.githubusercontent.com/u/2618612?v=3","gravatar_id":"","url":"https://api.github.com/users/ghmlee","html_url":"https://github.com/ghmlee","followers_url":"https://api.github.com/users/ghmlee/followers","following_url":"https://api.github.com/users/ghmlee/following{/other_user}","gists_url":"https://api.github.com/users/ghmlee/gists{/gist_id}","starred_url":"https://api.github.com/users/ghmlee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghmlee/subscriptions","organizations_url":"https://api.github.com/users/ghmlee/orgs","repos_url":"https://api.github.com/users/ghmlee/repos","events_url":"https://api.github.com/users/ghmlee/events{/privacy}","received_events_url":"https://api.github.com/users/ghmlee/received_events","type":"User","site_admin":false},"created_at":"2015-04-07T23:52:48Z","updated_at":"2015-04-07T23:52:48Z","body":"Containers: 3\r\nImages: 46\r\nStorage Driver: aufs\r\n Root Dir: /mnt/sda1/var/lib/docker/aufs\r\n Backing Filesystem: extfs\r\n Dirs: 52\r\nExecution Driver: native-0.2\r\nKernel Version: 3.18.5-tinycore64\r\nOperating System: Boot2Docker 1.5.0 (TCL 5.4); master : a66bce5 - Tue Feb 10 23:31:27 UTC 2015\r\nCPUs: 4\r\nTotal Memory: 1.961 GiB\r\nName: boot2docker\r\nID: NHSE:2QWD:3R7W:D6D3:U42I:T72B:N67E:MNRB:FZVZ:ZEFB:6QDU:SRAU\r\nDebug mode (server): true\r\nDebug mode (client): false\r\nFds: 12\r\nGoroutines: 16\r\nEventsListeners: 0\r\nInit Path: /usr/local/bin/docker\r\nDocker Root Dir: /mnt/sda1/var/lib/docker"}}