Project

General

Profile

Actions

Bug #2434

closed

memleak - possible/definite memleaks reported for libnss3 and pthread_create

Added by Peter Manev about 6 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

Not sure if we need to add suppressions for any of these.

==160038== 4,096 bytes in 2 blocks are possibly lost in loss record 1,995 of 2,299
==160038==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==160038==    by 0x7EFC06F: PL_ArenaAllocate (in /usr/lib/x86_64-linux-gnu/libplds4.so)
==160038==    by 0x6CD12F3: ??? (in /usr/lib/x86_64-linux-gnu/libnss3.so)
==160038==    by 0x6CD13DF: ??? (in /usr/lib/x86_64-linux-gnu/libnss3.so)
==160038==    by 0x6C8587E: ??? (in /usr/lib/x86_64-linux-gnu/libnss3.so)
==160038==    by 0x6CCA2E9: ??? (in /usr/lib/x86_64-linux-gnu/libnss3.so)
==160038==    by 0x6CCA44F: ??? (in /usr/lib/x86_64-linux-gnu/libnss3.so)
==160038==    by 0x6C72A44: ??? (in /usr/lib/x86_64-linux-gnu/libnss3.so)
==160038==    by 0x6C731B7: NSS_NoDB_Init (in /usr/lib/x86_64-linux-gnu/libnss3.so)
==160038==    by 0x413184: PostConfLoadedSetup (suricata.c:2677)
==160038==    by 0x413184: main (suricata.c:2844)
==160038==
{
   <insert_a_suppression_name_here>
   Memcheck:Leak
   match-leak-kinds: possible
   fun:malloc
   fun:PL_ArenaAllocate
   obj:/usr/lib/x86_64-linux-gnu/libnss3.so
   obj:/usr/lib/x86_64-linux-gnu/libnss3.so
   obj:/usr/lib/x86_64-linux-gnu/libnss3.so
   obj:/usr/lib/x86_64-linux-gnu/libnss3.so
   obj:/usr/lib/x86_64-linux-gnu/libnss3.so
   obj:/usr/lib/x86_64-linux-gnu/libnss3.so
   fun:NSS_NoDB_Init
   fun:PostConfLoadedSetup
   fun:main
}
==160038== 12,800 bytes in 40 blocks are possibly lost in loss record 2,065 of 2,299
==160038==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==160038==    by 0x40138A4: allocate_dtv (dl-tls.c:322)
==160038==    by 0x40138A4: _dl_allocate_tls (dl-tls.c:539)
==160038==    by 0x639C26E: allocate_stack (allocatestack.c:588)
==160038==    by 0x639C26E: pthread_create@@GLIBC_2.2.5 (pthread_create.c:539)
==160038==    by 0x59AFA6: TmThreadSpawn (tm-threads.c:1891)
==160038==    by 0x568D79: RunModeFilePcapAutoFp (runmode-pcap-file.c:255)
==160038==    by 0x56ED07: RunModeDispatch (runmodes.c:371)
==160038==    by 0x413225: main (suricata.c:2862)
==160038==
{
   <insert_a_suppression_name_here>
   Memcheck:Leak
   match-leak-kinds: possible
   fun:calloc
   fun:allocate_dtv
   fun:_dl_allocate_tls
   fun:allocate_stack
   fun:pthread_create@@GLIBC_2.2.5
   fun:TmThreadSpawn
   fun:RunModeFilePcapAutoFp
   fun:RunModeDispatch
   fun:main
}

Using -

valgrind --gen-suppressions=all --leak-check=full  --suppressions=qa/valgrind.suppress /opt/suricata-git-rctests/bin/suricata -c /opt/suricata-git-rctests/etc/suricata/suricata.yaml -S "/opt/suricata-git-rctests/etc/suricata/etpro/rules/enableall*.rules" --set "app-layer.protocols.modbus.enabled=yes" -k none -r ../../ja3/merged_pevma.pcap


/opt/suricata-git-rctests/bin/suricata --build-info
This is Suricata version 4.1.0-dev (rev d212194)
Features: PCAP_SET_BUFF AF_PACKET HAVE_PACKET_FANOUT LIBCAP_NG LIBNET1.1 HAVE_HTP_URI_NORMALIZE_HOOK PCRE_JIT HAVE_NSS HAVE_LUA HAVE_LUAJIT HAVE_LIBJANSSON TLS MAGIC RUST 
SIMD support: SSE_4_2 SSE_4_1 SSE_3 
Atomic intrisics: 1 2 4 8 16 byte(s)
64-bits, Little-endian architecture
GCC version 5.4.0 20160609, C version 199901
compiled with _FORTIFY_SOURCE=2
L1 cache line size (CLS)=64
thread local storage method: __thread
compiled with LibHTP v0.5.25, linked against LibHTP v0.5.25

Suricata Configuration:
  AF_PACKET support:                       yes
  PF_RING support:                         no
  NFQueue support:                         no
  NFLOG support:                           no
  IPFW support:                            no
  Netmap support:                          no
  DAG enabled:                             no
  Napatech enabled:                        no

  Unix socket enabled:                     yes
  Detection enabled:                       yes

  Libmagic support:                        yes
  libnss support:                          yes
  libnspr support:                         yes
  libjansson support:                      yes
  liblzma support:                         no
  hiredis support:                         no
  hiredis async with libevent:             no
  Prelude support:                         no
  PCRE jit:                                yes
  LUA support:                             yes, through luajit
  libluajit:                               yes
  libgeoip:                                yes
  Non-bundled htp:                         no
  Old barnyard2 support:                   no
  Hyperscan support:                       no
  Libnet support:                          yes

  Rust support (experimental):             yes
  Experimental Rust parsers:               no
  Rust strict mode:                        no
  Rust debug mode:                         no

  Suricatasc install:                      yes

  Profiling enabled:                       no
  Profiling locks enabled:                 no

Development settings:
  Coccinelle / spatch:                     yes
  Unit tests enabled:                      no
  Debug output enabled:                    no
  Debug validation enabled:                no

Generic build parameters:
  Installation prefix:                     /opt/suricata-git-rctests
  Configuration directory:                 /opt/suricata-git-rctests/etc/suricata/
  Log directory:                           /opt/suricata-git-rctests/var/log/suricata/

  --prefix                                 /opt/suricata-git-rctests
  --sysconfdir                             /opt/suricata-git-rctests/etc
  --localstatedir                          /opt/suricata-git-rctests/var

  Host:                                    x86_64-pc-linux-gnu
  Compiler:                                gcc (exec name) / gcc (real)
  GCC Protect enabled:                     no
  GCC march native enabled:                yes
  GCC Profile enabled:                     no
  Position Independent Executable enabled: no
  CFLAGS                                   -g -O2 -march=native -I${srcdir}/../rust/gen/c-headers
  PCAP_CFLAGS                               -I/usr/include
  SECCFLAGS                                

Actions

Also available in: Atom PDF