Bug 1429877 - memory leak when using libgfapi
Summary: memory leak when using libgfapi
Keywords:
Status: CLOSED EOL
Alias: None
Product: GlusterFS
Classification: Community
Component: libgfapi
Version: 3.10
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Niels de Vos
QA Contact: Sudhir D
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-07 11:28 UTC by piotr.rybicki
Modified: 2018-06-20 18:29 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-20 18:29:27 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description piotr.rybicki 2017-03-07 11:28:31 UTC
Description of problem:
valgrind reports memory leaks in simple C program using libgfapi

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

How reproducible:
just run valgrind on a compiled program

Steps to Reproduce:

1. simple C code:

# cat hellogluster-basic.c
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <glusterfs/api/glfs.h>

int main (int argc, char** argv) {
        glfs_t *fs = NULL;

        fs = glfs_new ("pool");
        if (!fs) {
          fprintf (stderr, "glfs_new: returned NULL\n");
          return 1;
        }

        glfs_fini (fs);

        return 0;
}


2. compile 

gcc hellogluster-basic.c -lgfapi

3. run valgrind

# valgrind --leak-check=full --show-reachable=yes --show-leak-kinds=all ./a.out
==25086== Memcheck, a memory error detector
==25086== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==25086== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info
==25086== Command: ./a.out
==25086==
==25086==
==25086== HEAP SUMMARY:
==25086==     in use at exit: 313,510 bytes in 36 blocks
==25086==   total heap usage: 100 allocs, 64 frees, 536,563 bytes allocated
==25086==
==25086== 8 bytes in 1 blocks are still reachable in loss record 1 of 34
==25086==    at 0x4C2E0D0: calloc (vg_replace_malloc.c:711)
==25086==    by 0x5873136: __gf_default_calloc (mem-pool.h:120)
==25086==    by 0x5873136: __glusterfs_this_location (globals.c:160)
==25086==    by 0x4E402D4: glfs_new@@GFAPI_3.4.0 (glfs.c:766)
==25086==    by 0x4007D6: main (in /root/gf-test2/a.out)
==25086==
==25086== 82 bytes in 1 blocks are definitely lost in loss record 2 of 34
==25086==    at 0x4C2E0D0: calloc (vg_replace_malloc.c:711)
==25086==    by 0x586DF77: __gf_calloc (mem-pool.c:117)
==25086==    by 0x58485EF: gf_strdup (mem-pool.h:187)
==25086==    by 0x58485EF: gf_log_init (logging.c:734)
==25086==    by 0x4E4068B: glfs_set_logging@@GFAPI_3.4.0 (glfs.c:904)
==25086==    by 0x4E40324: glfs_new@@GFAPI_3.4.0 (glfs.c:779)
==25086==    by 0x4007D6: main (in /root/gf-test2/a.out)
==25086==
==25086== 116 bytes in 1 blocks are possibly lost in loss record 3 of 34
==25086==    at 0x4C2E0D0: calloc (vg_replace_malloc.c:711)
==25086==    by 0x586DF77: __gf_calloc (mem-pool.c:117)
==25086==    by 0x585273B: gf_strdup (mem-pool.h:187)
==25086==    by 0x585273B: generate_glusterfs_ctx_id (common-utils.c:2964)
==25086==    by 0x4E3F1A2: glusterfs_ctx_defaults_init (glfs.c:83)
==25086==    by 0x4E403E6: glfs_init_global_ctx (glfs.c:722)
==25086==    by 0x4E403E6: glfs_new@@GFAPI_3.4.0 (glfs.c:767)
==25086==    by 0x4007D6: main (in /root/gf-test2/a.out)
==25086==
==25086== 144 bytes in 1 blocks are possibly lost in loss record 4 of 34
==25086==    at 0x4C2E0D0: calloc (vg_replace_malloc.c:711)
==25086==    by 0x586DF77: __gf_calloc (mem-pool.c:117)
==25086==    by 0x5855E5A: gf_timer_registry_init (timer.c:209)
==25086==    by 0x5855E5A: gf_timer_call_after (timer.c:40)
==25086==    by 0x5849B22: __gf_log_inject_timer_event (logging.c:1791)
==25086==    by 0x5849B22: gf_log_inject_timer_event (logging.c:1813)
==25086==    by 0x4E406C0: glfs_set_logging@@GFAPI_3.4.0 (glfs.c:908)
==25086==    by 0x4E40324: glfs_new@@GFAPI_3.4.0 (glfs.c:779)
==25086==    by 0x4007D6: main (in /root/gf-test2/a.out)
==25086==
==25086== 152 bytes in 1 blocks are possibly lost in loss record 5 of 34
==25086==    at 0x4C2E0D0: calloc (vg_replace_malloc.c:711)
==25086==    by 0x586DF77: __gf_calloc (mem-pool.c:117)
==25086==    by 0x4E3F227: glusterfs_ctx_defaults_init (glfs.c:106)
==25086==    by 0x4E403E6: glfs_init_global_ctx (glfs.c:722)
==25086==    by 0x4E403E6: glfs_new@@GFAPI_3.4.0 (glfs.c:767)
==25086==    by 0x4007D6: main (in /root/gf-test2/a.out)
==25086==
==25086== 248 bytes in 1 blocks are possibly lost in loss record 6 of 34
==25086==    at 0x4C2E0D0: calloc (vg_replace_malloc.c:711)
==25086==    by 0x586DF77: __gf_calloc (mem-pool.c:117)
==25086==    by 0x5870226: __iobuf_arena_init_iobufs (iobuf.c:84)
==25086==    by 0x5870686: __iobuf_arena_alloc (iobuf.c:208)
==25086==    by 0x58708FD: __iobuf_pool_add_arena (iobuf.c:272)
==25086==    by 0x58709C4: iobuf_pool_add_arena (iobuf.c:297)
==25086==    by 0x587109C: iobuf_pool_new (iobuf.c:425)
==25086==    by 0x4E3F1C2: glusterfs_ctx_defaults_init (glfs.c:90)
==25086==    by 0x4E403E6: glfs_init_global_ctx (glfs.c:722)
==25086==    by 0x4E403E6: glfs_new@@GFAPI_3.4.0 (glfs.c:767)
==25086==    by 0x4007D6: main (in /root/gf-test2/a.out)
==25086==
==25086== 288 bytes in 1 blocks are possibly lost in loss record 7 of 34
==25086==    at 0x4C2E0D0: calloc (vg_replace_malloc.c:711)
==25086==    by 0x4011A91: allocate_dtv (in /lib64/ld-2.23.so)
==25086==    by 0x401241D: _dl_allocate_tls (in /lib64/ld-2.23.so)
==25086==    by 0x5F41EC4: pthread_create@@GLIBC_2.2.5 (in /lib64/libpthread-2.23.so)
==25086==    by 0x5853EC3: gf_thread_create (common-utils.c:3584)
==25086==    by 0x5855EB4: gf_timer_registry_init (timer.c:220)
==25086==    by 0x5855EB4: gf_timer_call_after (timer.c:40)
==25086==    by 0x5849B22: __gf_log_inject_timer_event (logging.c:1791)
==25086==    by 0x5849B22: gf_log_inject_timer_event (logging.c:1813)
==25086==    by 0x4E406C0: glfs_set_logging@@GFAPI_3.4.0 (glfs.c:908)
==25086==    by 0x4E40324: glfs_new@@GFAPI_3.4.0 (glfs.c:779)
==25086==    by 0x4007D6: main (in /root/gf-test2/a.out)
==25086==
==25086== 360 bytes in 1 blocks are possibly lost in loss record 8 of 34
==25086==    at 0x4C2E0D0: calloc (vg_replace_malloc.c:711)
==25086==    by 0x586DF77: __gf_calloc (mem-pool.c:117)
==25086==    by 0x58705C4: __iobuf_arena_alloc (iobuf.c:174)
==25086==    by 0x58708FD: __iobuf_pool_add_arena (iobuf.c:272)
==25086==    by 0x58709C4: iobuf_pool_add_arena (iobuf.c:297)
==25086==    by 0x5870F3E: iobuf_pool_new (iobuf.c:425)
==25086==    by 0x4E3F1C2: glusterfs_ctx_defaults_init (glfs.c:90)
==25086==    by 0x4E403E6: glfs_init_global_ctx (glfs.c:722)
==25086==    by 0x4E403E6: glfs_new@@GFAPI_3.4.0 (glfs.c:767)
==25086==    by 0x4007D6: main (in /root/gf-test2/a.out)
==25086==
==25086== 360 bytes in 1 blocks are possibly lost in loss record 9 of 34
==25086==    at 0x4C2E0D0: calloc (vg_replace_malloc.c:711)
==25086==    by 0x586DF77: __gf_calloc (mem-pool.c:117)
==25086==    by 0x58705C4: __iobuf_arena_alloc (iobuf.c:174)
==25086==    by 0x58708FD: __iobuf_pool_add_arena (iobuf.c:272)
==25086==    by 0x58709C4: iobuf_pool_add_arena (iobuf.c:297)
==25086==    by 0x5870F63: iobuf_pool_new (iobuf.c:425)
==25086==    by 0x4E3F1C2: glusterfs_ctx_defaults_init (glfs.c:90)
==25086==    by 0x4E403E6: glfs_init_global_ctx (glfs.c:722)
==25086==    by 0x4E403E6: glfs_new@@GFAPI_3.4.0 (glfs.c:767)
==25086==    by 0x4007D6: main (in /root/gf-test2/a.out)
==25086==
==25086== 360 bytes in 1 blocks are possibly lost in loss record 10 of 34
==25086==    at 0x4C2E0D0: calloc (vg_replace_malloc.c:711)
==25086==    by 0x586DF77: __gf_calloc (mem-pool.c:117)
==25086==    by 0x58705C4: __iobuf_arena_alloc (iobuf.c:174)
==25086==    by 0x58708FD: __iobuf_pool_add_arena (iobuf.c:272)
==25086==    by 0x58709C4: iobuf_pool_add_arena (iobuf.c:297)
==25086==    by 0x5870F98: iobuf_pool_new (iobuf.c:425)
==25086==    by 0x4E3F1C2: glusterfs_ctx_defaults_init (glfs.c:90)
==25086==    by 0x4E403E6: glfs_init_global_ctx (glfs.c:722)
==25086==    by 0x4E403E6: glfs_new@@GFAPI_3.4.0 (glfs.c:767)
==25086==    by 0x4007D6: main (in /root/gf-test2/a.out)
==25086==
==25086== 360 bytes in 1 blocks are possibly lost in loss record 11 of 34
==25086==    at 0x4C2E0D0: calloc (vg_replace_malloc.c:711)
==25086==    by 0x586DF77: __gf_calloc (mem-pool.c:117)
==25086==    by 0x58705C4: __iobuf_arena_alloc (iobuf.c:174)
==25086==    by 0x58708FD: __iobuf_pool_add_arena (iobuf.c:272)
==25086==    by 0x58709C4: iobuf_pool_add_arena (iobuf.c:297)
==25086==    by 0x5870FCF: iobuf_pool_new (iobuf.c:425)
==25086==    by 0x4E3F1C2: glusterfs_ctx_defaults_init (glfs.c:90)
==25086==    by 0x4E403E6: glfs_init_global_ctx (glfs.c:722)
==25086==    by 0x4E403E6: glfs_new@@GFAPI_3.4.0 (glfs.c:767)
==25086==    by 0x4007D6: main (in /root/gf-test2/a.out)
==25086==
==25086== 360 bytes in 1 blocks are possibly lost in loss record 12 of 34
==25086==    at 0x4C2E0D0: calloc (vg_replace_malloc.c:711)
==25086==    by 0x586DF77: __gf_calloc (mem-pool.c:117)
==25086==    by 0x58705C4: __iobuf_arena_alloc (iobuf.c:174)
==25086==    by 0x58708FD: __iobuf_pool_add_arena (iobuf.c:272)
==25086==    by 0x58709C4: iobuf_pool_add_arena (iobuf.c:297)
==25086==    by 0x5871004: iobuf_pool_new (iobuf.c:425)
==25086==    by 0x4E3F1C2: glusterfs_ctx_defaults_init (glfs.c:90)
==25086==    by 0x4E403E6: glfs_init_global_ctx (glfs.c:722)
==25086==    by 0x4E403E6: glfs_new@@GFAPI_3.4.0 (glfs.c:767)
==25086==    by 0x4007D6: main (in /root/gf-test2/a.out)
==25086==
==25086== 360 bytes in 1 blocks are possibly lost in loss record 13 of 34
==25086==    at 0x4C2E0D0: calloc (vg_replace_malloc.c:711)
==25086==    by 0x586DF77: __gf_calloc (mem-pool.c:117)
==25086==    by 0x58705C4: __iobuf_arena_alloc (iobuf.c:174)
==25086==    by 0x58708FD: __iobuf_pool_add_arena (iobuf.c:272)
==25086==    by 0x58709C4: iobuf_pool_add_arena (iobuf.c:297)
==25086==    by 0x5871039: iobuf_pool_new (iobuf.c:425)
==25086==    by 0x4E3F1C2: glusterfs_ctx_defaults_init (glfs.c:90)
==25086==    by 0x4E403E6: glfs_init_global_ctx (glfs.c:722)
==25086==    by 0x4E403E6: glfs_new@@GFAPI_3.4.0 (glfs.c:767)
==25086==    by 0x4007D6: main (in /root/gf-test2/a.out)
==25086==
==25086== 360 bytes in 1 blocks are possibly lost in loss record 14 of 34
==25086==    at 0x4C2E0D0: calloc (vg_replace_malloc.c:711)
==25086==    by 0x586DF77: __gf_calloc (mem-pool.c:117)
==25086==    by 0x58705C4: __iobuf_arena_alloc (iobuf.c:174)
==25086==    by 0x58708FD: __iobuf_pool_add_arena (iobuf.c:272)
==25086==    by 0x58709C4: iobuf_pool_add_arena (iobuf.c:297)
==25086==    by 0x5871070: iobuf_pool_new (iobuf.c:425)
==25086==    by 0x4E3F1C2: glusterfs_ctx_defaults_init (glfs.c:90)
==25086==    by 0x4E403E6: glfs_init_global_ctx (glfs.c:722)
==25086==    by 0x4E403E6: glfs_new@@GFAPI_3.4.0 (glfs.c:767)
==25086==    by 0x4007D6: main (in /root/gf-test2/a.out)
==25086==
==25086== 360 bytes in 1 blocks are possibly lost in loss record 15 of 34
==25086==    at 0x4C2E0D0: calloc (vg_replace_malloc.c:711)
==25086==    by 0x586DF77: __gf_calloc (mem-pool.c:117)
==25086==    by 0x58705C4: __iobuf_arena_alloc (iobuf.c:174)
==25086==    by 0x58708FD: __iobuf_pool_add_arena (iobuf.c:272)
==25086==    by 0x58709C4: iobuf_pool_add_arena (iobuf.c:297)
==25086==    by 0x587109C: iobuf_pool_new (iobuf.c:425)
==25086==    by 0x4E3F1C2: glusterfs_ctx_defaults_init (glfs.c:90)
==25086==    by 0x4E403E6: glfs_init_global_ctx (glfs.c:722)
==25086==    by 0x4E403E6: glfs_new@@GFAPI_3.4.0 (glfs.c:767)
==25086==    by 0x4007D6: main (in /root/gf-test2/a.out)
==25086==
==25086== 360 bytes in 1 blocks are possibly lost in loss record 16 of 34
==25086==    at 0x4C2E0D0: calloc (vg_replace_malloc.c:711)
==25086==    by 0x586DF77: __gf_calloc (mem-pool.c:117)
==25086==    by 0x58710BA: iobuf_create_stdalloc_arena (iobuf.c:367)
==25086==    by 0x58710BA: iobuf_pool_new (iobuf.c:431)
==25086==    by 0x4E3F1C2: glusterfs_ctx_defaults_init (glfs.c:90)
==25086==    by 0x4E403E6: glfs_init_global_ctx (glfs.c:722)
==25086==    by 0x4E403E6: glfs_new@@GFAPI_3.4.0 (glfs.c:767)
==25086==    by 0x4007D6: main (in /root/gf-test2/a.out)
==25086==
==25086== 360 bytes in 1 blocks are definitely lost in loss record 17 of 34
==25086==    at 0x4C2E0D0: calloc (vg_replace_malloc.c:711)
==25086==    by 0x586DF77: __gf_calloc (mem-pool.c:117)
==25086==    by 0x58710BA: iobuf_create_stdalloc_arena (iobuf.c:367)
==25086==    by 0x58710BA: iobuf_pool_new (iobuf.c:431)
==25086==    by 0x4E3F1C2: glusterfs_ctx_defaults_init (glfs.c:90)
==25086==    by 0x4E4030B: glfs_new@@GFAPI_3.4.0 (glfs.c:773)
==25086==    by 0x4007D6: main (in /root/gf-test2/a.out)
==25086==
==25086== 576 bytes in 2 blocks are possibly lost in loss record 18 of 34
==25086==    at 0x4C2E0D0: calloc (vg_replace_malloc.c:711)
==25086==    by 0x4011A91: allocate_dtv (in /lib64/ld-2.23.so)
==25086==    by 0x401241D: _dl_allocate_tls (in /lib64/ld-2.23.so)
==25086==    by 0x5F41EC4: pthread_create@@GLIBC_2.2.5 (in /lib64/libpthread-2.23.so)
==25086==    by 0x5853EC3: gf_thread_create (common-utils.c:3584)
==25086==    by 0x58819A1: syncenv_new (syncop.c:827)
==25086==    by 0x4E3F1FC: glusterfs_ctx_defaults_init (glfs.c:101)
==25086==    by 0x4E403E6: glfs_init_global_ctx (glfs.c:722)
==25086==    by 0x4E403E6: glfs_new@@GFAPI_3.4.0 (glfs.c:767)
==25086==    by 0x4007D6: main (in /root/gf-test2/a.out)
==25086==
==25086== 576 bytes in 2 blocks are possibly lost in loss record 19 of 34
==25086==    at 0x4C2E0D0: calloc (vg_replace_malloc.c:711)
==25086==    by 0x4011A91: allocate_dtv (in /lib64/ld-2.23.so)
==25086==    by 0x401241D: _dl_allocate_tls (in /lib64/ld-2.23.so)
==25086==    by 0x5F41EC4: pthread_create@@GLIBC_2.2.5 (in /lib64/libpthread-2.23.so)
==25086==    by 0x5853EC3: gf_thread_create (common-utils.c:3584)
==25086==    by 0x58819A1: syncenv_new (syncop.c:827)
==25086==    by 0x4E3F1FC: glusterfs_ctx_defaults_init (glfs.c:101)
==25086==    by 0x4E4030B: glfs_new@@GFAPI_3.4.0 (glfs.c:773)
==25086==    by 0x4007D6: main (in /root/gf-test2/a.out)
==25086==
==25086== 776 bytes in 1 blocks are possibly lost in loss record 20 of 34
==25086==    at 0x4C2E0D0: calloc (vg_replace_malloc.c:711)
==25086==    by 0x586DF77: __gf_calloc (mem-pool.c:117)
==25086==    by 0x5870226: __iobuf_arena_init_iobufs (iobuf.c:84)
==25086==    by 0x5870686: __iobuf_arena_alloc (iobuf.c:208)
==25086==    by 0x58708FD: __iobuf_pool_add_arena (iobuf.c:272)
==25086==    by 0x58709C4: iobuf_pool_add_arena (iobuf.c:297)
==25086==    by 0x5871070: iobuf_pool_new (iobuf.c:425)
==25086==    by 0x4E3F1C2: glusterfs_ctx_defaults_init (glfs.c:90)
==25086==    by 0x4E403E6: glfs_init_global_ctx (glfs.c:722)
==25086==    by 0x4E403E6: glfs_new@@GFAPI_3.4.0 (glfs.c:767)
==25086==    by 0x4007D6: main (in /root/gf-test2/a.out)
==25086==
==25086== 1,848 bytes in 1 blocks are possibly lost in loss record 21 of 34
==25086==    at 0x4C2E0D0: calloc (vg_replace_malloc.c:711)
==25086==    by 0x586DF77: __gf_calloc (mem-pool.c:117)
==25086==    by 0x5870C08: iobuf_pool_new (iobuf.c:396)
==25086==    by 0x4E3F1C2: glusterfs_ctx_defaults_init (glfs.c:90)
==25086==    by 0x4E403E6: glfs_init_global_ctx (glfs.c:722)
==25086==    by 0x4E403E6: glfs_new@@GFAPI_3.4.0 (glfs.c:767)
==25086==    by 0x4007D6: main (in /root/gf-test2/a.out)
==25086==
==25086== 2,888 bytes in 1 blocks are possibly lost in loss record 22 of 34
==25086==    at 0x4C2E0D0: calloc (vg_replace_malloc.c:711)
==25086==    by 0x586DF77: __gf_calloc (mem-pool.c:117)
==25086==    by 0x5870226: __iobuf_arena_init_iobufs (iobuf.c:84)
==25086==    by 0x5870686: __iobuf_arena_alloc (iobuf.c:208)
==25086==    by 0x58708FD: __iobuf_pool_add_arena (iobuf.c:272)
==25086==    by 0x58709C4: iobuf_pool_add_arena (iobuf.c:297)
==25086==    by 0x5871039: iobuf_pool_new (iobuf.c:425)
==25086==    by 0x4E3F1C2: glusterfs_ctx_defaults_init (glfs.c:90)
==25086==    by 0x4E403E6: glfs_init_global_ctx (glfs.c:722)
==25086==    by 0x4E403E6: glfs_new@@GFAPI_3.4.0 (glfs.c:767)
==25086==    by 0x4007D6: main (in /root/gf-test2/a.out)
==25086==
==25086== 5,112 bytes in 1 blocks are still reachable in loss record 23 of 34
==25086==    at 0x4C2E0D0: calloc (vg_replace_malloc.c:711)
==25086==    by 0x589D07F: glusterfs_ctx_new (ctx.c:24)
==25086==    by 0x4E403B4: glfs_init_global_ctx (glfs.c:711)
==25086==    by 0x4E403B4: glfs_new@@GFAPI_3.4.0 (glfs.c:767)
==25086==    by 0x4007D6: main (in /root/gf-test2/a.out)
==25086==
==25086== 5,704 bytes in 1 blocks are possibly lost in loss record 24 of 34
==25086==    at 0x4C2E0D0: calloc (vg_replace_malloc.c:711)
==25086==    by 0x586DF77: __gf_calloc (mem-pool.c:117)
==25086==    by 0x5870226: __iobuf_arena_init_iobufs (iobuf.c:84)
==25086==    by 0x5870686: __iobuf_arena_alloc (iobuf.c:208)
==25086==    by 0x58708FD: __iobuf_pool_add_arena (iobuf.c:272)
==25086==    by 0x58709C4: iobuf_pool_add_arena (iobuf.c:297)
==25086==    by 0x5871004: iobuf_pool_new (iobuf.c:425)
==25086==    by 0x4E3F1C2: glusterfs_ctx_defaults_init (glfs.c:90)
==25086==    by 0x4E403E6: glfs_init_global_ctx (glfs.c:722)
==25086==    by 0x4E403E6: glfs_new@@GFAPI_3.4.0 (glfs.c:767)
==25086==    by 0x4007D6: main (in /root/gf-test2/a.out)
==25086==
==25086== 11,336 bytes in 1 blocks are possibly lost in loss record 25 of 34
==25086==    at 0x4C2E0D0: calloc (vg_replace_malloc.c:711)
==25086==    by 0x586DF77: __gf_calloc (mem-pool.c:117)
==25086==    by 0x5870226: __iobuf_arena_init_iobufs (iobuf.c:84)
==25086==    by 0x5870686: __iobuf_arena_alloc (iobuf.c:208)
==25086==    by 0x58708FD: __iobuf_pool_add_arena (iobuf.c:272)
==25086==    by 0x58709C4: iobuf_pool_add_arena (iobuf.c:297)
==25086==    by 0x5870FCF: iobuf_pool_new (iobuf.c:425)
==25086==    by 0x4E3F1C2: glusterfs_ctx_defaults_init (glfs.c:90)
==25086==    by 0x4E403E6: glfs_init_global_ctx (glfs.c:722)
==25086==    by 0x4E403E6: glfs_new@@GFAPI_3.4.0 (glfs.c:767)
==25086==    by 0x4007D6: main (in /root/gf-test2/a.out)
==25086==
==25086== 13,496 bytes in 1 blocks are still reachable in loss record 26 of 34
==25086==    at 0x4C2BFA0: malloc (vg_replace_malloc.c:299)
==25086==    by 0x5846834: __gf_default_malloc (mem-pool.h:108)
==25086==    by 0x5846834: xlator_mem_acct_init (xlator.c:590)
==25086==    by 0x4E3F193: glusterfs_ctx_defaults_init (glfs.c:69)
==25086==    by 0x4E4030B: glfs_new@@GFAPI_3.4.0 (glfs.c:773)
==25086==    by 0x4007D6: main (in /root/gf-test2/a.out)
==25086==
==25086== 13,496 bytes in 1 blocks are possibly lost in loss record 27 of 34
==25086==    at 0x4C2BFA0: malloc (vg_replace_malloc.c:299)
==25086==    by 0x5846834: __gf_default_malloc (mem-pool.h:108)
==25086==    by 0x5846834: xlator_mem_acct_init (xlator.c:590)
==25086==    by 0x4E3F193: glusterfs_ctx_defaults_init (glfs.c:69)
==25086==    by 0x4E403E6: glfs_init_global_ctx (glfs.c:722)
==25086==    by 0x4E403E6: glfs_new@@GFAPI_3.4.0 (glfs.c:767)
==25086==    by 0x4007D6: main (in /root/gf-test2/a.out)
==25086==
==25086== 15,600 bytes in 1 blocks are possibly lost in loss record 28 of 34
==25086==    at 0x4C2E0D0: calloc (vg_replace_malloc.c:711)
==25086==    by 0x586DF77: __gf_calloc (mem-pool.c:117)
==25086==    by 0x58818EE: syncenv_new (syncop.c:808)
==25086==    by 0x4E3F1FC: glusterfs_ctx_defaults_init (glfs.c:101)
==25086==    by 0x4E403E6: glfs_init_global_ctx (glfs.c:722)
==25086==    by 0x4E403E6: glfs_new@@GFAPI_3.4.0 (glfs.c:767)
==25086==    by 0x4007D6: main (in /root/gf-test2/a.out)
==25086==
==25086== 15,600 bytes in 1 blocks are possibly lost in loss record 29 of 34
==25086==    at 0x4C2E0D0: calloc (vg_replace_malloc.c:711)
==25086==    by 0x586DF77: __gf_calloc (mem-pool.c:117)
==25086==    by 0x58818EE: syncenv_new (syncop.c:808)
==25086==    by 0x4E3F1FC: glusterfs_ctx_defaults_init (glfs.c:101)
==25086==    by 0x4E4030B: glfs_new@@GFAPI_3.4.0 (glfs.c:773)
==25086==    by 0x4007D6: main (in /root/gf-test2/a.out)
==25086==
==25086== 20,712 bytes in 1 blocks are possibly lost in loss record 30 of 34
==25086==    at 0x4C2E0D0: calloc (vg_replace_malloc.c:711)
==25086==    by 0x586DF77: __gf_calloc (mem-pool.c:117)
==25086==    by 0x58A0FA3: event_pool_new_epoll (event-epoll.c:243)
==25086==    by 0x586D601: event_pool_new (event.c:37)
==25086==    by 0x4E3F1E1: glusterfs_ctx_defaults_init (glfs.c:95)
==25086==    by 0x4E403E6: glfs_init_global_ctx (glfs.c:722)
==25086==    by 0x4E403E6: glfs_new@@GFAPI_3.4.0 (glfs.c:767)
==25086==    by 0x4007D6: main (in /root/gf-test2/a.out)
==25086==
==25086== 20,712 bytes in 1 blocks are definitely lost in loss record 31 of 34
==25086==    at 0x4C2E0D0: calloc (vg_replace_malloc.c:711)
==25086==    by 0x586DF77: __gf_calloc (mem-pool.c:117)
==25086==    by 0x58A0FA3: event_pool_new_epoll (event-epoll.c:243)
==25086==    by 0x586D601: event_pool_new (event.c:37)
==25086==    by 0x4E3F1E1: glusterfs_ctx_defaults_init (glfs.c:95)
==25086==    by 0x4E4030B: glfs_new@@GFAPI_3.4.0 (glfs.c:773)
==25086==    by 0x4007D6: main (in /root/gf-test2/a.out)
==25086==
==25086== 45,128 bytes in 1 blocks are possibly lost in loss record 32 of 34
==25086==    at 0x4C2E0D0: calloc (vg_replace_malloc.c:711)
==25086==    by 0x586DF77: __gf_calloc (mem-pool.c:117)
==25086==    by 0x5870226: __iobuf_arena_init_iobufs (iobuf.c:84)
==25086==    by 0x5870686: __iobuf_arena_alloc (iobuf.c:208)
==25086==    by 0x58708FD: __iobuf_pool_add_arena (iobuf.c:272)
==25086==    by 0x58709C4: iobuf_pool_add_arena (iobuf.c:297)
==25086==    by 0x5870F63: iobuf_pool_new (iobuf.c:425)
==25086==    by 0x4E3F1C2: glusterfs_ctx_defaults_init (glfs.c:90)
==25086==    by 0x4E403E6: glfs_init_global_ctx (glfs.c:722)
==25086==    by 0x4E403E6: glfs_new@@GFAPI_3.4.0 (glfs.c:767)
==25086==    by 0x4007D6: main (in /root/gf-test2/a.out)
==25086==
==25086== 45,128 bytes in 1 blocks are possibly lost in loss record 33 of 34
==25086==    at 0x4C2E0D0: calloc (vg_replace_malloc.c:711)
==25086==    by 0x586DF77: __gf_calloc (mem-pool.c:117)
==25086==    by 0x5870226: __iobuf_arena_init_iobufs (iobuf.c:84)
==25086==    by 0x5870686: __iobuf_arena_alloc (iobuf.c:208)
==25086==    by 0x58708FD: __iobuf_pool_add_arena (iobuf.c:272)
==25086==    by 0x58709C4: iobuf_pool_add_arena (iobuf.c:297)
==25086==    by 0x5870F98: iobuf_pool_new (iobuf.c:425)
==25086==    by 0x4E3F1C2: glusterfs_ctx_defaults_init (glfs.c:90)
==25086==    by 0x4E403E6: glfs_init_global_ctx (glfs.c:722)
==25086==    by 0x4E403E6: glfs_new@@GFAPI_3.4.0 (glfs.c:767)
==25086==    by 0x4007D6: main (in /root/gf-test2/a.out)
==25086==
==25086== 90,184 bytes in 1 blocks are possibly lost in loss record 34 of 34
==25086==    at 0x4C2E0D0: calloc (vg_replace_malloc.c:711)
==25086==    by 0x586DF77: __gf_calloc (mem-pool.c:117)
==25086==    by 0x5870226: __iobuf_arena_init_iobufs (iobuf.c:84)
==25086==    by 0x5870686: __iobuf_arena_alloc (iobuf.c:208)
==25086==    by 0x58708FD: __iobuf_pool_add_arena (iobuf.c:272)
==25086==    by 0x58709C4: iobuf_pool_add_arena (iobuf.c:297)
==25086==    by 0x5870F3E: iobuf_pool_new (iobuf.c:425)
==25086==    by 0x4E3F1C2: glusterfs_ctx_defaults_init (glfs.c:90)
==25086==    by 0x4E403E6: glfs_init_global_ctx (glfs.c:722)
==25086==    by 0x4E403E6: glfs_new@@GFAPI_3.4.0 (glfs.c:767)
==25086==    by 0x4007D6: main (in /root/gf-test2/a.out)
==25086==
==25086== LEAK SUMMARY:
==25086==    definitely lost: 21,154 bytes in 3 blocks
==25086==    indirectly lost: 0 bytes in 0 blocks
==25086==      possibly lost: 273,740 bytes in 30 blocks
==25086==    still reachable: 18,616 bytes in 3 blocks
==25086==         suppressed: 0 bytes in 0 blocks
==25086==
==25086== For counts of detected and suppressed errors, rerun with: -v
==25086== ERROR SUMMARY: 31 errors from 31 contexts (suppressed: 0 from 0)

Actual results:
reported memory leaks

Expected results:
no memory leaks reported

Additional info:

Comment 1 Shyamsundar 2018-06-20 18:29:27 UTC
This bug reported is against a version of Gluster that is no longer maintained
(or has been EOL'd). See https://www.gluster.org/release-schedule/ for the
versions currently maintained.

As a result this bug is being closed.

If the bug persists on a maintained version of gluster or against the mainline
gluster repository, request that it be reopened and the Version field be marked
appropriately.


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