Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1909184

Summary: clamdscan in 0.103.0 version seems to consume too much memory
Product: [Fedora] Fedora EPEL Reporter: Danilo Godec <danci>
Component: clamavAssignee: Robert Scheck <redhat-bugzilla>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: epel7CC: anon.amish, bennie.joubert, gbcox, janfrode, j, lee.jnk, ondrejj, orion, pgnet.dev, redhat-bugzilla, rh-bugzilla, sergio, steve
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: clamav-0.103.1-1.fc33 clamav-0.103.1-1.fc32 clamav-0.103.1-3.el8 clamav-0.103.1-3.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-21 01:20:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Danilo Godec 2020-12-18 14:31:06 UTC
Description of problem:

With version 0.103.0, clamdscan seems to require a lot more memory than before and it grows as it's running - if the file list is long enough, it eventually exhausts all of it and gets killed.

With older versions (0.102.0 included), clamdscan uses a fix amount of memory and doesn't increase throughout the entire run (no matter how long the file list is).

Version-Release number of selected component (if applicable):
0.103.0

How reproducible:
Every time.


Steps to Reproduce:
1. Make a long list of files - files can be tiny and it can even be the same file:

# for i in {1..300000}; do echo /etc/resolv.conf ; done > test_list

I found the limit on a 4GB VM to be about 250000

2. Run clamdscan:

# /usr/bin/clamdscan --fdpass --infected --no-summary -f test_list

3. Observe clamdscan memory usage in 'top' grow - if the file list is long enough, it will die eventually.


Actual results:
clamdscan memory usage grows and it gets killed after a while:

[root@test-rig ~]# /usr/bin/clamdscan --fdpass --infected --no-summary -f test_list est_list
Killed

Expected results:
clamdscan should not use all the memory and shoould not get killed

Additional info:

Comment 1 Sergio Basto 2020-12-18 20:55:42 UTC
Hi, thanks for the report , before push  0.103.0 to epel7 updates stable, we tested on all fedora branches and we haven't complains . 

Please report it upstream or comment on https://bugzilla.clamav.net/show_bug.cgi?id=12648 , as packager we don't have much to do . 

I see that report is already yours thank you.

Comment 2 Fedora Update System 2021-02-18 02:51:58 UTC
FEDORA-2021-a61c57335d has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-a61c57335d

Comment 3 Fedora Update System 2021-02-18 02:52:25 UTC
FEDORA-2021-fdd780c9bb has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2021-fdd780c9bb

Comment 4 Fedora Update System 2021-02-19 01:59:41 UTC
FEDORA-2021-fdd780c9bb has been pushed to the Fedora 32 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-fdd780c9bb`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-fdd780c9bb

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2021-02-19 02:03:34 UTC
FEDORA-2021-a61c57335d has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-a61c57335d`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-a61c57335d

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2021-02-21 01:20:07 UTC
FEDORA-2021-a61c57335d has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 7 Fedora Update System 2021-02-26 23:35:20 UTC
FEDORA-2021-fdd780c9bb has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 8 Fedora Update System 2021-02-27 00:42:32 UTC
FEDORA-EPEL-2021-10c83ba6bf has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-10c83ba6bf

Comment 9 Fedora Update System 2021-02-27 00:43:14 UTC
FEDORA-EPEL-2021-03e142a515 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-03e142a515

Comment 10 Fedora Update System 2021-02-27 21:28:09 UTC
FEDORA-EPEL-2021-03e142a515 has been pushed to the Fedora EPEL 7 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-03e142a515

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Fedora Update System 2021-02-27 22:09:58 UTC
FEDORA-EPEL-2021-10c83ba6bf has been pushed to the Fedora EPEL 8 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-10c83ba6bf

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2021-03-08 20:31:51 UTC
FEDORA-EPEL-2021-a847c261f5 has been pushed to the Fedora EPEL 8 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-a847c261f5

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2021-03-08 20:42:45 UTC
FEDORA-EPEL-2021-7265da6992 has been pushed to the Fedora EPEL 7 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-7265da6992

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 14 Fedora Update System 2021-03-23 01:52:40 UTC
FEDORA-EPEL-2021-a847c261f5 has been pushed to the Fedora EPEL 8 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 15 Fedora Update System 2021-03-23 02:15:47 UTC
FEDORA-EPEL-2021-7265da6992 has been pushed to the Fedora EPEL 7 stable repository.
If problem still persists, please make note of it in this bug report.