Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1357009 - lvmetad leaks small amount of memory when updating PV info
Summary: lvmetad leaks small amount of memory when updating PV info
Keywords:
Status: POST
Alias: None
Product: LVM and device-mapper
Classification: Community
Component: lvm2
Version: 2.02.161
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: David Teigland
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-15 13:23 UTC by Zdenek Kabelac
Modified: 2016-07-18 16:34 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
rule-engine: lvm-technical-solution?
rule-engine: lvm-test-coverage?


Attachments (Terms of Use)

Description Zdenek Kabelac 2016-07-15 13:23:28 UTC
Description of problem:

When running lvmetad in valgrind - some leaked memory is reported on exit:
i.e.:


 HEAP SUMMARY:
     in use at exit: 638 bytes in 30 blocks
   total heap usage: 17,541 allocs, 17,511 frees, 8,190,915 bytes allocated
 
 3 bytes in 1 blocks are definitely lost in loss record 1 of 5
    at 0x4C2DB9D: malloc (vg_replace_malloc.c:299)
    by 0x59AECC9: strdup (strdup.c:42)
    by 0x52D6228: dm_strdup_wrapper (dbg_malloc.c:352)
    by 0x10D1EE: _update_metadata_add_new (lvmetad-core.c:1169)
    by 0x10E4A5: _update_metadata (lvmetad-core.c:1647)
    by 0x10FE6B: vg_update (lvmetad-core.c:2298)
    by 0x111E45: handler (lvmetad-core.c:2835)
    by 0x1137B1: _client_thread (daemon-server.c:457)
    by 0x570B6C9: start_thread (pthread_create.c:333)
    by 0x5A29FDE: clone (clone.S:105)
 
 39 bytes in 1 blocks are definitely lost in loss record 2 of 5
    at 0x4C2DB9D: malloc (vg_replace_malloc.c:299)
    by 0x59AECC9: strdup (strdup.c:42)
    by 0x52D6228: dm_strdup_wrapper (dbg_malloc.c:352)
    by 0x10D215: _update_metadata_add_new (lvmetad-core.c:1172)
    by 0x10E4A5: _update_metadata (lvmetad-core.c:1647)
    by 0x10FE6B: vg_update (lvmetad-core.c:2298)
    by 0x111E45: handler (lvmetad-core.c:2835)
    by 0x1137B1: _client_thread (daemon-server.c:457)
    by 0x570B6C9: start_thread (pthread_create.c:333)
    by 0x5A29FDE: clone (clone.S:105)
 
 128 bytes in 16 blocks are definitely lost in loss record 3 of 5
    at 0x4C2DB9D: malloc (vg_replace_malloc.c:299)
    by 0x59AECC9: strdup (strdup.c:42)
    by 0x52D6228: dm_strdup_wrapper (dbg_malloc.c:352)
    by 0x10C445: _update_pvid_to_vgid (lvmetad-core.c:804)
    by 0x10C734: remove_metadata (lvmetad-core.c:864)
    by 0x10C8EA: vg_remove_if_missing (lvmetad-core.c:908)
    by 0x10E9E9: pv_gone (lvmetad-core.c:1786)
    by 0x111CDD: handler (lvmetad-core.c:2826)
    by 0x1137B1: _client_thread (daemon-server.c:457)
    by 0x570B6C9: start_thread (pthread_create.c:333)
    by 0x5A29FDE: clone (clone.S:105)
 
 156 bytes in 4 blocks are definitely lost in loss record 4 of 5
    at 0x4C2DB9D: malloc (vg_replace_malloc.c:299)
    by 0x59AECC9: strdup (strdup.c:42)
    by 0x52D6228: dm_strdup_wrapper (dbg_malloc.c:352)
    by 0x10C445: _update_pvid_to_vgid (lvmetad-core.c:804)
    by 0x10D357: _update_metadata_add_new (lvmetad-core.c:1193)
    by 0x10E4A5: _update_metadata (lvmetad-core.c:1647)
    by 0x10FE6B: vg_update (lvmetad-core.c:2298)
    by 0x111E45: handler (lvmetad-core.c:2835)
    by 0x1137B1: _client_thread (daemon-server.c:457)
    by 0x570B6C9: start_thread (pthread_create.c:333)
    by 0x5A29FDE: clone (clone.S:105)
 
 312 bytes in 8 blocks are definitely lost in loss record 5 of 5
    at 0x4C2DB9D: malloc (vg_replace_malloc.c:299)
    by 0x59AECC9: strdup (strdup.c:42)
    by 0x52D6228: dm_strdup_wrapper (dbg_malloc.c:352)
    by 0x10F35D: pv_found (lvmetad-core.c:2067)
    by 0x111C91: handler (lvmetad-core.c:2823)
    by 0x1137B1: _client_thread (daemon-server.c:457)
    by 0x570B6C9: start_thread (pthread_create.c:333)
    by 0x5A29FDE: clone (clone.S:105)


Version-Release number of selected component (if applicable):
2.02.161

How reproducible:


Steps to Reproduce:
1. valgrind  lvmetad -f
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 David Teigland 2016-07-18 16:34:08 UTC
pushed commit 4b4d4670042db3edb1270097f4d6046a6a827bac


Note You need to log in before you can comment on or make changes to this bug.