[Lognorm] Memory Leak in liblognorm?
Champ Clark III
cclark at quadrantsec.com
Sat Jul 13 23:24:02 CEST 2013
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Okay - this is from a short (45 minute) run..
I'll send another in a bit...
tell me if it sheds any light.
On 7/13/13 2:13 PM, Rainer Gerhards wrote:
> Sounds good. I am interested in the memleak stats that are printed
> out at termination.
>
> Sent from phone, thus brief.
>
> Am 13.07.2013 19:12 schrieb "Champ Clark III"
> <cclark at quadrantsec.com <mailto:cclark at quadrantsec.com>>:
>
> Hello Rainer,
>
> I got my Ubuntu test env up and configured. I'm letting it run for
> a good bit, because it seems the leak doesn't always immediately
> show up. I'm running valgrind with the following options:
>
>
> valgrind --tool=memcheck --leak-check=yes
>
> and
>
> valgrind --tool=memcheck --leak-check=full --show-reachable=yes
> --error-limit=no
>
> Any other flags you want/need?
>
>
> _______________________________________________ Lognorm mailing
> list Lognorm at lists.adiscon.com <mailto:Lognorm at lists.adiscon.com>
> http://lists.adiscon.net/mailman/listinfo/lognorm
>
>
>
> _______________________________________________ Lognorm mailing
> list Lognorm at lists.adiscon.com
> http://lists.adiscon.net/mailman/listinfo/lognorm
>
- --
- - Champ Clark III (cclark at quadrantsec.com)
Quadrant Information Security (http://quadrantsec.com)
Key Fingerprint: 2E56 C2EB 1B25 C517 D5BA 2DCF 5E70 B2F8 0381 878A
GPG Key ID: 0381878A
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJR4cVyAAoJENnmXt7Lmc3KmTkH/1nKckxxbBcvwxcCM8VCLcJx
fPvtGm2MFToC3KVocfQj+AWiqsnF8ZeC7mvz3j0R85VtTzTm+XVpbWtVPNSXR9Sn
2CNKLZBvJ6VPBw88XmDdG+jcUiNXLka0IE3EfDmf/0BmUeLpGv4UbJla8CR0Xv5g
qJKw/+SQfpaiCMWwi2bUQFiNWnCopZgIglypsqhviF0zOOQJ8dGNCrgPfd3Y6ik6
8b/jCiF2IC+2FehQI7NpXv7HFp6GLeXdGKE6bCBsMkSQccl5sW+akj7buCh6e9S0
Lsj3Ib9qOoWrLs8IeMr4Tuqxdc+M/yOXMaEwK9wRwbz/lUacU/XmvKkNHaRc3Lc=
=WnRt
-----END PGP SIGNATURE-----
-------------- next part --------------
==8756== Memcheck, a memory error detector
==8756== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==8756== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==8756== Command: ./sagan
==8756==
==8756== Invalid read of size 1
==8756== at 0x40A995: strlcpy (sagan-strlcpy.c:51)
==8756== by 0x405A60: Load_Config (sagan-config.c:605)
==8756== by 0x402AD3: main (sagan.c:330)
==8756== Address 0x7feffcb60 is just below the stack ptr. To suppress, use: --workaround-gcc296-bugs=yes
==8756==
==8756== Invalid read of size 1
==8756== at 0x40A995: strlcpy (sagan-strlcpy.c:51)
==8756== by 0x405E0E: Load_Config (sagan-config.c:230)
==8756== by 0x402AD3: main (sagan.c:330)
==8756== Address 0x7feffcb60 is just below the stack ptr. To suppress, use: --workaround-gcc296-bugs=yes
==8756==
==8756== Conditional jump or move depends on uninitialised value(s)
==8756== at 0x40AD16: Remove_Spaces (sagan-util.c:155)
==8756== by 0x405DA5: Load_Config (sagan-config.c:227)
==8756== by 0x402AD3: main (sagan.c:330)
==8756==
==8756== Thread 10:
==8756== Conditional jump or move depends on uninitialised value(s)
==8756== at 0x5DFC3B1: vfprintf (vfprintf.c:1630)
==8756== by 0x5E24441: vsnprintf (vsnprintf.c:120)
==8756== by 0x5E04971: snprintf (snprintf.c:35)
==8756== by 0x41444B: Sagan_Blacklist (stdio2.h:65)
==8756== by 0x40BD37: Sagan_Processor (sagan-processor.c:123)
==8756== by 0x595EE99: start_thread (pthread_create.c:308)
==8756==
==8756== Conditional jump or move depends on uninitialised value(s)
==8756== at 0x5EB3BB9: inet_pton4 (inet_pton.c:93)
==8756== by 0x5EB3CDA: inet_pton (inet_pton.c:59)
==8756== by 0x40B149: IP2Bit (sagan-util.c:253)
==8756== by 0x414466: Sagan_Blacklist (sagan-blacklist.c:214)
==8756== by 0x40BD37: Sagan_Processor (sagan-processor.c:123)
==8756== by 0x595EE99: start_thread (pthread_create.c:308)
==8756==
==8756== Conditional jump or move depends on uninitialised value(s)
==8756== at 0x5EB3BC3: inet_pton4 (inet_pton.c:95)
==8756== by 0x5EB3CDA: inet_pton (inet_pton.c:59)
==8756== by 0x40B149: IP2Bit (sagan-util.c:253)
==8756== by 0x414466: Sagan_Blacklist (sagan-blacklist.c:214)
==8756== by 0x40BD37: Sagan_Processor (sagan-processor.c:123)
==8756== by 0x595EE99: start_thread (pthread_create.c:308)
==8756==
==8756== Conditional jump or move depends on uninitialised value(s)
==8756== at 0x5EB3BE4: inet_pton4 (inet_pton.c:100)
==8756== by 0x5EB3CDA: inet_pton (inet_pton.c:59)
==8756== by 0x40B149: IP2Bit (sagan-util.c:253)
==8756== by 0x414466: Sagan_Blacklist (sagan-blacklist.c:214)
==8756== by 0x40BD37: Sagan_Processor (sagan-processor.c:123)
==8756== by 0x595EE99: start_thread (pthread_create.c:308)
==8756==
==8756== Conditional jump or move depends on uninitialised value(s)
==8756== at 0x5EB3C01: inet_pton4 (inet_pton.c:93)
==8756== by 0x5EB3CDA: inet_pton (inet_pton.c:59)
==8756== by 0x40B149: IP2Bit (sagan-util.c:253)
==8756== by 0x414466: Sagan_Blacklist (sagan-blacklist.c:214)
==8756== by 0x40BD37: Sagan_Processor (sagan-processor.c:123)
==8756== by 0x595EE99: start_thread (pthread_create.c:308)
==8756==
==8756== Conditional jump or move depends on uninitialised value(s)
==8756== at 0x5EB3BD0: inet_pton4 (inet_pton.c:98)
==8756== by 0x5EB3CDA: inet_pton (inet_pton.c:59)
==8756== by 0x40B149: IP2Bit (sagan-util.c:253)
==8756== by 0x414466: Sagan_Blacklist (sagan-blacklist.c:214)
==8756== by 0x40BD37: Sagan_Processor (sagan-processor.c:123)
==8756== by 0x595EE99: start_thread (pthread_create.c:308)
==8756==
==8756== Conditional jump or move depends on uninitialised value(s)
==8756== at 0x5EB3C1B: inet_pton4 (inet_pton.c:108)
==8756== by 0x5EB3CDA: inet_pton (inet_pton.c:59)
==8756== by 0x40B149: IP2Bit (sagan-util.c:253)
==8756== by 0x414466: Sagan_Blacklist (sagan-blacklist.c:214)
==8756== by 0x40BD37: Sagan_Processor (sagan-processor.c:123)
==8756== by 0x595EE99: start_thread (pthread_create.c:308)
==8756==
==8756== Conditional jump or move depends on uninitialised value(s)
==8756== at 0x414528: Sagan_Blacklist (sagan-blacklist.c:220)
==8756== by 0x40BD37: Sagan_Processor (sagan-processor.c:123)
==8756== by 0x595EE99: start_thread (pthread_create.c:308)
==8756==
==8756== Conditional jump or move depends on uninitialised value(s)
==8756== at 0x41448B: Sagan_Blacklist (sagan-blacklist.c:220)
==8756== by 0x40BD37: Sagan_Processor (sagan-processor.c:123)
==8756== by 0x595EE99: start_thread (pthread_create.c:308)
==8756==
==8756== Conditional jump or move depends on uninitialised value(s)
==8756== at 0x414530: Sagan_Blacklist (sagan-blacklist.c:220)
==8756== by 0x40BD37: Sagan_Processor (sagan-processor.c:123)
==8756== by 0x595EE99: start_thread (pthread_create.c:308)
==8756==
==8756== Thread 26:
==8756== Invalid read of size 1
==8756== at 0x5DFC3B1: vfprintf (vfprintf.c:1630)
==8756== by 0x5E24441: vsnprintf (vsnprintf.c:120)
==8756== by 0x5E04971: snprintf (snprintf.c:35)
==8756== by 0x41444B: Sagan_Blacklist (stdio2.h:65)
==8756== by 0x40BD37: Sagan_Processor (sagan-processor.c:123)
==8756== by 0x595EE99: start_thread (pthread_create.c:308)
==8756== Address 0x149c14ee is not stack'd, malloc'd or (recently) free'd
==8756==
==8756== Invalid read of size 1
==8756== at 0x5E2D108: _IO_default_xsputn (genops.c:480)
==8756== by 0x5DFBF81: vfprintf (vfprintf.c:1630)
==8756== by 0x5E24441: vsnprintf (vsnprintf.c:120)
==8756== by 0x5E04971: snprintf (snprintf.c:35)
==8756== by 0x41444B: Sagan_Blacklist (stdio2.h:65)
==8756== by 0x40BD37: Sagan_Processor (sagan-processor.c:123)
==8756== by 0x595EE99: start_thread (pthread_create.c:308)
==8756== Address 0x149c14ee is not stack'd, malloc'd or (recently) free'd
==8756==
==8756== Invalid read of size 1
==8756== at 0x5E2D117: _IO_default_xsputn (genops.c:479)
==8756== by 0x5DFBF81: vfprintf (vfprintf.c:1630)
==8756== by 0x5E24441: vsnprintf (vsnprintf.c:120)
==8756== by 0x5E04971: snprintf (snprintf.c:35)
==8756== by 0x41444B: Sagan_Blacklist (stdio2.h:65)
==8756== by 0x40BD37: Sagan_Processor (sagan-processor.c:123)
==8756== by 0x595EE99: start_thread (pthread_create.c:308)
==8756== Address 0x149c14f0 is not stack'd, malloc'd or (recently) free'd
==8756==
==8756== Thread 37:
==8756== Conditional jump or move depends on uninitialised value(s)
==8756== at 0x40A9A4: strlcpy (sagan-strlcpy.c:51)
==8756== by 0x41460E: Sagan_Blacklist (sagan-blacklist.c:228)
==8756== by 0x40BD37: Sagan_Processor (sagan-processor.c:123)
==8756== by 0x595EE99: start_thread (pthread_create.c:308)
==8756==
==8756== Conditional jump or move depends on uninitialised value(s)
==8756== at 0x40A9A4: strlcpy (sagan-strlcpy.c:51)
==8756== by 0x4145E0: Sagan_Blacklist (sagan-blacklist.c:234)
==8756== by 0x40BD37: Sagan_Processor (sagan-processor.c:123)
==8756== by 0x595EE99: start_thread (pthread_create.c:308)
==8756==
==8756== Conditional jump or move depends on uninitialised value(s)
==8756== at 0x5DFC3B1: vfprintf (vfprintf.c:1630)
==8756== by 0x5EBA0DA: __fprintf_chk (fprintf_chk.c:37)
==8756== by 0x40DA73: Sagan_Alert_File (stdio2.h:98)
==8756== by 0x40B920: Sagan_Output (sagan-output.c:52)
==8756== by 0x40C86D: Sagan_Send_Alert (sagan-send-alert.c:55)
==8756== by 0x414501: Sagan_Blacklist (sagan-blacklist.c:240)
==8756== by 0x40BD37: Sagan_Processor (sagan-processor.c:123)
==8756== by 0x595EE99: start_thread (pthread_create.c:308)
==8756==
==8756== Syscall param write(buf) points to uninitialised byte(s)
==8756== at 0x5E9792D: ??? (syscall-template.S:82)
==8756== by 0x5E2A882: _IO_file_write@@GLIBC_2.2.5 (fileops.c:1289)
==8756== by 0x5E2A749: new_do_write (fileops.c:543)
==8756== by 0x5E2BEB4: _IO_do_write@@GLIBC_2.2.5 (fileops.c:516)
==8756== by 0x5E2ADBF: _IO_file_sync@@GLIBC_2.2.5 (fileops.c:918)
==8756== by 0x5E1FCFA: fflush (iofflush.c:43)
==8756== by 0x40DAB3: Sagan_Alert_File (sagan-alert.c:66)
==8756== by 0x40B920: Sagan_Output (sagan-output.c:52)
==8756== by 0x40C86D: Sagan_Send_Alert (sagan-send-alert.c:55)
==8756== by 0x414501: Sagan_Blacklist (sagan-blacklist.c:240)
==8756== by 0x40BD37: Sagan_Processor (sagan-processor.c:123)
==8756== by 0x595EE99: start_thread (pthread_create.c:308)
==8756== Address 0x402607f is not stack'd, malloc'd or (recently) free'd
==8756==
==8756==
==8756== More than 10000000 total errors detected. I'm not reporting any more.
==8756== Final error counts will be inaccurate. Go fix your program!
==8756== Rerun with --error-limit=no to disable this cutoff. Note
==8756== that errors may occur in your program without prior warning from
==8756== Valgrind, because errors are no longer being displayed.
==8756==
==8756==
==8756== HEAP SUMMARY:
==8756== in use at exit: 10,647,639 bytes in 313,567 blocks
==8756== total heap usage: 1,223,383 allocs, 909,816 frees, 496,720,983 bytes allocated
==8756==
==8756== Thread 1:
==8756== 40 bytes in 1 blocks are definitely lost in loss record 28 of 60
==8756== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==8756== by 0x4123FD: Sagan_Engine_Init (sagan-engine.c:85)
==8756== by 0x402AD8: main (sagan.c:331)
==8756==
==8756== 272 bytes in 1 blocks are possibly lost in loss record 34 of 60
==8756== at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==8756== by 0x4012074: _dl_allocate_tls (dl-tls.c:297)
==8756== by 0x595FABC: pthread_create@@GLIBC_2.2.5 (allocatestack.c:571)
==8756== by 0x402D1E: main (sagan.c:505)
==8756==
==8756== 272 bytes in 1 blocks are possibly lost in loss record 35 of 60
==8756== at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==8756== by 0x4012074: _dl_allocate_tls (dl-tls.c:297)
==8756== by 0x595FABC: pthread_create@@GLIBC_2.2.5 (allocatestack.c:571)
==8756== by 0x4036F4: main (sagan.c:517)
==8756==
==8756== 300 (60 direct, 240 indirect) bytes in 1 blocks are definitely lost in loss record 36 of 60
==8756== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==8756== by 0x5EB65A4: nss_parse_service_list (nsswitch.c:678)
==8756== by 0x5EB7065: __nss_database_lookup (nsswitch.c:175)
==8756== by 0x65742A4: ???
==8756== by 0x5E6F9BC: getpwnam_r@@GLIBC_2.2.5 (getXXbyYY_r.c:256)
==8756== by 0x5E6F383: getpwnam (getXXbyYY.c:117)
==8756== by 0x40AF8D: sagan_droppriv (sagan-util.c:92)
==8756== by 0x402B7E: main (sagan.c:383)
==8756==
==8756== 348 (60 direct, 288 indirect) bytes in 1 blocks are definitely lost in loss record 37 of 60
==8756== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==8756== by 0x5EB65A4: nss_parse_service_list (nsswitch.c:678)
==8756== by 0x5EB7065: __nss_database_lookup (nsswitch.c:175)
==8756== by 0x6576AC5: ???
==8756== by 0x5E6D47C: internal_getgrouplist (initgroups.c:114)
==8756== by 0x5E6D788: initgroups (initgroups.c:221)
==8756== by 0x40B007: sagan_droppriv (sagan-util.c:104)
==8756== by 0x402B7E: main (sagan.c:383)
==8756==
==8756== 13,600 bytes in 50 blocks are possibly lost in loss record 48 of 60
==8756== at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==8756== by 0x4012074: _dl_allocate_tls (dl-tls.c:297)
==8756== by 0x595FABC: pthread_create@@GLIBC_2.2.5 (allocatestack.c:571)
==8756== by 0x402D86: main (sagan.c:537)
==8756==
==8756== 521,360 bytes in 49 blocks are possibly lost in loss record 53 of 60
==8756== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==8756== by 0x40B997: Sagan_Processor (sagan-processor.c:59)
==8756== by 0x595EE99: start_thread (pthread_create.c:308)
==8756==
==8756== 835,776 bytes in 52,236 blocks are definitely lost in loss record 55 of 60
==8756== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==8756== by 0x5457CD9: es_newStr (string.c:105)
==8756== by 0x5457D5E: es_newStrFromBuf (string.c:139)
==8756== by 0x40C318: sagan_normalize_liblognorm (sagan-liblognorm.c:125)
==8756== by 0x41464F: Sagan_Blacklist (sagan-blacklist.c:167)
==8756== by 0x40BD37: Sagan_Processor (sagan-processor.c:123)
==8756== by 0x595EE99: start_thread (pthread_create.c:308)
==8756==
==8756== 835,776 bytes in 52,236 blocks are definitely lost in loss record 56 of 60
==8756== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==8756== by 0x5457CD9: es_newStr (string.c:105)
==8756== by 0x5457D5E: es_newStrFromBuf (string.c:139)
==8756== by 0x40C35C: sagan_normalize_liblognorm (sagan-liblognorm.c:131)
==8756== by 0x41464F: Sagan_Blacklist (sagan-blacklist.c:167)
==8756== by 0x40BD37: Sagan_Processor (sagan-processor.c:123)
==8756== by 0x595EE99: start_thread (pthread_create.c:308)
==8756==
==8756== 835,776 bytes in 52,236 blocks are definitely lost in loss record 57 of 60
==8756== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==8756== by 0x5457CD9: es_newStr (string.c:105)
==8756== by 0x5457D5E: es_newStrFromBuf (string.c:139)
==8756== by 0x40C3A0: sagan_normalize_liblognorm (sagan-liblognorm.c:137)
==8756== by 0x41464F: Sagan_Blacklist (sagan-blacklist.c:167)
==8756== by 0x40BD37: Sagan_Processor (sagan-processor.c:123)
==8756== by 0x595EE99: start_thread (pthread_create.c:308)
==8756==
==8756== 835,776 bytes in 52,236 blocks are definitely lost in loss record 58 of 60
==8756== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==8756== by 0x5457CD9: es_newStr (string.c:105)
==8756== by 0x5457D5E: es_newStrFromBuf (string.c:139)
==8756== by 0x40C3F5: sagan_normalize_liblognorm (sagan-liblognorm.c:144)
==8756== by 0x41464F: Sagan_Blacklist (sagan-blacklist.c:167)
==8756== by 0x40BD37: Sagan_Processor (sagan-processor.c:123)
==8756== by 0x595EE99: start_thread (pthread_create.c:308)
==8756==
==8756== 835,776 bytes in 52,236 blocks are definitely lost in loss record 59 of 60
==8756== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==8756== by 0x5457CD9: es_newStr (string.c:105)
==8756== by 0x5457D5E: es_newStrFromBuf (string.c:139)
==8756== by 0x40C44A: sagan_normalize_liblognorm (sagan-liblognorm.c:165)
==8756== by 0x41464F: Sagan_Blacklist (sagan-blacklist.c:167)
==8756== by 0x40BD37: Sagan_Processor (sagan-processor.c:123)
==8756== by 0x595EE99: start_thread (pthread_create.c:308)
==8756==
==8756== 5,191,136 bytes in 52,236 blocks are definitely lost in loss record 60 of 60
==8756== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==8756== by 0x5457CD9: es_newStr (string.c:105)
==8756== by 0x5457D0E: es_newStrFromCStr (string.c:125)
==8756== by 0x40C2B2: sagan_normalize_liblognorm (sagan-liblognorm.c:114)
==8756== by 0x41464F: Sagan_Blacklist (sagan-blacklist.c:167)
==8756== by 0x40BD37: Sagan_Processor (sagan-processor.c:123)
==8756== by 0x595EE99: start_thread (pthread_create.c:308)
==8756==
==8756== LEAK SUMMARY:
==8756== definitely lost: 9,370,176 bytes in 313,419 blocks
==8756== indirectly lost: 528 bytes in 22 blocks
==8756== possibly lost: 535,504 bytes in 101 blocks
==8756== still reachable: 741,431 bytes in 25 blocks
==8756== suppressed: 0 bytes in 0 blocks
==8756== Reachable blocks (those to which a pointer was found) are not shown.
==8756== To see them, rerun with: --leak-check=full --show-reachable=yes
==8756==
==8756== For counts of detected and suppressed errors, rerun with: -v
==8756== Use --track-origins=yes to see where uninitialised values come from
==8756== ERROR SUMMARY: 10000013 errors from 33 contexts (suppressed: 2 from 2)
==8756== could not unlink /tmp/vgdb-pipe-from-vgdb-to-8756-by-root-on-???
==8756== could not unlink /tmp/vgdb-pipe-to-vgdb-from-8756-by-root-on-???
==8756== could not unlink /tmp/vgdb-pipe-shared-mem-vgdb-8756-by-root-on-???
More information about the Lognorm
mailing list