new argus on the dev server

Terry Burton tez at terryburton.co.uk
Thu Oct 7 09:59:39 EDT 2010


On Wed, Oct 6, 2010 at 6:50 PM,  <carter at qosient.com> wrote:
> 17 is attempting to deal with memory problems, so if we've got leaks, there is more work to do.
>
> Any chance you could run valgrind against argus on your system?

Hi Cater,

The output of a couple of successive valgrind runs is included below,
though I'm not sure that you will find them particularly illuminating
for this issue since they do not indicate much of a leak.

I will continue to experiment as I find time.


Thanks,

Terry


----

# valgrind  --leak-check=full ~/argus-3.0.3.17/bin/argus -X -J -R -Z
-U 80 -m -M 60 -i eth4/0.0.0.0 -P 561 -w argus-udp://1.2.3.4:10500
==30297== Memcheck, a memory error detector.
==30297== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==30297== Using LibVEX rev 1854, a library for dynamic binary translation.
==30297== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==30297== Using valgrind-3.3.1-Debian, a dynamic binary
instrumentation framework.
==30297== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==30297== For more details, rerun with: -v
==30297==
argus[30297]: 07 Oct 10 14:08:57.546903 started
argus[30297]: 07 Oct 10 14:08:57.737144 ArgusGetInterfaceStatus:
interface eth4 is up
==30297== Thread 3:
==30297== Conditional jump or move depends on uninitialised value(s)
==30297==    at 0x418934: ArgusUpdateTCPSequence (ArgusTcp.c:656)
==30297==    by 0x41957F: ArgusUpdateTCPState (ArgusTcp.c:278)
==30297==    by 0x40A68F: ArgusUpdateState (ArgusModeler.c:2625)
==30297==    by 0x40B5DC: ArgusUpdateFlow (ArgusModeler.c:2306)
==30297==    by 0x40CE2D: ArgusProcessPacket (ArgusModeler.c:1521)
==30297==    by 0x40F6CC: ArgusEtherPacket (ArgusSource.c:1401)
==30297==    by 0x4E2D7E4: (within /usr/lib/libpcap.so.0.9.8)
==30297==    by 0x412C31: ArgusGetPackets (ArgusSource.c:3295)
==30297==    by 0x547AFC6: start_thread (in /lib/libpthread-2.7.so)
==30297==    by 0x5BF964C: clone (in /lib/libc-2.7.so)
==30297==
==30297== Conditional jump or move depends on uninitialised value(s)
==30297==    at 0x418B2D: ArgusUpdateTCPSequence (ArgusTcp.c:596)
==30297==    by 0x41957F: ArgusUpdateTCPState (ArgusTcp.c:278)
==30297==    by 0x40A68F: ArgusUpdateState (ArgusModeler.c:2625)
==30297==    by 0x40B5DC: ArgusUpdateFlow (ArgusModeler.c:2306)
==30297==    by 0x40CE2D: ArgusProcessPacket (ArgusModeler.c:1521)
==30297==    by 0x40F6CC: ArgusEtherPacket (ArgusSource.c:1401)
==30297==    by 0x4E2D7E4: (within /usr/lib/libpcap.so.0.9.8)
==30297==    by 0x412C31: ArgusGetPackets (ArgusSource.c:3295)
==30297==    by 0x547AFC6: start_thread (in /lib/libpthread-2.7.so)
==30297==    by 0x5BF964C: clone (in /lib/libc-2.7.so)
==30297==
==30297== Thread 2:
==30297== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
==30297==    at 0x5481EEC: (within /lib/libpthread-2.7.so)
==30297==    by 0x41575D: ArgusWriteSocket (ArgusUtil.c:1446)
==30297==    by 0x417BFD: ArgusOutputProcess (ArgusOutput.c:700)
==30297==    by 0x547AFC6: start_thread (in /lib/libpthread-2.7.so)
==30297==    by 0x5BF964C: clone (in /lib/libc-2.7.so)
==30297==  Address 0x5e84a9a is 282 bytes inside a block of size 262,256 alloc'd
==30297==    at 0x4C203E4: calloc (vg_replace_malloc.c:397)
==30297==    by 0x416526: ArgusNewSocket (ArgusUtil.c:1249)
==30297==    by 0x4181B5: ArgusInitOutput (ArgusOutput.c:328)
==30297==    by 0x4060E4: main (argus.c:606)
==30297==
==30297== Thread 3:
==30297== Conditional jump or move depends on uninitialised value(s)
==30297==    at 0x418B37: ArgusUpdateTCPSequence (ArgusTcp.c:596)
==30297==    by 0x41957F: ArgusUpdateTCPState (ArgusTcp.c:278)
==30297==    by 0x40A68F: ArgusUpdateState (ArgusModeler.c:2625)
==30297==    by 0x40B5DC: ArgusUpdateFlow (ArgusModeler.c:2306)
==30297==    by 0x40CE2D: ArgusProcessPacket (ArgusModeler.c:1521)
==30297==    by 0x40F6CC: ArgusEtherPacket (ArgusSource.c:1401)
==30297==    by 0x4E2D7E4: (within /usr/lib/libpcap.so.0.9.8)
==30297==    by 0x412C31: ArgusGetPackets (ArgusSource.c:3295)
==30297==    by 0x547AFC6: start_thread (in /lib/libpthread-2.7.so)
==30297==    by 0x5BF964C: clone (in /lib/libc-2.7.so)
==30297==
==30297== Conditional jump or move depends on uninitialised value(s)
==30297==    at 0x418B88: ArgusUpdateTCPSequence (ArgusTcp.c:596)
==30297==    by 0x41957F: ArgusUpdateTCPState (ArgusTcp.c:278)
==30297==    by 0x40A68F: ArgusUpdateState (ArgusModeler.c:2625)
==30297==    by 0x40B5DC: ArgusUpdateFlow (ArgusModeler.c:2306)
==30297==    by 0x40CE2D: ArgusProcessPacket (ArgusModeler.c:1521)
==30297==    by 0x40F6CC: ArgusEtherPacket (ArgusSource.c:1401)
==30297==    by 0x4E2D7E4: (within /usr/lib/libpcap.so.0.9.8)
==30297==    by 0x412C31: ArgusGetPackets (ArgusSource.c:3295)
==30297==    by 0x547AFC6: start_thread (in /lib/libpthread-2.7.so)
==30297==    by 0x5BF964C: clone (in /lib/libc-2.7.so)
^C==30297==
==30297== Invalid read of size 4
==30297==    at 0x547B628: pthread_join (in /lib/libpthread-2.7.so)
==30297==    by 0x4120B7: ArgusCloseSource (ArgusSource.c:516)
==30297==    by 0x40569F: ArgusComplete (argus.c:714)
==30297==    by 0x40571B: ArgusShutDown (argus.c:838)
==30297==    by 0x40CEB6: ArgusProcessPacket (ArgusModeler.c:1546)
==30297==    by 0x40F6CC: ArgusEtherPacket (ArgusSource.c:1401)
==30297==    by 0x4E2D7E4: (within /usr/lib/libpcap.so.0.9.8)
==30297==    by 0x412C31: ArgusGetPackets (ArgusSource.c:3295)
==30297==    by 0x547AFC6: start_thread (in /lib/libpthread-2.7.so)
==30297==    by 0x5BF964C: clone (in /lib/libc-2.7.so)
==30297==  Address 0x90 is not stack'd, malloc'd or (recently) free'd
==30297==
==30297== Process terminating with default action of signal 11 (SIGSEGV)
==30297==  Access not within mapped region at address 0x90
==30297==    at 0x547B628: pthread_join (in /lib/libpthread-2.7.so)
==30297==    by 0x4120B7: ArgusCloseSource (ArgusSource.c:516)
==30297==    by 0x40569F: ArgusComplete (argus.c:714)
==30297==    by 0x40571B: ArgusShutDown (argus.c:838)
==30297==    by 0x40CEB6: ArgusProcessPacket (ArgusModeler.c:1546)
==30297==    by 0x40F6CC: ArgusEtherPacket (ArgusSource.c:1401)
==30297==    by 0x4E2D7E4: (within /usr/lib/libpcap.so.0.9.8)
==30297==    by 0x412C31: ArgusGetPackets (ArgusSource.c:3295)
==30297==    by 0x547AFC6: start_thread (in /lib/libpthread-2.7.so)
==30297==    by 0x5BF964C: clone (in /lib/libc-2.7.so)
==30297==
==30297== ERROR SUMMARY: 98589 errors from 6 contexts (suppressed: 8 from 1)
==30297== malloc/free: in use at exit: 12,498,234 bytes in 8,855 blocks.
==30297== malloc/free: 253,067 allocs, 244,212 frees, 130,321,138
bytes allocated.
==30297== For counts of detected errors, rerun with: -v
==30297== searching for pointers to 8,855 not-freed blocks.
==30297== checked 29,932,728 bytes.
==30297==
==30297== Thread 1:
==30297==
==30297== 544 bytes in 2 blocks are possibly lost in loss record 13 of 23
==30297==    at 0x4C203E4: calloc (vg_replace_malloc.c:397)
==30297==    by 0x40108CE: _dl_allocate_tls (in /lib/ld-2.7.so)
==30297==    by 0x547A6BA: pthread_create@@GLIBC_2.2.5 (in
/lib/libpthread-2.7.so)
==30297==    by 0x41827A: ArgusInitOutput (ArgusOutput.c:365)
==30297==    by 0x4060E4: main (argus.c:606)
==30297==
==30297==
==30297== 3,172,580 bytes in 3,869 blocks are possibly lost in loss
record 21 of 23
==30297==    at 0x4C203E4: calloc (vg_replace_malloc.c:397)
==30297==    by 0x41F959: ArgusMallocListRecord (argus_util.c:1740)
==30297==    by 0x40801D: ArgusGenerateListRecord (ArgusModeler.c:3404)
==30297==    by 0x408920: ArgusSendFlowRecord (ArgusModeler.c:3629)
==30297==    by 0x41625D: ArgusProcessQueue (ArgusUtil.c:634)
==30297==    by 0x407FEF: ArgusModelerCleanUp (ArgusModeler.c:3694)
==30297==    by 0x40A106: ArgusCloseModeler (ArgusModeler.c:192)
==30297==    by 0x412105: ArgusCloseSource (ArgusSource.c:536)
==30297==    by 0x412091: ArgusCloseSource (ArgusSource.c:511)
==30297==    by 0x40569F: ArgusComplete (argus.c:714)
==30297==    by 0x40571B: ArgusShutDown (argus.c:838)
==30297==    by 0x40CEB6: ArgusProcessPacket (ArgusModeler.c:1546)
==30297==
==30297== LEAK SUMMARY:
==30297==    definitely lost: 0 bytes in 0 blocks.
==30297==      possibly lost: 3,173,124 bytes in 3,871 blocks.
==30297==    still reachable: 9,325,110 bytes in 4,984 blocks.
==30297==         suppressed: 0 bytes in 0 blocks.
==30297== Reachable blocks (those to which a pointer was found) are not shown.
==30297== To see them, rerun with: --leak-check=full --show-reachable=yes
Killed


# valgrind  --leak-check=full ~/argus-3.0.3.17/bin/argus -X -J -R -Z
-U 80 -m -M 60 -i eth5/0.0.0.1 -P 562 -w argus-udp://2.3.4.5:10500
==31420== Memcheck, a memory error detector.
==31420== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==31420== Using LibVEX rev 1854, a library for dynamic binary translation.
==31420== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==31420== Using valgrind-3.3.1-Debian, a dynamic binary
instrumentation framework.
==31420== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==31420== For more details, rerun with: -v
==31420==
argus[31420]: 07 Oct 10 14:14:53.295635 started
argus[31420]: 07 Oct 10 14:14:53.495236 ArgusGetInterfaceStatus:
interface eth5 is up
==31420== Thread 3:
==31420== Conditional jump or move depends on uninitialised value(s)
==31420==    at 0x418934: ArgusUpdateTCPSequence (ArgusTcp.c:656)
==31420==    by 0x41957F: ArgusUpdateTCPState (ArgusTcp.c:278)
==31420==    by 0x40A68F: ArgusUpdateState (ArgusModeler.c:2625)
==31420==    by 0x40B5DC: ArgusUpdateFlow (ArgusModeler.c:2306)
==31420==    by 0x40CE2D: ArgusProcessPacket (ArgusModeler.c:1521)
==31420==    by 0x40F6CC: ArgusEtherPacket (ArgusSource.c:1401)
==31420==    by 0x4E2D7E4: (within /usr/lib/libpcap.so.0.9.8)
==31420==    by 0x412C31: ArgusGetPackets (ArgusSource.c:3295)
==31420==    by 0x547AFC6: start_thread (in /lib/libpthread-2.7.so)
==31420==    by 0x5BF964C: clone (in /lib/libc-2.7.so)
==31420==
==31420== Conditional jump or move depends on uninitialised value(s)
==31420==    at 0x418B2D: ArgusUpdateTCPSequence (ArgusTcp.c:596)
==31420==    by 0x41957F: ArgusUpdateTCPState (ArgusTcp.c:278)
==31420==    by 0x40A68F: ArgusUpdateState (ArgusModeler.c:2625)
==31420==    by 0x40B5DC: ArgusUpdateFlow (ArgusModeler.c:2306)
==31420==    by 0x40CE2D: ArgusProcessPacket (ArgusModeler.c:1521)
==31420==    by 0x40F6CC: ArgusEtherPacket (ArgusSource.c:1401)
==31420==    by 0x4E2D7E4: (within /usr/lib/libpcap.so.0.9.8)
==31420==    by 0x412C31: ArgusGetPackets (ArgusSource.c:3295)
==31420==    by 0x547AFC6: start_thread (in /lib/libpthread-2.7.so)
==31420==    by 0x5BF964C: clone (in /lib/libc-2.7.so)
==31420==
==31420== Conditional jump or move depends on uninitialised value(s)
==31420==    at 0x418B37: ArgusUpdateTCPSequence (ArgusTcp.c:596)
==31420==    by 0x41957F: ArgusUpdateTCPState (ArgusTcp.c:278)
==31420==    by 0x40A68F: ArgusUpdateState (ArgusModeler.c:2625)
==31420==    by 0x40B5DC: ArgusUpdateFlow (ArgusModeler.c:2306)
==31420==    by 0x40CE2D: ArgusProcessPacket (ArgusModeler.c:1521)
==31420==    by 0x40F6CC: ArgusEtherPacket (ArgusSource.c:1401)
==31420==    by 0x4E2D7E4: (within /usr/lib/libpcap.so.0.9.8)
==31420==    by 0x412C31: ArgusGetPackets (ArgusSource.c:3295)
==31420==    by 0x547AFC6: start_thread (in /lib/libpthread-2.7.so)
==31420==    by 0x5BF964C: clone (in /lib/libc-2.7.so)
==31420==
==31420== Conditional jump or move depends on uninitialised value(s)
==31420==    at 0x418B88: ArgusUpdateTCPSequence (ArgusTcp.c:596)
==31420==    by 0x41957F: ArgusUpdateTCPState (ArgusTcp.c:278)
==31420==    by 0x40A68F: ArgusUpdateState (ArgusModeler.c:2625)
==31420==    by 0x40B5DC: ArgusUpdateFlow (ArgusModeler.c:2306)
==31420==    by 0x40CE2D: ArgusProcessPacket (ArgusModeler.c:1521)
==31420==    by 0x40F6CC: ArgusEtherPacket (ArgusSource.c:1401)
==31420==    by 0x4E2D7E4: (within /usr/lib/libpcap.so.0.9.8)
==31420==    by 0x412C31: ArgusGetPackets (ArgusSource.c:3295)
==31420==    by 0x547AFC6: start_thread (in /lib/libpthread-2.7.so)
==31420==    by 0x5BF964C: clone (in /lib/libc-2.7.so)
==31420==
==31420== Conditional jump or move depends on uninitialised value(s)
==31420==    at 0x418934: ArgusUpdateTCPSequence (ArgusTcp.c:656)
==31420==    by 0x41957F: ArgusUpdateTCPState (ArgusTcp.c:278)
==31420==    by 0x40A68F: ArgusUpdateState (ArgusModeler.c:2625)
==31420==    by 0x40B3FC: ArgusUpdateFlow (ArgusModeler.c:2406)
==31420==    by 0x40CE2D: ArgusProcessPacket (ArgusModeler.c:1521)
==31420==    by 0x40F6CC: ArgusEtherPacket (ArgusSource.c:1401)
==31420==    by 0x4E2D7E4: (within /usr/lib/libpcap.so.0.9.8)
==31420==    by 0x412C31: ArgusGetPackets (ArgusSource.c:3295)
==31420==    by 0x547AFC6: start_thread (in /lib/libpthread-2.7.so)
==31420==    by 0x5BF964C: clone (in /lib/libc-2.7.so)
==31420==
==31420== Thread 2:
==31420== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
==31420==    at 0x5481EEC: (within /lib/libpthread-2.7.so)
==31420==    by 0x41575D: ArgusWriteSocket (ArgusUtil.c:1446)
==31420==    by 0x417BFD: ArgusOutputProcess (ArgusOutput.c:700)
==31420==    by 0x547AFC6: start_thread (in /lib/libpthread-2.7.so)
==31420==    by 0x5BF964C: clone (in /lib/libc-2.7.so)
==31420==  Address 0x5e84b46 is 454 bytes inside a block of size 262,256 alloc'd
==31420==    at 0x4C203E4: calloc (vg_replace_malloc.c:397)
==31420==    by 0x416526: ArgusNewSocket (ArgusUtil.c:1249)
==31420==    by 0x4181B5: ArgusInitOutput (ArgusOutput.c:328)
==31420==    by 0x4060E4: main (argus.c:606)
^C==31420==
==31420== Thread 3:
==31420== Invalid read of size 4
==31420==    at 0x547B628: pthread_join (in /lib/libpthread-2.7.so)
==31420==    by 0x4120B7: ArgusCloseSource (ArgusSource.c:516)
==31420==    by 0x40569F: ArgusComplete (argus.c:714)
==31420==    by 0x40571B: ArgusShutDown (argus.c:838)
==31420==    by 0x40CEB6: ArgusProcessPacket (ArgusModeler.c:1546)
==31420==    by 0x40F6CC: ArgusEtherPacket (ArgusSource.c:1401)
==31420==    by 0x4E2D7E4: (within /usr/lib/libpcap.so.0.9.8)
==31420==    by 0x412C31: ArgusGetPackets (ArgusSource.c:3295)
==31420==    by 0x547AFC6: start_thread (in /lib/libpthread-2.7.so)
==31420==    by 0x5BF964C: clone (in /lib/libc-2.7.so)
==31420==  Address 0x90 is not stack'd, malloc'd or (recently) free'd
==31420==
==31420== Process terminating with default action of signal 11 (SIGSEGV)
==31420==  Access not within mapped region at address 0x90
==31420==    at 0x547B628: pthread_join (in /lib/libpthread-2.7.so)
==31420==    by 0x4120B7: ArgusCloseSource (ArgusSource.c:516)
==31420==    by 0x40569F: ArgusComplete (argus.c:714)
==31420==    by 0x40571B: ArgusShutDown (argus.c:838)
==31420==    by 0x40CEB6: ArgusProcessPacket (ArgusModeler.c:1546)
==31420==    by 0x40F6CC: ArgusEtherPacket (ArgusSource.c:1401)
==31420==    by 0x4E2D7E4: (within /usr/lib/libpcap.so.0.9.8)
==31420==    by 0x412C31: ArgusGetPackets (ArgusSource.c:3295)
==31420==    by 0x547AFC6: start_thread (in /lib/libpthread-2.7.so)
==31420==    by 0x5BF964C: clone (in /lib/libc-2.7.so)
==31420==
==31420== ERROR SUMMARY: 903023 errors from 7 contexts (suppressed: 8 from 1)
==31420== malloc/free: in use at exit: 12,756,494 bytes in 9,469 blocks.
==31420== malloc/free: 3,021,447 allocs, 3,011,978 frees,
1,138,324,410 bytes allocated.
==31420== For counts of detected errors, rerun with: -v
==31420== searching for pointers to 9,469 not-freed blocks.
==31420== checked 30,184,264 bytes.
==31420==
==31420== Thread 1:
==31420==
==31420== 544 bytes in 2 blocks are possibly lost in loss record 13 of 23
==31420==    at 0x4C203E4: calloc (vg_replace_malloc.c:397)
==31420==    by 0x40108CE: _dl_allocate_tls (in /lib/ld-2.7.so)
==31420==    by 0x547A6BA: pthread_create@@GLIBC_2.2.5 (in
/lib/libpthread-2.7.so)
==31420==    by 0x41827A: ArgusInitOutput (ArgusOutput.c:365)
==31420==    by 0x4060E4: main (argus.c:606)
==31420==
==31420==
==31420== 3,177,500 bytes in 3,875 blocks are possibly lost in loss
record 21 of 23
==31420==    at 0x4C203E4: calloc (vg_replace_malloc.c:397)
==31420==    by 0x41F959: ArgusMallocListRecord (argus_util.c:1740)
==31420==    by 0x40801D: ArgusGenerateListRecord (ArgusModeler.c:3404)
==31420==    by 0x408920: ArgusSendFlowRecord (ArgusModeler.c:3629)
==31420==    by 0x41625D: ArgusProcessQueue (ArgusUtil.c:634)
==31420==    by 0x407FEF: ArgusModelerCleanUp (ArgusModeler.c:3694)
==31420==    by 0x40A106: ArgusCloseModeler (ArgusModeler.c:192)
==31420==    by 0x412105: ArgusCloseSource (ArgusSource.c:536)
==31420==    by 0x412091: ArgusCloseSource (ArgusSource.c:511)
==31420==    by 0x40569F: ArgusComplete (argus.c:714)
==31420==    by 0x40571B: ArgusShutDown (argus.c:838)
==31420==    by 0x40CEB6: ArgusProcessPacket (ArgusModeler.c:1546)
==31420==
==31420== LEAK SUMMARY:
==31420==    definitely lost: 0 bytes in 0 blocks.
==31420==      possibly lost: 3,178,044 bytes in 3,877 blocks.
==31420==    still reachable: 9,578,450 bytes in 5,592 blocks.
==31420==         suppressed: 0 bytes in 0 blocks.
==31420== Reachable blocks (those to which a pointer was found) are not shown.
==31420== To see them, rerun with: --leak-check=full --show-reachable=yes
Killed



More information about the argus mailing list