[syslog-ng] [Bug 106] New: Syslog-ng memory strdup and g_malloc leaks

bugzilla at bugzilla.balabit.com bugzilla at bugzilla.balabit.com
Mon Dec 20 14:33:00 CET 2010


https://bugzilla.balabit.com/show_bug.cgi?id=106

           Summary: Syslog-ng memory strdup and g_malloc leaks
           Product: syslog-ng
           Version: 3.2.x
          Platform: Other
        OS/Version: Solaris
            Status: NEW
          Severity: minor
          Priority: unspecified
         Component: syslog-ng
        AssignedTo: bazsi at balabit.hu
        ReportedBy: daniel_novak at kb.cz
Type of the Report: refactorization
   Estimated Hours: 0.0


We tried to compile a few last git version of syslog-3.2.1(syslog-ng-3.2.git-5f25ce47ab57774f8fe8df17bc96a006e535cb53) as  well as  3.2.1 stable release.
Everything is running well, but there are  several  minor memory leaks.We run on Solaris 10/08 on sparc platform.With libumem.so in memory debug mode MDB
output is following :


> ::findleaks
CACHE     LEAKED   BUFCTL CALLER
00052288       2 00110d98 libc.so.1`strdup+0xc
00052788       1 0007de00 libglib-2.0.so.0.2513.0`g_malloc0+0x64
----------------------------------------------------------------------
   Total       3 buffers, 64 bytes

===========================================================================================
> ::findleaks -dvf
findleaks:                maximum buffers => 4121
findleaks:                 actual buffers => 3967
mdb: [fef80000, fef84000): couldn't read 16384 bytes at fef80000: no mapping for address
findleaks:
findleaks:             potential pointers => 341574
findleaks:                     dismissals => 196071        (57.4%)
findleaks:                         misses => 130325        (38.1%)
findleaks:                           dups => 11214         ( 3.2%)
findleaks:                        follows => 3964          ( 1.1%)
findleaks:
findleaks:              elapsed wall time => 0 seconds
findleaks:
CACHE     LEAKED   BUFCTL CALLER
00052288       2 00110d98 libc.so.1`strdup+0xc
00052788       1 0007de00 libglib-2.0.so.0.2513.0`g_malloc0+0x64
----------------------------------------------------------------------
   Total       3 buffers, 64 bytes

umem_alloc_16 leak: 2 buffers, 16 bytes each, 32 bytes total
            ADDR          BUFADDR        TIMESTAMP           THREAD
                            CACHE          LASTLOG         CONTENTS
          110d98           1097e0   1b08cf3fb0c96c                1
                            52288            43af4                0
                 libumem.so.1`umem_cache_alloc+0x210
                 libumem.so.1`umem_alloc+0x60
                 libumem.so.1`malloc+0x28
                 libc.so.1`strdup+0xc
                 libsyslog-ng.so.0.0.0`cfg_lexer_lookup_keyword+0xf0
                 libsyslog-ng.so.0.0.0`_cfg_lexer_lex+0x18a4
                 libsyslog-ng.so.0.0.0`cfg_lexer_lex+0x284
                 libsyslog-ng.so.0.0.0`main_lex+0x1c
                 libsyslog-ng.so.0.0.0`main_parse+0x7a4
                 libsyslog-ng.so.0.0.0`cfg_parser_parse+0xcc
                 libsyslog-ng.so.0.0.0`cfg_run_parser+0x1ac
                 libsyslog-ng.so.0.0.0`cfg_read_config+0x98
                 initial_init+0x5c
                 main+0x244
                 _start+0x5c

umem_alloc_32 leak: 1 buffer, 32 bytes
            ADDR          BUFADDR        TIMESTAMP           THREAD
                            CACHE          LASTLOG         CONTENTS
           7de00            77b98   1b08cf406e21b0                1
                            52788            373ec                0
                 libumem.so.1`umem_cache_alloc+0x210
                 libumem.so.1`umem_alloc+0x60
                 libumem.so.1`malloc+0x28
                 libumem.so.1`calloc+0x58
                 libglib-2.0.so.0.2513.0`g_malloc0+0x64
                 libsyslog-ng.so.0.0.0`serialize_file_archive_new+0x1c
                 libsyslog-ng.so.0.0.0`persist_state_load+0x54
                 libsyslog-ng.so.0.0.0`persist_state_start+0x34
                 libsyslog-ng.so.0.0.0`cfg_initial_init+0x28
                 initial_init+0xbc
                 main+0x244
                 _start+0x5c

=========================================================================
findleaks: using cached results (-f will force a full run)
CACHE     LEAKED   BUFCTL CALLER
00052288       2 00110d98 libc.so.1`strdup+0xc
00052788       1 0007de00 libglib-2.0.so.0.2513.0`g_malloc0+0x64
----------------------------------------------------------------------
   Total       3 buffers, 64 bytes
> 00110d98::umem_verify
mdb: cache 110d98 () does not have redzone checking enabled
> 00052288::umem_verify
Summary for cache 'umem_alloc_16'
  clean
> 00052788::umem_verify
Summary for cache 'umem_alloc_32'
  clean
=============================================================================


-- 
Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the syslog-ng mailing list