Bug 2233546

Summary: cups: memory leak in _ppdOpen()
Product: Red Hat Enterprise Linux 7 Reporter: Stepan Broz <sbroz>
Component: cupsAssignee: Zdenek Dohnal <zdohnal>
Status: CLOSED MIGRATED QA Contact: rhel-cs-infra-services-qe <rhel-cs-infra-services-qe>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.9CC: bmason, fkrska, sbroz
Target Milestone: rcKeywords: MigratedToJIRA, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-09-21 18:40:47 UTC 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 Stepan Broz 2023-08-22 14:11:46 UTC
Filed from caserun https://tcms.engineering.redhat.com/run/433778/

Version-Release number of selected component (if applicable):
cups-filters-1.0.35-29.el7_9.x86_64

Steps to Reproduce: 
Run the test on RHEL-7.9


Actual results: 

==9376== LEAK SUMMARY:
==9376==    definitely lost: 12 bytes in 3 blocks
==9376==    indirectly lost: 0 bytes in 0 blocks
==9376==      possibly lost: 3,096 bytes in 26 blocks
==9376==    still reachable: 313,856 bytes in 4,578 blocks
==9376==                       of which reachable via heuristic:
==9376==                         length64           : 928 bytes in 16 blocks
==9376==                         newarray           : 1,728 bytes in 28 blocks
==9376==         suppressed: 0 bytes in 0 blocks
==9376== Reachable blocks (those to which a pointer was found) are not shown.
==9376== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==9376== 
==9376== For lists of detected and suppressed errors, rerun with: -s
==9376== ERROR SUMMARY: 29 errors from 29 contexts (suppressed: 0 from 0)

~~~

==9376== HEAP SUMMARY:
==9376==     in use at exit: 329,300 bytes in 4,706 blocks
==9376==   total heap usage: 22,605 allocs, 17,899 frees, 3,637,971 bytes allocated
==9376== 
==9376== 4 bytes in 1 blocks are definitely lost in loss record 8 of 1,553
==9376==    at 0x4C29F73: malloc (vg_replace_malloc.c:309)
==9376==    by 0x804CB89: strdup (in /usr/lib64/libc-2.17.so)
==9376==    by 0x61C5AA1: ppd_read (ppd.c:3211)
==9376==    by 0x61C6245: _ppdOpen (ppd.c:559)
==9376==    by 0x61C9426: _ppdOpenFile (ppd.c:2152)
==9376==    by 0x118906: ??? (in /usr/sbin/cups-browsed)
==9376==    by 0x5A96B4C: ??? (in /usr/lib64/libglib-2.0.so.0.5600.1)
==9376==    by 0x5A96118: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.5600.1)
==9376==    by 0x5A96477: ??? (in /usr/lib64/libglib-2.0.so.0.5600.1)
==9376==    by 0x5A96749: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.5600.1)
==9376==    by 0x1108C1: ??? (in /usr/sbin/cups-browsed)
==9376==    by 0x7FE2554: (below main) (in /usr/lib64/libc-2.17.so)
==9376== 
==9376== 4 bytes in 1 blocks are definitely lost in loss record 9 of 1,553
==9376==    at 0x4C29F73: malloc (vg_replace_malloc.c:309)
==9376==    by 0x804CB89: strdup (in /usr/lib64/libc-2.17.so)
==9376==    by 0x61C5AA1: ppd_read (ppd.c:3211)
==9376==    by 0x61C6245: _ppdOpen (ppd.c:559)
==9376==    by 0x61C9426: _ppdOpenFile (ppd.c:2152)
==9376==    by 0x115D00: ??? (in /usr/sbin/cups-browsed)
==9376==    by 0x1161BF: ??? (in /usr/sbin/cups-browsed)
==9376==    by 0x85E3DEB: ffi_call_unix64 (in /usr/lib64/libffi.so.6.0.1)
==9376==    by 0x85E3714: ffi_call (in /usr/lib64/libffi.so.6.0.1)
==9376==    by 0x5809257: g_cclosure_marshal_generic (in /usr/lib64/libgobject-2.0.so.0.5600.1)
==9376==    by 0x5808A17: g_closure_invoke (in /usr/lib64/libgobject-2.0.so.0.5600.1)
==9376==    by 0x581B0FC: ??? (in /usr/lib64/libgobject-2.0.so.0.5600.1)
==9376== 
==9376== 4 bytes in 1 blocks are definitely lost in loss record 10 of 1,553
==9376==    at 0x4C29F73: malloc (vg_replace_malloc.c:309)
==9376==    by 0x804CB89: strdup (in /usr/lib64/libc-2.17.so)
==9376==    by 0x61C5AA1: ppd_read (ppd.c:3211)
==9376==    by 0x61C6245: _ppdOpen (ppd.c:559)
==9376==    by 0x61C9426: _ppdOpenFile (ppd.c:2152)
==9376==    by 0x115D00: ??? (in /usr/sbin/cups-browsed)
==9376==    by 0x118D52: ??? (in /usr/sbin/cups-browsed)
==9376==    by 0x11093D: ??? (in /usr/sbin/cups-browsed)
==9376==    by 0x7FE2554: (below main) (in /usr/lib64/libc-2.17.so)
:

Expected results:
Test passes, no definitely lost segments.

Comment 5 RHEL Program Management 2023-09-21 18:20:34 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 6 RHEL Program Management 2023-09-21 18:40:47 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.