Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
OpenScap scanner uses Excessive amount of memory and disk space on Content hosts.
There was already bug for openscap memory utilization on satellite server, but it didn't help on host machines.
https://bugzilla.redhat.com/show_bug.cgi?id=1432263
We have asked Cu to upgrade the openscap packages running on host machines but this also didn't resolved the issue.
=====================Host Details=========================
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.7 (Santiago)
# rpm -qa | grep -e rubygem-foreman -e openscap
openscap-utils-1.2.13-2.el6.x86_64
rubygem-foreman_scap_client-0.1.2-2.el6sat.noarch
openscap-1.2.13-2.el6.x86_64
openscap-scanner-1.2.13-2.el6.x86_64
==========================================================
Version-Release number of selected component (if applicable):
Satellite 6.2.9 running on RHEL 7.3
Host Machine : RHEL 6.x
Need fix on the issue at earliest.
Regards,
Rajan
Rajan, could you please provide more information about what exact process eat memory and what files consume disk space? It is very unlikely that the integration would be the cause, it's tiny ruby wrapper that runs openscap scan utility. It's triggered by cron so the memory should be freed just after the openscap scanner finishes. According to the case, it seems that customer was able to reproduce it when oscap was run manually without Satellite being involved.
I think you should report that against OpenSCAP under RHEL.
Also information about what policy they use might help. The size of report obviously grows with the amount of rules in the policy.
oscap process is consuming 99% of the memory & it varies irrespective of profile the Cu is using.
cat ps
root 35869 99.2 13.2 11502648 8751848 ? R May19 5051:39 oscap xccdf eval --profile xccdf_example.com-rhel6-server-upstream_customized --results-arf /tmp/d20170519-35379-qq00ew/results.xml /var/lib/openscap/content/06fd06564f0d57fea6dedacb81e70c238a5e147d359d1a52287800a9e7cab04a.xml
Hello Rajan,
I am afraid I am not able to reproduce the issue. Can you provide us with tarball with a reproducer? I.e. directory with datastream/xccdf, tailoring if necessary, and shell script running openscap with specific parameters? (Ideally this script could also report memory usage, so we are on the same page, comparing same numbers).
I have tried to run it on RHEL6.9, with some 5200 packages installed [basically a full install]. And oscap did not got over 15% (300 megs) of RAM.
Created attachment 1295380[details]
ZIpped tar file containing my test scripts and tailoring file
Please find attached my test script, combined tailoring file, and a script showing the oscap invokation parameters I am using. Also is the output of vmstat which was running in the background during the scan. It shows memory on my server at 3.7 GB at the beginning of the scan and dropping to about 80 MB as the scan was running.
Hello,
this is actually issue in the datastream used, originally reported in Bug 1270329 and fixed long time ago. I won't close this bugzilla just yet, but my suggestion is to either disable rule "Ensure All Files Are Owned by a Group" (rule_no_files_unowned_by_group) or to use datastream from newer scap-security-guide.
Thanks for your help in identifying the issue. I've updated to the latest datastream and am no longer encountering the memory issue. I've uploaded the new combined file with my tailoring to our Satellite server and have it setup to scan our RHEL6 development and QA systems on Wednesday. I'll have an update on Thursday as to how that goes.
My apologies for the late response. Using the most recent datastream did resolve our issues. Our compliance scans are running fine from the Satellite server now. Feel free to close the BugZilla.
Thanks again for all your help.
Jamie.