amazon-eks-ami: bug(containerd@1.7.27): core dump leak with CrowdStrike, ctr

Description

We have recently moved to EKS AMI Release v20250403 from AMI Release v20250317. This change updates Containerd from 1.7.25 to 1.7.27. After this change, several core dumps have been dropped on the nodes. This results in ephemeral storage being used up and non-essential pods being evicted.

# ls -ltr /
total 4728528
drwxr-xr-x.   2 root root         6 Apr  9  2019 srv
drwxr-xr-x.   2 root root         6 Apr  9  2019 mnt
drwxr-xr-x.   2 root root         6 Apr  9  2019 media
drwxr-xr-x.   2 root root         6 Mar 28 18:42 local
lrwxrwxrwx.   1 root root         8 Mar 28 18:43 sbin -> usr/sbin
lrwxrwxrwx.   1 root root         9 Mar 28 18:43 lib64 -> usr/lib64
lrwxrwxrwx.   1 root root         7 Mar 28 18:43 lib -> usr/lib
lrwxrwxrwx.   1 root root         7 Mar 28 18:43 bin -> usr/bin
drwxr-xr-x.  13 root root       155 Mar 28 18:43 usr
dr-xr-xr-x.   4 root root      4096 Apr  3 20:55 boot
drwxr-xr-x.   3 root root        19 Apr  8 01:55 prod
drwxr-xr-x.  16 root root       239 Apr  8 02:01 opt
drwxr-xr-x.   6 root root        70 Apr  9 21:52 home
drwxr-xr-x.  86 root root      8192 Apr  9 21:52 etc
drwxr-xr-x.  23 root root      4096 Apr  9 22:22 var
drwxr-x---.   4 root root       182 Apr  9 23:23 root
-rw-------.   1 root root 104206336 Apr  9 23:34 core.85402
-rw-------.   1 root root 104206336 Apr  9 23:34 core.85426
-rw-------.   1 root root 104206336 Apr  9 23:34 core.85439
-rw-------.   1 root root 104206336 Apr  9 23:34 core.85594
-rw-------.   1 root root 104206336 Apr  9 23:34 core.85604
-rw-------.   1 root root 104206336 Apr  9 23:34 core.85610
-rw-------.   1 root root 104206336 Apr  9 23:34 core.85616
-rw-------.   1 root root 104206336 Apr  9 23:34 core.85622
... x many many more
-rw-------.   1 root root 104206336 Apr 10 01:52 core.287905
-rw-------.   1 root root 104206336 Apr 10 01:57 core.295770
-rw-------.   1 root root 104206336 Apr 10 01:57 core.295787
-rw-------.   1 root root 104206336 Apr 10 01:57 core.295806
-rw-------.   1 root root 104206336 Apr 10 01:57 core.295817
-rw-------.   1 root root 104206336 Apr 10 01:57 core.295826
-rw-------.   1 root root 104206336 Apr 10 01:57 core.295840
-rw-------.   1 root root 104071168 Apr 10 01:57 core.295855

Upon debugging the core dumps we get the following output:

Core was generated by `/usr/bin/ctr -a /run/containerd/containerd.sock -n k8s.io c info b7431ab9ed8974'.
Program terminated with signal SIGSYS, Bad system call.

We have found that the core dumps are only created upon a pod creation.

Re-installing 1.7.25 fixes the issue.

Steps to reproduce the issue

  1. Create EKS cluster with latest EKS AMI
  2. Launch workloads until cluster nodes are full
  3. SSH into instances to see /core.* files

Fix:

  1. Reinstall 1.7.25
  2. Delete /core.* files
  3. Launch more pods

Describe the results you received and expected

I would not expect these core dumps to happen. I am uncertain what exactly is occurring within containerd to invoke ctr.

What version of containerd are you using?

1.7.27

Any other relevant information

Runc:

runc version 1.1.14
commit: 2c9f5602f0ba3d9da1c2596322dfc4e156844890
spec: 1.0.2-dev
go: go1.22.7
libseccomp: 2.5.2

uname

Linux ip-10-121-152-211.dqa.capitalone.com 5.10.234-225.921.amzn2.x86_64 #1 SMP Tue Mar 25 21:34:29 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Show configuration if it is related to CRI plugin.

version = 2
root = "/var/lib/containerd"
state = "/run/containerd"
imports = ["/etc/containerd/config.d/*.toml"]

[grpc]
address = "/run/containerd/containerd.sock"

[plugins."io.containerd.grpc.v1.cri".containerd]
default_runtime_name = "runc"
discard_unpacked_layers = true

[plugins."io.containerd.grpc.v1.cri"]
sandbox_image = "artifactory-edge-staging.cloud.capitalone.com/ba3rdpartycontainerimagecurator-docker/eks-distro-kubernetes-pause:v1.30.9-eks-1-30-24-202502121035"

[plugins."io.containerd.grpc.v1.cri".registry]
config_path = "/etc/containerd/certs.d:/etc/docker/certs.d"

[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
runtime_type = "io.containerd.runc.v2"

[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
SystemdCgroup = true

[plugins."io.containerd.grpc.v1.cri".cni]
bin_dir = "/opt/cni/bin"
conf_dir = "/etc/cni/net.d"

Environment:

  • AWS Region: us-west-2
  • Instance Type(s): m5.2xlarge
  • Cluster Kubernetes version: 1.30 & 1.31
  • Node Kubernetes version: 1.30 & 1.31
  • AMI Version: v20250403

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 2
  • Comments: 47 (17 by maintainers)

Most upvoted comments

Just verified that and that is 100% the issue. Built 1.7.25 with golang 1.22.7 and no more core dumps. Also built 1.7.27 and it didn’t cause issues.

In case it helps at all, we’ve been seeing this issue too and we’ve tracked the caller of ctr down to Crowdstrike:

root        6087  0.0  0.0   2884  1092 ?        Ss   08:50   0:00  \_ /opt/CrowdStrike/falcond -f -n 0
root        6101  9.9  0.9 4353780 618256 ?      Sl   08:50  31:02      \_ falcon-sensor-bpf
root      719690  0.0  0.0 1642640 13708 ?       Rl   14:03   0:00          \_ /usr/bin/ctr -a /run/containerd/containerd.sock -n k8s.io c info 89970e5a628a1fa8308185e0cd204afbacda5bc9ea92727897fbfacb20da0d7c

This was found by running this hacky script:

while true; do
    ps aux --forest > /tmp/process.txt
    match=$(awk '/usr\/bin\/ctr/ && !/grep/' /tmp/process.txt)
    if [ -n "${match}" ]; then
        cp /tmp/process.txt /tmp/ctr-found-process.txt
        cat /tmp/ctr-found-process.txt
        exit
    fi
done

@cartermckinnon it appears that 1.24.2 builds also produce core dumps

Or even better with this:

CTR=${ctr:-/usr/bin/ctr}
OUT=/tmp/ctr-trace.$$

env > $OUT
echo "" >> $OUT

cat /proc/self/status >> $OUT
cat /proc/self/cgroup >> $OUT
echo "" >> $OUT

echo "Parent process path:" >> $OUT
pid="$$"
lvl="";
while [ -n "$pid" -a "$pid" != "0" ]; do
    echo "${lvl}pid: $pid (cmdline $(cat /proc/$pid/cmdline | tr '\0' ' '))" >> $OUT
    ppid=$(cat /proc/$pid/status | tr -s '\t' ' ' | grep 'PPid:' | cut -d ':' -f2 | tr -d ' ')
    pid=$ppid
    lvl="${lvl}  "
done
echo "" >> $OUT

exec strace -f $CTR $* 2>> $OUT

@levinedaniel Could you toss in a ctr-wrapper like this, to catch it in action and record who started it and what it is doing. First mv /usr/bin/ctr /usr/bin/ctr.bin then put this script in place as /usr/bin/ctr, then check from the command line that running ctr still works and also produces a trace file. Then drive the system to the failing state…

#!/bin/sh

OUT=/tmp/ctr-trace.$$
CTR=${ctr:-/usr/bin/ctr.bin}

env > $OUT
cat /proc/self/status >> $OUT
cat /proc/self/cgroup >> $OUT

exec strace -f $CTR $* 2>> $OUT