After the recent update of cPanel to 11.44.x, most of the users are able to see that clamd is getting hung and consuming the server resources excessively.
On checking the processes running, we can see that clamav-cpanel plugin is consuming a lot of resources scanning the file /etc/password and spawning them without terminating.
Part of # top -c
will show the following :
=========================
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
7761 root 25 0 35872 1704 1312 R 27.3 0.2 11:47.14 /usr/local/cpanel/3rdparty/bin/clamdscan --quiet --no-summary /etc/passwd
9714 root 25 0 35872 1708 1312 R 25.4 0.2 0:09.75 /usr/local/cpanel/3rdparty/bin/clamdscan –quiet –no-summary /etc/passwd
5982 root 25 0 35872 1704 1312 R 23.4 0.2 22:39.74 /usr/local/cpanel/3rdparty/bin/clamdscan –quiet –no-summary /etc/passwd
……
========================
Even if you kill the service, the issue reproduces after a while. As of now, cPanel is yet to release a fix for this bug.
As a temporary fix, you can try the following :
===================
# Remove the clamAV plugin from WHM ( Home »cPanel »Manage Plugins
) – Uninstall it
# Update cPanel from backend ( # /scripts/upcp --force
)
# Re-install the plugin ( Home »cPanel »Manage Plugins
) – Install it
===================
This seems to have cleared the issue for the ones which faced this bug. Give it a try !