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:
localname is a local struct variable which contains a pointer and an integer (containing the size of whatever is in the block pointed to by the pointer). We end up (through a series of calls) allocating memory for that pointer, but never freeing it before the struct containing the pointer to it just disappears ('cause it's a local function) when the function returns. Here's the valgrind output:
==24113== 37,104 bytes in 4,638 blocks are definitely lost in loss record 76 of 85
==24113== at 0x4C29BFD: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==24113== by 0x65F4F7D: UnknownInlinedFun (gssapi_alloc.h:99)
==24113== by 0x65F4F7D: gssalloc_strdup (gssapi_alloc.h:120)
==24113== by 0x65F4F7D: krb5_gss_localname (gssapi_krb5.c:768)
==24113== by 0x65EE4E5: gss_localname (gssd_pname_to_uid.c:173)
==24113== by 0x40D043: gp_export_creds_linux (gp_export.c:757)
==24113== by 0x40D043: gp_export_creds_to_gssx_options (gp_export.c:876)
==24113== by 0x40DEC7: gp_accept_sec_context (gp_rpc_accept_sec_context.c:165)
==24113== by 0x40ADC0: gp_rpc_execute (gp_rpc_process.c:343)
==24113== by 0x40ADC0: gp_rpc_process_call (gp_rpc_process.c:400)
==24113== by 0x4073CB: gp_handle_query (gp_workers.c:447)
==24113== by 0x4073CB: gp_worker_main (gp_workers.c:401)
==24113== by 0x6822DC4: start_thread (pthread_create.c:308)
==24113== by 0x6B2DCEC: clone (clone.S:113)
Version-Release number of selected component (if applicable):
The customer's version is 0.4.1-8.el7_2, but I just downloaded the latest version from brew, and it sure looks like that version has the same bug.
How reproducible:
Customer can easily reproduce it, but it doesn't matter, I found the bug.
Steps to Reproduce:
1.
2.
3.
Actual results:
Memory leaks.
Expected results:
Memory not to leak.
Additional info:
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://access.redhat.com/errata/RHBA-2017:2033
Description of problem: localname is a local struct variable which contains a pointer and an integer (containing the size of whatever is in the block pointed to by the pointer). We end up (through a series of calls) allocating memory for that pointer, but never freeing it before the struct containing the pointer to it just disappears ('cause it's a local function) when the function returns. Here's the valgrind output: ==24113== 37,104 bytes in 4,638 blocks are definitely lost in loss record 76 of 85 ==24113== at 0x4C29BFD: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==24113== by 0x65F4F7D: UnknownInlinedFun (gssapi_alloc.h:99) ==24113== by 0x65F4F7D: gssalloc_strdup (gssapi_alloc.h:120) ==24113== by 0x65F4F7D: krb5_gss_localname (gssapi_krb5.c:768) ==24113== by 0x65EE4E5: gss_localname (gssd_pname_to_uid.c:173) ==24113== by 0x40D043: gp_export_creds_linux (gp_export.c:757) ==24113== by 0x40D043: gp_export_creds_to_gssx_options (gp_export.c:876) ==24113== by 0x40DEC7: gp_accept_sec_context (gp_rpc_accept_sec_context.c:165) ==24113== by 0x40ADC0: gp_rpc_execute (gp_rpc_process.c:343) ==24113== by 0x40ADC0: gp_rpc_process_call (gp_rpc_process.c:400) ==24113== by 0x4073CB: gp_handle_query (gp_workers.c:447) ==24113== by 0x4073CB: gp_worker_main (gp_workers.c:401) ==24113== by 0x6822DC4: start_thread (pthread_create.c:308) ==24113== by 0x6B2DCEC: clone (clone.S:113) Version-Release number of selected component (if applicable): The customer's version is 0.4.1-8.el7_2, but I just downloaded the latest version from brew, and it sure looks like that version has the same bug. How reproducible: Customer can easily reproduce it, but it doesn't matter, I found the bug. Steps to Reproduce: 1. 2. 3. Actual results: Memory leaks. Expected results: Memory not to leak. Additional info: