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.
Previously, the libtevent package suffered from a memory leak in signal handling. This bug has been fixed and memory leaks no longer occur in libtevent.
Description of problem:
libtevent allocates memory during tevent_common_add_signal() but doesn't free it.
Version-Release number of selected component (if applicable):
libtevent-0.9.25-1.el7
How reproducible:
always
Steps to Reproduce:
1. register a signal handler with libtevent
2. watch the memory usage of a program after startup
3. receive a bunch of signals
3. observe memory usage go up
Actual results:
Expected results:
Additional info:
this is best tested through sssd performing many allocations
Steps to reproduce are wrong. It is not about receiving the signals, the leak occurs on registering a signal handler. I'm attaching a simple reproducer in C.
To reproduce, grab the source file that Pavel attached as comment #3 and save it as some file, I used tev.c as an example. Make sure that libtevent-devel and libtalloc-devel are installed.
Then compile the source with:
$ gcc -ltevent -ltalloc tev.c
and run the resulting binary:
$./a.out
With the unpatched packages, you should see a bunch of "struct sigaction" structures being reported by libtalloc as leaked. You should not see these leaks with the patched version.
Verified the bug on libtevent Version: libtevent-0.9.28-1.el7.x86_64
Steps followed during verification:
1. Already reproduced this bug with the older build: libtevent-0.9.25-1.el7.x86_64 during verification of RHEL-7.2.Z bug BZ1324387.
2. With the patched build, the "struct sigaction" shouldn't be reported, see the output:
# ./a.out
full talloc report on 'null_context' (total 2928 bytes in 7 blocks)
struct tevent_sig_state contains 2768 bytes in 1 blocks (ref 0) 0x1a53680
struct tevent_ops_list contains 32 bytes in 1 blocks (ref 0) 0x1a53320
struct tevent_ops_list contains 32 bytes in 1 blocks (ref 0) 0x1a53290
struct tevent_ops_list contains 32 bytes in 1 blocks (ref 0) 0x1a53200
struct tevent_ops_list contains 32 bytes in 1 blocks (ref 0) 0x1a53170
struct tevent_ops_list contains 32 bytes in 1 blocks (ref 0) 0x1a530e0
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, 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://rhn.redhat.com/errata/RHEA-2016-2474.html