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:
With some vmlinux e.g. RHEL9 ones, the first execution of the gdb ptype
command heavily consumes memory and time. The "ps -t" option uses it in
start_time_timespec(), and it can be replaced with the crash macros.
This can reduce about 1.4 GB memory and 6 seconds time comsumption in
the following test:
$ echo "ps -t" | time crash vmlinux vmcore
Without the patch:
11.60user 0.43system 0:11.94elapsed 100%CPU (0avgtext+0avgdata 1837964maxresident)k
0inputs+400outputs (0major+413636minor)pagefaults 0swaps
With the patch:
5.40user 0.16system 0:05.46elapsed 101%CPU (0avgtext+0avgdata 417896maxresident)k
0inputs+384outputs (0major+41528minor)pagefaults 0swaps
Link: https://www.mail-archive.com/crash-utility@redhat.com/msg08942.html
Version-Release number of selected component (if applicable):
How reproducible:
Always.
Steps to Reproduce:
1.
2.
3.
Actual results:
Expected results:
Additional info:
Hi, Kazu
Could you please add additional comments or any concerns about this issue? I will make a scratch build for QE with the following commit, and eventually QE will evaluate if the patch is introduced into RHEL9 this time. Thanks.
Upstream patch:
commit 2ebd8c5ecf1f077975b82325a38dd777b594d0a9 (origin/master, origin/HEAD)
Author: Kazuhito Hagio <k-hagio-ab>
Date: Wed Jan 19 16:24:49 2022 +0900
Remove ptype command from "ps -t" option to reduce memory and time
With some vmlinux e.g. RHEL9 ones, the first execution of the gdb ptype
command heavily consumes memory and time. The "ps -t" option uses it in
start_time_timespec(), and it can be replaced with the crash macros.
This can reduce about 1.4 GB memory and 6 seconds time comsumption in
the following test:
$ echo "ps -t" | time crash vmlinux vmcore
Without the patch:
11.60user 0.43system 0:11.94elapsed 100%CPU (0avgtext+0avgdata 1837964maxresident)k
0inputs+400outputs (0major+413636minor)pagefaults 0swaps
With the patch:
5.40user 0.16system 0:05.46elapsed 101%CPU (0avgtext+0avgdata 417896maxresident)k
0inputs+384outputs (0major+41528minor)pagefaults 0swaps
Although the ptype command and similar ones cannot be fully removed,
but removing some of them will make the use of crash safer, especially
for an automatic crash reporter.
(In reply to lijiang from comment #1)
> Could you please add additional comments or any concerns about this issue? I
> will make a scratch build for QE with the following commit, and eventually
> QE will evaluate if the patch is introduced into RHEL9 this time. Thanks.
Thank you for creating this bz.
The problem is that the "ps -t" command needlessly executes "ptype" and takes time,
so I've changed the bz subject.
Thanks,
Kazu
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (new packages: crash), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2022:2479
Description of problem: With some vmlinux e.g. RHEL9 ones, the first execution of the gdb ptype command heavily consumes memory and time. The "ps -t" option uses it in start_time_timespec(), and it can be replaced with the crash macros. This can reduce about 1.4 GB memory and 6 seconds time comsumption in the following test: $ echo "ps -t" | time crash vmlinux vmcore Without the patch: 11.60user 0.43system 0:11.94elapsed 100%CPU (0avgtext+0avgdata 1837964maxresident)k 0inputs+400outputs (0major+413636minor)pagefaults 0swaps With the patch: 5.40user 0.16system 0:05.46elapsed 101%CPU (0avgtext+0avgdata 417896maxresident)k 0inputs+384outputs (0major+41528minor)pagefaults 0swaps Link: https://www.mail-archive.com/crash-utility@redhat.com/msg08942.html Version-Release number of selected component (if applicable): How reproducible: Always. Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: