-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Hi,
We've been running ptm built from here for some time and we see that the memory size for this process continually grows. Eventually Linux oom-killer intervenes. The ptmd process is about 3GB at this stage. It may take several days for it to reach this.
Restarting the process brings it back to < 1MB.
Yesterday I ran:
valgrind --leak-check=yes /usr/sbin/ptmd -l INFO
...for about 16 hours, then eventually hit ^C.
The end of the output was this:
==47300== 2,749,568 (207,616 direct, 2,541,952 indirect) bytes in 6,488 blocks are definitely lost in loss record 138 of 141
==47300== at 0x4C2820A: malloc (vg_replace_malloc.c:296)
==47300== by 0x414D39: csv_encode (in /usr/sbin/ptmd)
==47300== by 0x403660: ptm_status_lldp (in /usr/sbin/ptmd)
==47300== by 0x40A5A2: ptm_conf_get_port_status (in /usr/sbin/ptmd)
==47300== by 0x40A7BA: ptm_conf_ctl_cmd_get_status (in /usr/sbin/ptmd)
==47300== by 0x40A21B: ptm_conf_process_client_query (in /usr/sbin/ptmd)
==47300== by 0x407514: ptm_event_ctl (in /usr/sbin/ptmd)
==47300== by 0x4078DF: ptm_module_handle_event_cb (in /usr/sbin/ptmd)
==47300== by 0x4075C6: ptm_process_ctl (in /usr/sbin/ptmd)
==47300== by 0x408525: main (in /usr/sbin/ptmd)
==47300==
==47300== 4,404,190 (202,976 direct, 4,201,214 indirect) bytes in 6,343 blocks are definitely lost in loss record 141 of 141
==47300== at 0x4C2820A: malloc (vg_replace_malloc.c:296)
==47300== by 0x414905: csv_concat_record (in /usr/sbin/ptmd)
==47300== by 0x40A522: ptm_conf_get_port_status (in /usr/sbin/ptmd)
==47300== by 0x40A7BA: ptm_conf_ctl_cmd_get_status (in /usr/sbin/ptmd)
==47300== by 0x40A21B: ptm_conf_process_client_query (in /usr/sbin/ptmd)
==47300== by 0x407514: ptm_event_ctl (in /usr/sbin/ptmd)
==47300== by 0x4078DF: ptm_module_handle_event_cb (in /usr/sbin/ptmd)
==47300== by 0x4075C6: ptm_process_ctl (in /usr/sbin/ptmd)
==47300== by 0x408525: main (in /usr/sbin/ptmd)
==47300==
==47300== LEAK SUMMARY:
==47300== definitely lost: 1,181,783 bytes in 36,934 blocks
==47300== indirectly lost: 14,435,998 bytes in 451,125 blocks
==47300== possibly lost: 3,408 bytes in 78 blocks
==47300== still reachable: 60,530 bytes in 364 blocks
==47300== suppressed: 0 bytes in 0 blocks
==47300== Reachable blocks (those to which a pointer was found) are not shown.
==47300== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==47300==
==47300== For counts of detected and suppressed errors, rerun with: -v
==47300== Use --track-origins=yes to see where uninitialised values come from
==47300== ERROR SUMMARY: 14471 errors from 32 contexts (suppressed: 7 from 5)