alerta / nagios-alerta

Forward nagios alerts to the alerta monitoring system
http://alerta.io
MIT License
23 stars 15 forks source link

Fix memory leaks #20

Closed satterly closed 7 years ago

satterly commented 7 years ago

Fixes #19

satterly commented 7 years ago
root@ubuntu-xenial:~/nagios-alerta# valgrind --tool=memcheck --leak-check=yes /usr/local/nagios/bin/nagios /usr/local/nagios/etc/nagios.cfg
==7704== Memcheck, a memory error detector
==7704== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==7704== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==7704== Command: /usr/local/nagios/bin/nagios /usr/local/nagios/etc/nagios.cfg
==7704==

Nagios Core 4.1.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-19-2015
License: GPL

Website: https://www.nagios.org
Nagios 4.1.1 starting... (PID=7704)
Local time is Tue Aug 22 09:09:14 UTC 2017
nerd: Channel hostchecks registered successfully
nerd: Channel servicechecks registered successfully
nerd: Channel opathchecks registered successfully
nerd: Fully initialized and ready to rock!
wproc: Successfully registered manager as @wproc with query handler
wproc: Registry request: name=Core Worker 7705;pid=7705
wproc: Registry request: name=Core Worker 7707;pid=7707
wproc: Registry request: name=Core Worker 7706;pid=7706
wproc: Registry request: name=Core Worker 7708;pid=7708
Event broker module '/usr/lib/nagios/alerta-neb.o' initialized successfully.
Successfully launched command file worker with pid 7709
==7704==
==7704== Process terminating with default action of signal 2 (SIGINT)
==7704==    at 0x544E9D3: ??? (syscall-template.S:84)
==7704==    by 0x472963: iobroker_poll (in /usr/local/nagios/bin/nagios)
==7704==    by 0x4317AF: event_execution_loop (in /usr/local/nagios/bin/nagios)
==7704==    by 0x413A31: main (in /usr/local/nagios/bin/nagios)
==7704==
==7704== HEAP SUMMARY:
==7704==     in use at exit: 5,287,155 bytes in 4,715 blocks
==7704==   total heap usage: 15,583 allocs, 10,868 frees, 6,641,403 bytes allocated
==7704==
==7704== LEAK SUMMARY:
==7704==    definitely lost: 0 bytes in 0 blocks
==7704==    indirectly lost: 0 bytes in 0 blocks
==7704==      possibly lost: 0 bytes in 0 blocks
==7704==    still reachable: 5,287,155 bytes in 4,715 blocks
==7704==         suppressed: 0 bytes in 0 blocks
==7704== Reachable blocks (those to which a pointer was found) are not shown.
==7704== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==7704==
==7704== For counts of detected and suppressed errors, rerun with: -v
==7704== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
==7704== could not unlink /tmp/vgdb-pipe-from-vgdb-to-7704-by-root-on-???
==7704== could not unlink /tmp/vgdb-pipe-to-vgdb-from-7704-by-root-on-???
==7704== could not unlink /tmp/vgdb-pipe-shared-mem-vgdb-7704-by-root-on-???

root@ubuntu-xenial:~/nagios-alerta# ==7709==
==7709== HEAP SUMMARY:
==7709==     in use at exit: 4,595,902 bytes in 3,459 blocks
==7709==   total heap usage: 14,761 allocs, 11,302 frees, 5,457,005 bytes allocated
==7709==
==7709== LEAK SUMMARY:
==7709==    definitely lost: 0 bytes in 0 blocks
==7709==    indirectly lost: 0 bytes in 0 blocks
==7709==      possibly lost: 0 bytes in 0 blocks
==7709==    still reachable: 4,595,902 bytes in 3,459 blocks
==7709==         suppressed: 0 bytes in 0 blocks
==7709== Reachable blocks (those to which a pointer was found) are not shown.
==7709== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==7709==
==7709== For counts of detected and suppressed errors, rerun with: -v
==7709== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
satterly commented 7 years ago

👍