Bug 2165190

Summary: [aarch64] RHEL8 memstrack doesn't work in 1st kernel
Product: Red Hat Enterprise Linux 8 Reporter: Coiby <coxu>
Component: memstrackAssignee: ltao
Status: VERIFIED --- QA Contact: Li Wang <liwan>
Severity: unspecified Docs Contact:
Priority: low    
Version: 8.8CC: jieli, prudo, ruyang, xiawu
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: memstrack-0.2.5-2.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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 Coiby 2023-01-28 08:14:46 UTC
Description of problem:

memstrack failed with the followings errors,
    $ journalctl -b0
    memstrack-start[1909]: memstrack - will report kernel module memory usage summary and top allocation stack
    memstrack-start[1920]: Tracing memory allocations, Press ^C to interrupt ...
    memstrack-start[1920]: Error calling perf_event_open: Too many open files
    memstrack-start[1920]: Failed initializing perf events
    systemd[1]: Started Memstrack Anylazing Service.
    systemd[1]: memstrack.service: Main process exited, code=exited, status=24/n/a
    systemd[1]: memstrack.service: Failed with result 'exit-code'.
    systemd[1]: Starting dracut cmdline hook...

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

memstrack-0.2.4-2.el8

RHEL-8.8.0-20230126.17 on hpe-apache-cn99xx-08.khw4.lab.eng.bos.redhat.com

How reproducible:
always

Steps to Reproduce:
1. grubby --args=rd.memdebug=5 --update-kernel=DEFAULT
2. reboot

Actual results:

memstrack failed to report kernel module memory usage.


Expected results:

memstrack should report kernel module memory usage.

Additional info:
1. This issue can be both observed on both the latest kernel 4.18.0-452.el8.aarch64 as of writing and 4.18.0-372.12.1.el8_6.aarch64 which was released about half a year ago
2. This bug can also be reproduced on aarch64 RHEL9
3. memstrack works well in kdump kernel
4. memstrack works fine in other architectures like x86 and s390

Comment 1 Coiby 2023-01-28 09:12:48 UTC
This is a much easier way to reproduce this issue,

    [root@hpe-apache-cn99xx-08 ~]# memstrack --report module_summary,module_top --notui
    Tracing memory allocations, Press ^C to interrupt ...
    Error calling perf_event_open: Too many open files
    Failed initializing perf events

Comment 3 ltao 2023-03-28 07:54:19 UTC
Patch posted upstream: [1]

[1]: https://github.com/ryncsn/memstrack/pull/16