docker.io inspect shows docker pid as 0

Bug #1362423 reported by Alan Robertson
6
This bug affects 1 person
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-instance-name

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.13183-00107/897886a7ad01 [0]

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://hg.linux-ha.org/assimilation/file/tip/cma/systemtests/docker.py

$ 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
ProcVersionSignature: Ubuntu 3.13.0-32.57-generic 3.13.11.4
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_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: docker.io
UpgradeStatus: No upgrade log present (probably fresh install)
mtime.conffile..etc.init.docker.io.conf: 2014-06-26T14:53:37.308799

Revision history for this message
Alan Robertson (alanr-unix) wrote :
Revision history for this message
Tianon Gravi (tianon) wrote :

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.

Revision history for this message
Alan Robertson (alanr-unix) wrote :

Is this something you expect me to report upstream? [for some reason I thought you folks would do this if it needs doing].

I don't mind testing against newer versions of docker. They already fixed a previous NAT/firewall error I'd reported (but it's not in Trusty yet).

 I'll look into testing against your version.

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Did this ever go upstream? 18 months later I'm sort of suspecting it's been fixed.

Revision history for this message
Alan Robertson (alanr-unix) wrote : Re: [Bug 1362423] Re: docker.io inspect shows docker pid as 0

I have no idea. I'll try and test that next week. I'm at a conference
today and tomorrow (presenting today).

On 04/21/2016 04:42 AM, Michael Hudson-Doyle wrote:
> Did this ever go upstream? 18 months later I'm sort of suspecting it's
> been fixed.
>

--

Alan Robertson / CTO
<email address hidden> <mailto:<email address hidden>>/ +1
303.947.7999

Assimilation Systems Limited
http://AssimilationSystems.com

Twitter <https://twitter.com/ossalanr> Linkedin
<https://www.linkedin.com/in/alanr> skype
<https://htmlsig.com/skype?username=alanr_unix.sh>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.