Skip to content

PANIC due to a nil pointer derefence or illegal memory address during whatever looks to be an internal "clean networks up" operation. #42645

@vatine

Description

@vatine

BUG REPORT INFORMATION

Use the commands below to provide key information from your environment:
You do NOT have to include this information if this is a FEATURE REQUEST

Description

Docker daemon crashed with a nil pointer dereference or invalid memory address. Thankfull, systemd restarted it essentially at once, but it is still not great when this happens.

Steps to reproduce the issue:
I have no reproduction steps, apart from possibly "let it run for a while". Looking at the logs, I can see that we saw this happening 21 times over 4 hours.

Describe the results you received:

Describe the results you expected:

Additional information you deem important (e.g. issue happens only occasionally):
This is the relevant logs from journald:

<redacted> dockerd[90949]: panic: runtime error: invalid memory address or nil pointer dereference
<redacted> dockerd[90949]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x5599e4acc8b8]
<redacted> dockerd[90949]: goroutine 1129 [running]:
<redacted> dockerd[90949]: github.com/armon/go-radix.recursiveWalk(0x0, 0xc004815e08, 0xc004815c00)
<redacted> dockerd[90949]:         /build/docker.io-sMo5uP/docker.io-18.09.1+dfsg1/.gopath/src/github.com/armon/go-radix/radix.go:519 +0x28
<redacted> dockerd[90949]: github.com/armon/go-radix.recursiveWalk(0xc0012349f0, 0xc004815e08, 0xc004815cc0)
<redacted> dockerd[90949]:         /build/docker.io-sMo5uP/docker.io-18.09.1+dfsg1/.gopath/src/github.com/armon/go-radix/radix.go:525 +0x7a
<redacted> dockerd[90949]: github.com/armon/go-radix.recursiveWalk(0xc0018c8bd0, 0xc004815e08, 0x19)
<redacted> dockerd[90949]:         /build/docker.io-sMo5uP/docker.io-18.09.1+dfsg1/.gopath/src/github.com/armon/go-radix/radix.go:525 +0x7a
<redacted> dockerd[90949]: github.com/armon/go-radix.(*Tree).WalkPrefix(0xc003680650, 0xc000c87540, 0x1a, 0xc004815e08)
<redacted> dockerd[90949]:         /build/docker.io-sMo5uP/docker.io-18.09.1+dfsg1/.gopath/src/github.com/armon/go-radix/radix.go:473 +0xdb
<redacted> dockerd[90949]: github.com/docker/libnetwork/networkdb.(*NetworkDB).reapTableEntries(0xc0034ebd40)
<redacted> dockerd[90949]:         /build/docker.io-sMo5uP/docker.io-18.09.1+dfsg1/.gopath/src/github.com/docker/libnetwork/networkdb/cluster.go:396 +0x3c5
<redacted> dockerd[90949]: github.com/docker/libnetwork/networkdb.(*NetworkDB).reapState(0xc0034ebd40)
<redacted> dockerd[90949]:         /build/docker.io-sMo5uP/docker.io-18.09.1+dfsg1/.gopath/src/github.com/docker/libnetwork/networkdb/cluster.go:362 +0x2d
<redacted> dockerd[90949]: github.com/docker/libnetwork/networkdb.(*NetworkDB).reapState-fm()
<redacted> dockerd[90949]:         /build/docker.io-sMo5uP/docker.io-18.09.1+dfsg1/.gopath/src/github.com/docker/libnetwork/networkdb/cluster.go:170 +0x2c
<redacted> dockerd[90949]: github.com/docker/libnetwork/networkdb.(*NetworkDB).triggerFunc(0xc0034ebd40, 0x12a05f200, 0xc00069d2c0, 0xc003680a90)
<redacted> dockerd[90949]:         /build/docker.io-sMo5uP/docker.io-18.09.1+dfsg1/.gopath/src/github.com/docker/libnetwork/networkdb/cluster.go:256 +0x10a
<redacted> dockerd[90949]: created by github.com/docker/libnetwork/networkdb.(*NetworkDB).clusterInit
<redacted> dockerd[90949]:         /build/docker.io-sMo5uP/docker.io-18.09.1+dfsg1/.gopath/src/github.com/docker/libnetwork/networkdb/cluster.go:178 +0x830
<redacted> systemd[1]: docker.service: Main process exited, code=exited, status=2/INVALIDARGUMENT

Output of docker version:

Client:
 Version:           18.09.1
 API version:       1.39
 Go version:        go1.11.6
 Git commit:        4c52b90
 Built:             Sun, 21 Feb 2021 18:18:35 +0100
 OS/Arch:           linux/amd64
 Experimental:      false

Server:
 Engine:
  Version:          18.09.1
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.11.6
  Git commit:       4c52b90
  Built:            Sun Feb 21 17:18:35 2021
  OS/Arch:          linux/amd64
  Experimental:     false

Output of docker info:

Containers: 25
 Running: 5
 Paused: 0
 Stopped: 20
Images: 10
Server Version: 18.09.1
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: active
 NodeID: zu5gu3fv2t2ywadvullbjd68d
 Is Manager: true
 ClusterID: wxpnvlw4v261yqyypostfkzd7
 Managers: 6
 Nodes: 6
 Default Address Pool: 10.0.0.0/8  
 SubnetSize: 24
 Orchestration:
  Task History Retention Limit: 5
 Raft:
  Snapshot Interval: 10000
  Number of Old Snapshots to Retain: 0
  Heartbeat Tick: 1
  Election Tick: 10
 Dispatcher:
  Heartbeat Period: 5 seconds
 CA Configuration:
  Expiry Duration: 3 months
  Force Rotate: 0
 Autolock Managers: false
 Root Rotation In Progress: false
 Node Address: <ip>
 Manager Addresses:
  <ip>:2377
  <ip>:2377
  <ip>:2377
  <ip>:2377
  <ip>:2377
  <ip>:2377
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 9754871865f7fe2f4e74d43e2fc7ccd237edcbce
runc version: 1.0.0~rc6+dfsg1-3
init version: v0.18.0 (expected: fec3683b971d9c3ef73f284f176672c44b448662)
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.19.0-14-cloud-amd64
Operating System: Debian GNU/Linux 10 (buster)
OSType: linux
Architecture: x86_64
CPUs: 36
Total Memory: 58.96GiB
Name: ip-10-155-0-9
ID: JDJ2:PJB5:GP6R:WLUT:YEYG:447J:YC52:PCNP:GJUO:NJX6:U4JY:CDYB
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: <redacted>
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

Additional environment details (AWS, VirtualBox, physical, etc.):
AWS, Debian

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions