docker.io inspect shows docker pid as 0
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
docker.io (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
I'm doing a bunch of testing with dozens to hundreds of Docker containers. In the process, I gather the pid, hostname, etc. for each docker instance as I spawn it so I can control what is going on in those containers.
Every so often (that is every few thousand containers), I get one which the State.Pid is "0" - and remains zero. It seems to happen more often when I spawn a lot of them (like 200) as fast as I can.
Here's the command I use to get the pid:
docker.io 'inspect' '--format' '{{.State.Pid}}' docker-
This almost always works, but occasionally it doesn't -- and returns a line containing only "0". I retry every second for 100 seconds just in case it's a transient error. It's not.
Since it takes a long time to spawn 200 containers and even longer to shut them down (like 5 seconds each), this *really* puts a kink in my testing.
Here's the output from my code when it encounters this condition:
.State.Pid is currently zero for instance DockerSystem.
The string in [] at the end of the line is the contents of what I read from the docker.io inspect command listed above. So, it's not an empty string being treated as or converted to a zero. It's a "0" string. The code I'm using to manage these docker instances is here: http://
$ docker.io --version
Docker version 0.9.1, build 3600720
I'm running Ubuntu 14.04.
Hopefully all this stuff (and a lot more) showed up in the data gathered by the ubuntu-bug command.
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: docker.io 0.9.1~dfsg1-2
ProcVersionSign
Uname: Linux 3.13.0-32-generic x86_64
ApportVersion: 2.14.1-0ubuntu2
Architecture: amd64
Date: Wed Aug 27 22:57:50 2014
InstallationDate: Installed on 2014-04-03 (146 days ago)
InstallationMedia: Ubuntu-Server 14.04 LTS "Trusty Tahr" - Beta amd64 (20140326)
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: docker.io
UpgradeStatus: No upgrade log present (probably fresh install)
mtime.conffile.
This would probably be good to report upstream. It might also be wise (and they'll request it upstream) to test it against 1.2.0 (or at least 1.0.1, which was pushed into utopic and is in trusty-updates too).
Paul and I have also been playing with nightly builds of the docker.io package at https:/ /launchpad. net/~docker- maint/+ archive/ ubuntu/ testing which is an option if you want to test against roughly upstream master.