Failed to start Docker or Raspbian Bullseye with "containerd.service: Main process exited, code=dumped, status=11/SEGV"

Hi,

I have a new Raspian Bullseye 32-bit lite build (updated and upgraded) on an old Pi v1 that I wanted to get a docker to run on for a simple application. However, when installing docker using the instructions for Raspian/Debian through using the repo at Install Docker Engine on Debian | Docker Documentation, there is an error when starting the service after the packages are unpacked:

Setting up containerd.io (1.6.10-1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/containerd.service → /lib/systemd/system/containerd.service.
Job for containerd.service failed because a fatal signal was delivered causing the control process to dump core.
See "systemctl status containerd.service" and "journalctl -xe" for details.
Setting up docker-compose-plugin (2.12.2~debian-bullseye) ...
Setting up libltdl7:armhf (2.4.6-15) ...
Setting up docker-ce-cli (5:20.10.21~3-0~debian-bullseye) ...
Setting up libslirp0:armhf (4.4.0-1+deb11u2) ...
Setting up docker-ce-rootless-extras (5:20.10.21~3-0~debian-bullseye) ...
Setting up slirp4netns (1.0.1-2) ...
Setting up docker-ce (5:20.10.21~3-0~debian-bullseye) ...
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /lib/systemd/system/docker.service.
Created symlink /etc/systemd/system/sockets.target.wants/docker.socket → /lib/systemd/system/docker.socket.
A dependency job for docker.service failed. See 'journalctl -xe' for details.
invoke-rc.d: initscript docker, action "start" failed.
● docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
     Active: inactive (dead)
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com

Dec 03 16:04:21 raspberrypi2 systemd[1]: Dependency failed for Docker Application Container Engine.
Dec 03 16:04:21 raspberrypi2 systemd[1]: docker.service: Job docker.service/start failed with result 'dependency'.
Dec 03 16:40:33 raspberrypi2 systemd[1]: Dependency failed for Docker Application Container Engine.
Dec 03 16:40:33 raspberrypi2 systemd[1]: docker.service: Job docker.service/start failed with result 'dependency'.
dpkg: error processing package docker-ce (--configure):
 installed docker-ce package post-installation script subprocess returned error exit status 1
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for libc-bin (2.31-13+rpt2+rpi1+deb11u5) ...
Errors were encountered while processing:
 docker-ce
E: Sub-process /usr/bin/dpkg returned an error code (1)

Checking the service, we see:

pi@raspberrypi2:~ $ systemctl status containerd.service
● containerd.service - containerd container runtime
     Loaded: loaded (/lib/systemd/system/containerd.service; enabled; vendor preset: enabled)
     Active: activating (auto-restart) (Result: core-dump) since Sat 2022-12-03 16:42:21 GMT; 784ms ago
       Docs: https://containerd.io
    Process: 4253 ExecStartPre=/sbin/modprobe overlay (code=exited, status=0/SUCCESS)
    Process: 4254 ExecStart=/usr/bin/containerd (code=dumped, signal=SEGV)
   Main PID: 4254 (code=dumped, signal=SEGV)
        CPU: 604ms

Dec 03 16:42:21 raspberrypi2 systemd[1]: containerd.service: Failed with result 'core-dump'.
Dec 03 16:42:21 raspberrypi2 systemd[1]: Failed to start containerd container runtime.

and the journal:

pi@raspberrypi2:~ $ journalctl -xe
░░ Subject: A stop job for unit containerd.service has finished
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ A stop job for unit containerd.service has finished.
░░ 
░░ The job identifier is 15282 and the job result is done.
Dec 03 16:44:08 raspberrypi2 systemd[1]: Starting containerd container runtime...
░░ Subject: A start job for unit containerd.service has begun execution
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ A start job for unit containerd.service has begun execution.
░░ 
░░ The job identifier is 15282.
Dec 03 16:44:09 raspberrypi2 systemd[1]: containerd.service: Main process exited, code=dumped, status=11/SEGV
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ An ExecStart= process belonging to unit containerd.service has exited.
░░ 
░░ The process' exit code is 'dumped' and its exit status is 11.
Dec 03 16:44:09 raspberrypi2 systemd[1]: containerd.service: Failed with result 'core-dump'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ The unit containerd.service has entered the 'failed' state with result 'core-dump'.
Dec 03 16:44:09 raspberrypi2 systemd[1]: Failed to start containerd container runtime.
░░ Subject: A start job for unit containerd.service has failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ A start job for unit containerd.service has finished with a failure.
░░ 
░░ The job identifier is 15282 and the job result is failed.
lines 7036-7072/7072 (END)

I tried to uninstall the docker components and reinstall, but I see the same issue.

I’m not sure if this is simply that a Pi v1 is not going to work with Docker, as Raspian Bullseye 32-bit is the underlying OS, I thought it would be fine.

Is there anything I’m missing?

Hmm, I decided to reboot the Pi and recheck the service. It looks a bit healthier, although their is still an error when looking at the status of the service (failed to initialize a tracing processor):

pi@raspberrypi2:~ $ systemctl status containerd.service
● containerd.service - containerd container runtime
     Loaded: loaded (/lib/systemd/system/containerd.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2022-12-03 18:17:29 GMT; 3min 55s ago
       Docs: https://containerd.io
    Process: 298 ExecStartPre=/sbin/modprobe overlay (code=exited, status=0/SUCCESS)
   Main PID: 311 (containerd)
      Tasks: 8
        CPU: 3.172s
     CGroup: /system.slice/containerd.service
             └─311 /usr/bin/containerd

Dec 03 18:17:29 raspberrypi2 containerd[311]: time="2022-12-03T18:17:29.301684000Z" level=info msg="loading plugin \"io.containerd.grpc.v1.tasks>
Dec 03 18:17:29 raspberrypi2 containerd[311]: time="2022-12-03T18:17:29.368896000Z" level=info msg="loading plugin \"io.containerd.grpc.v1.versi>
Dec 03 18:17:29 raspberrypi2 containerd[311]: time="2022-12-03T18:17:29.370122000Z" level=info msg="loading plugin \"io.containerd.tracing.proce>
Dec 03 18:17:29 raspberrypi2 containerd[311]: time="2022-12-03T18:17:29.371482000Z" level=info msg="skip loading plugin \"io.containerd.tracing.>
Dec 03 18:17:29 raspberrypi2 containerd[311]: time="2022-12-03T18:17:29.372347000Z" level=info msg="loading plugin \"io.containerd.internal.v1.t>
Dec 03 18:17:29 raspberrypi2 containerd[311]: time="2022-12-03T18:17:29.409502000Z" level=error msg="failed to initialize a tracing processor \">
Dec 03 18:17:29 raspberrypi2 containerd[311]: time="2022-12-03T18:17:29.637373000Z" level=info msg=serving... address=/run/containerd/containerd>
Dec 03 18:17:29 raspberrypi2 containerd[311]: time="2022-12-03T18:17:29.777422000Z" level=info msg=serving... address=/run/containerd/containerd>
Dec 03 18:17:29 raspberrypi2 systemd[1]: Started containerd container runtime.
Dec 03 18:17:29 raspberrypi2 containerd[311]: time="2022-12-03T18:17:29.833135000Z" level=info msg="containerd successfully booted in 5.097584s"

Output of journalctl -e -g docker since the last reboot shows:

-- Boot 8731960ce68c42ec97fe2e656b81cd67 --
Dec 03 18:17:12 raspberrypi2 systemd[1]: Starting Docker Socket for the API.
Dec 03 18:17:12 raspberrypi2 systemd[1]: Listening on Docker Socket for the API.
Dec 03 18:17:39 raspberrypi2 systemd[1]: Starting Docker Application Container Engine...
Dec 03 18:18:17 raspberrypi2 avahi-daemon[238]: Joining mDNS multicast group on interface docker0.IPv4 with address 172.17.0.1.
Dec 03 18:18:17 raspberrypi2 avahi-daemon[238]: New relevant interface docker0.IPv4 for mDNS.
Dec 03 18:18:17 raspberrypi2 avahi-daemon[238]: Registering new address record for 172.17.0.1 on docker0.IPv4.
Dec 03 18:18:18 raspberrypi2 dockerd[458]: time="2022-12-03T18:18:18.715241745Z" level=info msg="Default bridge (docker0) is assigned with an IP>
Dec 03 18:18:22 raspberrypi2 systemd[1]: var-lib-docker-overlay2-opaque\x2dbug\x2dcheck2322960799-merged.mount: Succeeded.
Dec 03 18:18:22 raspberrypi2 systemd[468]: var-lib-docker-overlay2-opaque\x2dbug\x2dcheck2322960799-merged.mount: Succeeded.
Dec 03 18:18:22 raspberrypi2 dockerd[458]: time="2022-12-03T18:18:22.507419745Z" level=info msg="Docker daemon" commit=3056208 graphdriver(s)=ov>
Dec 03 18:18:23 raspberrypi2 systemd[1]: Started Docker Application Container Engine.
Dec 03 18:18:24 raspberrypi2 dockerd[458]: time="2022-12-03T18:18:24.902877745Z" level=info msg="API listen on /run/docker.sock"

All in all, then, I’m not exactly sure if this is good or not.