Docker run results in "ttrpc: closed: unknown"

I have docker 20.1.7 and containerd 1.5.2 installed on Arch Linux. Any attempt to run a container results in an error “ttrpc: closed: unknown”. Right now this is affecting my ability to build even a simple image, since the commands to run in the container can’t be executed.

Here’s my build command and output:

[dan@plinker docker]$ docker build --tag test -f Dockerfile .
Sending build context to Docker daemon  6.144kB
Step 1/3 : FROM debian:buster
 ---> 7a4951775d15
Step 2/3 : RUN apt-get update &&     apt-get upgrade -y
 ---> Running in aaf5a6c28b2b
ttrpc: closed: unknown

Here’s my test Dockerfile:

FROM debian:buster

RUN apt-get update && \
    apt-get upgrade -y

RUN apt-get install -y \
    apt-utils

You can see, it’s the first RUN command that is prompting the issue. I’ve seen problems like this in google searches, but they all seem to be older versions of containerd.

Has anyone seen this recently?

Further information: This appears to happen with back-versions of containerd, all the way back to 1.4.0. Since I’ve been successfully building and running images for a long time, I don’t think this is a containerd bug.

But what else can I check?

Even the simple command

docker run -it --rm debian bash -c "echo hello world"

Results in this error. I’ve tried removing and re-installing docker and docker-compose (with their dependencies, containerd, runc, etc.)

Does nobody else have this issue?

Figured it out!

I have no recollection why, but I had a version (probably old one) of containerd-shim in /usr/local/bin. This was masking the official one in /usr/bin.