{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/18329","labels_url":"https://api.github.com/repos/docker/docker/issues/18329/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/18329/comments","events_url":"https://api.github.com/repos/docker/docker/issues/18329/events","html_url":"https://github.com/docker/docker/pull/18329","id":119691240,"number":18329,"title":"Fix rm container error in aufs and devicemapper after daemon crash","user":{"login":"liusdu","id":1199332,"avatar_url":"https://avatars.githubusercontent.com/u/1199332?v=3","gravatar_id":"","url":"https://api.github.com/users/liusdu","html_url":"https://github.com/liusdu","followers_url":"https://api.github.com/users/liusdu/followers","following_url":"https://api.github.com/users/liusdu/following{/other_user}","gists_url":"https://api.github.com/users/liusdu/gists{/gist_id}","starred_url":"https://api.github.com/users/liusdu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liusdu/subscriptions","organizations_url":"https://api.github.com/users/liusdu/orgs","repos_url":"https://api.github.com/users/liusdu/repos","events_url":"https://api.github.com/users/liusdu/events{/privacy}","received_events_url":"https://api.github.com/users/liusdu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/status/1-design-review","name":"status/1-design-review","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/docker/docker/milestones/44","html_url":"https://github.com/docker/docker/milestones/1.10","labels_url":"https://api.github.com/repos/docker/docker/milestones/44/labels","id":1351533,"number":44,"title":"1.10","description":"","creator":{"login":"thaJeztah","id":1804568,"avatar_url":"https://avatars.githubusercontent.com/u/1804568?v=3","gravatar_id":"","url":"https://api.github.com/users/thaJeztah","html_url":"https://github.com/thaJeztah","followers_url":"https://api.github.com/users/thaJeztah/followers","following_url":"https://api.github.com/users/thaJeztah/following{/other_user}","gists_url":"https://api.github.com/users/thaJeztah/gists{/gist_id}","starred_url":"https://api.github.com/users/thaJeztah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thaJeztah/subscriptions","organizations_url":"https://api.github.com/users/thaJeztah/orgs","repos_url":"https://api.github.com/users/thaJeztah/repos","events_url":"https://api.github.com/users/thaJeztah/events{/privacy}","received_events_url":"https://api.github.com/users/thaJeztah/received_events","type":"User","site_admin":false},"open_issues":16,"closed_issues":26,"state":"open","created_at":"2015-10-12T18:21:55Z","updated_at":"2015-12-02T22:01:34Z","due_on":null,"closed_at":null},"comments":13,"created_at":"2015-12-01T10:49:28Z","updated_at":"2015-12-03T14:47:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/18329","html_url":"https://github.com/docker/docker/pull/18329","diff_url":"https://github.com/docker/docker/pull/18329.diff","patch_url":"https://github.com/docker/docker/pull/18329.patch"},"body":"This patchset is simaler to 3916561619d45a3d8ca17dfa467149824111023a(Fix Put without Get in overlay).\r\n\r\nIf there are running containers when daemon crash. After daemon restarts. We can not remove containers due to \"device is busy\"  in aufs and devicemapper.\r\n#### Take devicemapper as an example.\r\n*  Run a container\r\n```bash\r\n# docker run -tid busybox sh\r\nfdca994bec2100335c912d56540acc6df271b36b2554270c606836277e159e15\r\n```\r\n*  kill daemon and restart\r\n```bash\r\n# killall  -9 docker\r\n# docker daemon -s devicemapper \r\nERRO[0001] Error unmounting container fdca994bec2100335c912d56540acc6df271b36b2554270c606836277e159e15: UnmountDevice: device not-mounted id 780117718cc91335dc4c7fb4e3246f9b06fbeff654782c9ff0277555c21d437e\r\n```\r\n* Then I can not remove container `fdca994bec21`\r\n```bash\r\n docker rm -f fdca994bec21\r\nError response from daemon: Driver devicemapper failed to remove root filesystem fdca994bec2100335c912d56540acc6df271b36b2554270c606836277e159e15: Device is Busy\r\nError: failed to remove containers: [fdca994bec21]\r\n```\r\n\r\nGuys in issue #4036 has encountered this problem.\r\n\r\n\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/161660766","html_url":"https://github.com/docker/docker/pull/18329#issuecomment-161660766","issue_url":"https://api.github.com/repos/docker/docker/issues/18329","id":161660766,"user":{"login":"liusdu","id":1199332,"avatar_url":"https://avatars.githubusercontent.com/u/1199332?v=3","gravatar_id":"","url":"https://api.github.com/users/liusdu","html_url":"https://github.com/liusdu","followers_url":"https://api.github.com/users/liusdu/followers","following_url":"https://api.github.com/users/liusdu/following{/other_user}","gists_url":"https://api.github.com/users/liusdu/gists{/gist_id}","starred_url":"https://api.github.com/users/liusdu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liusdu/subscriptions","organizations_url":"https://api.github.com/users/liusdu/orgs","repos_url":"https://api.github.com/users/liusdu/repos","events_url":"https://api.github.com/users/liusdu/events{/privacy}","received_events_url":"https://api.github.com/users/liusdu/received_events","type":"User","site_admin":false},"created_at":"2015-12-03T14:47:06Z","updated_at":"2015-12-03T14:47:06Z","body":"Thanks @rhvgoyal !\r\n ping @LK4D4  @crosbymichael , I fix an issue very similar to  #13325. So can you please review aufs part?"}}