Certain versions of Alibaba Cloud Linux 2 have a memory leak in polkit that can cause memory usage to exceed 14 GiB. Run yum update polkit to fix it.
Affected versions
The issue affects instances running:
Alibaba Cloud Linux 2 image versions earlier than
aliyun_2_1903_x64_20G_alibase_20211216.vhdKernel versions earlier than
4.19.91-25.1.al7.x86_64
Root cause
The polkit component has a memory leak triggered during agent authentication cancellation. The fix is included in polkit-0.112-26.2.al7. For details, see Fix a memory leak on agent authentication cancellation.
Diagnose the issue
Before applying the fix, confirm that polkit is consuming excessive memory.
Run the following command to check polkit's current memory usage:
ps aux --sort=-%mem | grep polkitIf the %MEM or RSS column shows high values that continue to grow over time, the instance is affected.
Fix the issue
Upgrade polkit to polkit-0.112-26.2.al7:
yum update polkitVerify the fix
After the upgrade, confirm the installed version:
rpm -q polkitThe output should show polkit-0.112-26.2.al7 or a later version, which confirms the fix has been applied.