Fedora Account System
Red Hat Associate
Red Hat Customer
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.