title: Docker container with status "Dead" after consul healthcheck runs
body: <p>I am using consul's healthcheck feature, and I keep getting these these "dead" containers: </p>
  
  <pre><code>CONTAINER ID  IMAGE                   COMMAND              CREATED         STATUS              PORTS                                                                                                                                                                    NAMES
  20fd397ba638  progrium/consul:latest  "\"/bin/bash -c 'cur 15 minutes ago  Dead
  </code></pre>
  
  <p>What is exactly a "Dead" container? When does a stopped container become "Dead"?</p>
  
  <p>For the record, I run progrium/consul + gliderlabs/registrator images + SERVICE_XXXX_CHECK env variables to do health checking. It runs a healthcheck script running an image every X secs, something like <code>docker run --rm my/img healthcheck.sh</code></p>
  
  <p>I'm interested in general to what "dead" means and how to prevent it from happening. Another peculiar thing is that my dead containers have no name.</p>
  
  <p>this is some info from the container inspection:</p>
  
  <pre><code>  "State": {
          "Dead": true,
          "Error": "",
          "ExitCode": 1,
          "FinishedAt": "2015-05-30T19:00:01.814291614Z",
          "OOMKilled": false,
          "Paused": false,
          "Pid": 0,
          "Restarting": false,
          "Running": false,
          "StartedAt": "2015-05-30T18:59:51.739464262Z"
      },
  </code></pre>
  
  <p>The strange thing is that only every now and then a container becomes dead and isn't removed. </p>
  
  <p>Thank you</p>
  
  <p>Edit:
  Looking at the logs, I found what makes the container stop fail:</p>
  
  <pre><code>  Handler for DELETE /containers/{name:.*} returned error: Cannot destroy container 003876e41429013e46187ebcf6acce1486bc5011435c610bd163b159ba550fbc: 
  Driver aufs failed to remove root filesystem 003876e41429013e46187ebcf6acce1486bc5011435c610bd163b159ba550fbc: 
  rename /var/lib/docker/aufs/diff/003876e41429013e46187ebcf6acce1486bc5011435c610bd163b159ba550fbc 
  /var/lib/docker/aufs/ diff/003876e41429013e46187ebcf6acce1486bc5011435c610bd163b159ba550fbc-removing: 
  device or resource busy
  </code></pre>
  
  <p>Why does this happen?</p>
  
  <p>edit2:
  found this: <a href="https://github.com/docker/docker/issues/9665">https://github.com/docker/docker/issues/9665</a></p>