Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic during libnetwork.(*resolver).Start #1405

Closed
bprodoehl opened this issue Aug 19, 2016 · 5 comments
Closed

panic during libnetwork.(*resolver).Start #1405

bprodoehl opened this issue Aug 19, 2016 · 5 comments

Comments

@bprodoehl
Copy link

Seeing this in Docker 1.12.0 after starting and stopping containers at random.

Aug 19 03:13:56 bpdev docker[31958]: panic: runtime error: invalid memory address or nil pointer dereference
Aug 19 03:13:56 bpdev docker[31958]: [signal 0xb code=0x1 addr=0x0 pc=0xdc714e]
Aug 19 03:13:56 bpdev docker[31958]: goroutine 707379 [running]:
Aug 19 03:13:56 bpdev docker[31958]: panic(0x1a74fa0, 0xc82000e090)
Aug 19 03:13:56 bpdev docker[31958]:         /usr/local/go/src/runtime/panic.go:481 +0x3e6
Aug 19 03:13:56 bpdev docker[31958]: github.com/miekg/dns.getUDPSocketName(0x0, 0x0, 0x0, 0x0, 0x0)
Aug 19 03:13:56 bpdev docker[31958]:         /usr/src/docker/vendor/src/github.com/miekg/dns/udp_linux.go:68 +0xce
Aug 19 03:13:56 bpdev docker[31958]: github.com/miekg/dns.setUDPSocketOptions(0x0, 0x0, 0x0)
Aug 19 03:13:56 bpdev docker[31958]:         /usr/src/docker/vendor/src/github.com/miekg/dns/udp.go:23 +0x37
Aug 19 03:13:56 bpdev docker[31958]: github.com/miekg/dns.(*Server).ActivateAndServe(0xc82394a750, 0x0, 0x0)
Aug 19 03:13:56 bpdev docker[31958]:         /usr/src/docker/vendor/src/github.com/miekg/dns/server.go:349 +0x1b7
Aug 19 03:13:56 bpdev docker[31958]: github.com/docker/libnetwork.(*resolver).Start.func1(0xc82394a750)
Aug 19 03:13:56 bpdev docker[31958]:         /usr/src/docker/vendor/src/github.com/docker/libnetwork/resolver.go:122 +0x21
Aug 19 03:13:56 bpdev docker[31958]: created by github.com/docker/libnetwork.(*resolver).Start
Aug 19 03:13:56 bpdev docker[31958]:         /usr/src/docker/vendor/src/github.com/docker/libnetwork/resolver.go:123 +0x2b1
$ docker version
Client:
 Version:      1.12.0
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   8eab29e
 Built:        Thu Jul 28 22:11:10 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.12.0
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   8eab29e
 Built:        Thu Jul 28 22:11:10 2016
 OS/Arch:      linux/amd64
$ 
$ docker info
Containers: 406
 Running: 0
 Paused: 0
 Stopped: 406
Images: 275
Server Version: 1.12.0
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 1222
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge null host overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: apparmor seccomp
Kernel Version: 4.4.0-31-generic
Operating System: Ubuntu 16.04.1 LTS
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 7.796 GiB
Name: bpdev
ID: 3MHJ:WX6N:WF77:HDFF:35W6:6GPW:4LKL:ZC6A:RNJF:6S7U:6STB:VXCR
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: bprodoehl
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Labels:
 provider=generic
Insecure Registries:
 127.0.0.0/8
$
@bprodoehl
Copy link
Author

I think this may be similar to #1117, but I'm seeing this in 1.12.0.

@sanimej
Copy link

sanimej commented Aug 19, 2016

@bprodoehl Can you give the specific steps you are using that results in this panic ?

@bprodoehl
Copy link
Author

I'll try to make a shell script that reproduces it. I see it regularly with a chaos script that uses the API to start or stop a private image at random. Probably the only interesting bits from the create options are that it's a privileged container that gets attached to a bridge-type network named "internet".

  var createOpts = {name: containerName,
                    Image: 'my/privateimage',
                    Tty: true,
                    HostConfig: {Privileged: true, NetworkMode: 'internet'},
                    Hostname: containerName,
                    Env: ['MYVAR='+containerName]};

@sanimej
Copy link

sanimej commented Nov 7, 2016

@bprodoehl If you were able to recreate it with a script can you share the script ? From the decode I am not able to come up with a clear sequence that can lead to the panic.

Do you have heathcheck enabled in your images ?

@aboch
Copy link
Contributor

aboch commented Nov 21, 2016

Fixed by #1561

@aboch aboch closed this as completed Nov 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants