Bug 2517408
| Summary: | libtracefs leaks memory during tracefs_iterate_raw_events() | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Tomas Glozar <tglozar> |
| Component: | libtracefs | Assignee: | Zamir SUN <sztsian> |
| Status: | NEW --- | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 43 | CC: | jmarchan, sztsian |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | --- | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | --- | |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 2359606 | ||
| Bug Blocks: | |||
Repeatedly calling tracefs_iterate_raw_events() leads to memory being allocated that is not freed until the release of the trace instance. This affects rtla osnoise and hwnoise tools, which call tracefs_iterate_raw_events() every one second to read events in a loop. On long runs, it will consume all of the system's memory and crash. Reproducible: Always Steps to Reproduce: 1. Run the command: `rtla osnoise -c 0` as root. 2. Observe memory usage of the rtla process with `htop` command. Actual Results: Memory usage of rtla increases by around 100kB every second. Expected Results: Memory usage of rtla stays the same. Additional Information: The issue is fixed in upstream libtracefs 1.8.2, likely by commit d49b6fa41ad53fdd8e82dd324e15df9ef7fcd250 ("libtrace: Fix memory leak in tracefs_cpu"; unconfirmed). The same bug is likely present in Fedora 44, 45, and Rawhide, as they ship the same version of libtracefs. No extra patches are present, version number increases are just from mass rebuilds. NVRs: [tglozar@fedora ~]$ rpm -qa rtla rtla-7.1.3-100.fc43.x86_64 [tglozar@fedora ~]$ rpm -qa libtracefs libtracefs-1.8.1-3.fc43.x86_64 Note that the Fedora packages are behind CentOS Stream 10, which already ships libtracefs 1.8.2, and does not have the issue.