Bug 1006982

Summary: Account provider leaks memory
Product: Red Hat Enterprise Linux 7 Reporter: Jan Safranek <jsafrane>
Component: openlmi-providersAssignee: Tomáš Bžatek <tbzatek>
Status: CLOSED WORKSFORME QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.0CC: jscotka, tbzatek, tsmetana
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: openlmi-providers-0.4.1-2.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-01 12:11:05 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:
Attachments:
Description Flags
Reproducer script none

Description Jan Safranek 2013-09-11 16:05:04 UTC
Created attachment 796448 [details]
Reproducer script

Running the attached script, the OpenLMI Account provider leaks memory:

==24551== 121,915 (9,184 direct, 112,731 indirect) bytes in 28 blocks are definitely lost in loss record 387 of 387
==24551==    at 0x4C29121: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==24551==    by 0xE4C1EC6: g_malloc0 (in /usr/lib64/libglib-2.0.so.0.3707.0)
==24551==    by 0x1032E0C1: libuser_files_init (in /usr/lib64/libuser/libuser_files.so)
==24551==    by 0xE7AE229: ??? (in /usr/lib64/libuser.so.1.4.1)
==24551==    by 0xE7B07A7: lu_start (in /usr/lib64/libuser.so.1.4.1)
==24551==    by 0xDE59968: ???
==24551==    by 0xE26DF3C: ???
==24551==    by 0xDE5969B: ???
==24551==    by 0xDBEFCBA: ???
==24551==    by 0xDBFD1C4: ???
==24551==    by 0x7F3D369: Pegasus::BasicProviderManagerRouter::processMessage(Pegasus::Message*) (BasicProviderManagerRouter.cpp:391)
==24551==    by 0x7D2DDE0: Pegasus::ProviderManagerService::_processMessage(Pegasus::CIMRequestMessage*) (ProviderManagerService.cpp:870)

Tested with current upstream git head, 8dbd4f1f39c66309806642532635de2a764fa738

(I *do* have openlmi-providers-debuginfo installed, how can I get better stack traces in valgrind?)

Comment 3 Jan Safranek 2013-11-01 12:11:05 UTC
This is either fixed upstream or I can't reproduce it any longer.

Comment 4 Tomáš Bžatek 2013-11-04 14:46:40 UTC
I have gone through the source code manually as a part of fixing libuser objects cleanup but haven't found a place with obvious leak.

(In reply to Jan Safranek from comment #0)
> ==24551==    by 0xE7B07A7: lu_start (in /usr/lib64/libuser.so.1.4.1)

In case this happens again, a location of the incidental lu_start() call would be a great help.