{"action":"closed","issue":{"url":"https://api.github.com/repos/docker/docker/issues/21969","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/21969/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/21969/comments","events_url":"https://api.github.com/repos/docker/docker/issues/21969/events","html_url":"https://github.com/docker/docker/issues/21969","id":147904224,"number":21969,"title":"Remove container fails on 1.11 due to root filesystem busy when any container mounts host /var/run - regression","user":{"login":"dhiltgen","id":4033016,"avatar_url":"https://avatars.githubusercontent.com/u/4033016?v=3","gravatar_id":"","url":"https://api.github.com/users/dhiltgen","html_url":"https://github.com/dhiltgen","followers_url":"https://api.github.com/users/dhiltgen/followers","following_url":"https://api.github.com/users/dhiltgen/following{/other_user}","gists_url":"https://api.github.com/users/dhiltgen/gists{/gist_id}","starred_url":"https://api.github.com/users/dhiltgen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhiltgen/subscriptions","organizations_url":"https://api.github.com/users/dhiltgen/orgs","repos_url":"https://api.github.com/users/dhiltgen/repos","events_url":"https://api.github.com/users/dhiltgen/events{/privacy}","received_events_url":"https://api.github.com/users/dhiltgen/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/kind/bug","name":"kind/bug","color":"FF8C94"},{"url":"https://api.github.com/repos/docker/docker/labels/priority/P2","name":"priority/P2","color":"fad8c7"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/docker/docker/milestones/54","html_url":"https://github.com/docker/docker/milestones/1.11.1","labels_url":"https://api.github.com/repos/docker/docker/milestones/54/labels","id":1705023,"number":54,"title":"1.11.1","description":"","creator":{"login":"tiborvass","id":827131,"avatar_url":"https://avatars.githubusercontent.com/u/827131?v=3","gravatar_id":"","url":"https://api.github.com/users/tiborvass","html_url":"https://github.com/tiborvass","followers_url":"https://api.github.com/users/tiborvass/followers","following_url":"https://api.github.com/users/tiborvass/following{/other_user}","gists_url":"https://api.github.com/users/tiborvass/gists{/gist_id}","starred_url":"https://api.github.com/users/tiborvass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiborvass/subscriptions","organizations_url":"https://api.github.com/users/tiborvass/orgs","repos_url":"https://api.github.com/users/tiborvass/repos","events_url":"https://api.github.com/users/tiborvass/events{/privacy}","received_events_url":"https://api.github.com/users/tiborvass/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":26,"state":"open","created_at":"2016-04-14T01:56:12Z","updated_at":"2016-04-23T11:45:34Z","due_on":"2016-04-26T07:00:00Z","closed_at":null},"comments":21,"created_at":"2016-04-12T23:39:00Z","updated_at":"2016-04-23T11:45:34Z","closed_at":"2016-04-23T11:45:34Z","body":"Something changed between commits c48439a...dd51e85 in 1.11 development where the daemon now fails removal of containers in some circumstances.  I haven't managed to figure out exactly what is unique about our use-case that triggers the failure yet.  Here's what I do know:\r\n\r\n* We've seen it fail primarily on AWS.\r\n* It fails with aufs and devicemapper (tested with debian AMIs and centos AMIs)\r\n* I have repro'd on debian running under KVM (but not with boot2docker+machine)\r\n* Our use-case is a bit complicated and involves a container mounting the docker.sock and spawning a second container with various additional volume/host mounts, which in turn attempts to stop/remove containers that share some of the same volume mounts.  It seems some portion of this is required to trigger this failure mode, as running `docker stop` and `docker rm` by hand works without failure.\r\n\r\nI've been attempting a `git bisect` on the docker/docker tree to find the exact commit that broke it but I'm having some challenges as the containerd integration was going through churn during this timeframe so many commits aren't yielding a testable setup for me.\r\n\r\nExamples from the client's perspective: \r\n```\r\nDEBU[0000] daemon reported: Error response from daemon: Driver aufs failed to remove root filesystem 25693d520e87d334fedbfd8f1bc31748be35cae690ab3e1f8fad0c79a5ca3946: rename /var/lib/docker/aufs/diff/7aa440b05939346200bec909079a4e280303dfebd6898c665ed119b537f7c3ed /var/lib/docker/aufs/diff/7aa440b05939346200bec909079a4e280303dfebd6898c665ed119b537f7c3ed-removing: device or resource busy \r\n```\r\n\r\nWhat you see on the damon log:\r\n```\r\nApr 12 23:28:13 dh-manual-test1 docker[29379]: time=\"2016-04-12T23:28:13.135946618Z\" level=error msg=\"Error removing mounted layer 25693d520e87d334fedbfd8f1bc31748be35cae690ab3e1f8fad0c79a5ca3946: rename /var/lib/docker/aufs/diff/7aa440b05939346200bec909079a4e280303dfebd6898c665ed119b537f7c3ed /var/lib/docker/aufs/diff/7aa440b05939346200bec909079a4e280303dfebd6898c665ed119b537f7c3ed-removing: device or resource busy\"\r\nApr 12 23:28:13 dh-manual-test1 docker[29379]: time=\"2016-04-12T23:28:13.136021604Z\" level=error msg=\"Handler for DELETE /containers/25693d520e87d334fedbfd8f1bc31748be35cae690ab3e1f8fad0c79a5ca3946 returned error: Driver aufs failed to remove root filesystem 25693d520e87d334fedbfd8f1bc31748be35cae690ab3e1f8fad0c79a5ca3946: rename /var/lib/docker/aufs/diff/7aa440b05939346200bec909079a4e280303dfebd6898c665ed119b537f7c3ed /var/lib/docker/aufs/diff/7aa440b05939346200bec909079a4e280303dfebd6898c665ed119b537f7c3ed-removing: device or resource busy\"\r\n```\r\n\r\nI'll continue my investigation and update this issue as I uncover more details."}}