This topic describes the causes of and solutions for high CPU utilization that occurs on Alibaba Cloud Linux 3 when eBPF programs use an LRU hash.
Problem description
On Alibaba Cloud Linux 3, an eBPF program that uses an LRU hash may cause the system CPU utilization to spike during high-frequency map operations. This can also cause the LRU maps to fill up unexpectedly.

Cause
The issue is caused by a bug in an upstream Linux kernel patch that was introduced to fix a hashtab deadlock problem. When an LRU map update operation fails, this bug prevents the associated memory from being released correctly. This memory leak accumulates over time, leading to increased lock contention and causing the CPU utilization to spike.
Scope
This issue affects systems running Alibaba Cloud Linux 3 with kernel version 5.10.134-15.al8.x86_64 or later, where an eBPF program is using an LRU hash map.
uname -r // Check the kernel version.Example: 5.10.134-19.al8.x86_64
sudo bpftool map show [OPTION] // Check the output for a map of type lru_hash to determine whether an LRU hash is used.Example:
Solution
You can install a kernel live patch.
yum install kernel-hotfix-22519882-<os_minor_version_number>Example: yum install kernel-hotfix-22519882-5.10.134-19
