[ZBX-18014] Memory leak when message is not in active time period Created: 2020 Jul 03  Updated: 2024 Apr 10  Resolved: 2020 Jul 28

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: None
Fix Version/s: 4.0.23rc1, 5.0.3rc1, 5.2.0alpha1, 5.2 (plan)

Type: Problem report Priority: Major
Reporter: Vladislavs Sokurenko Assignee: Viktors Tjarve
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Causes
caused by ZBXNEXT-1675 Add macros support for update intervals Closed
Team: Team A
Sprint: Sprint 66 (Jul 2020)
Story Points: 0.5

 Description   

Configure user "When active" period to some period that is not now for example 1-7,07:05-07:06
Trigger an alarm and observe:

Leaks detected:
==79556== HEAP SUMMARY:
==79556==     in use at exit: 916,678 bytes in 14,961 blocks
==79556==   total heap usage: 192,797 allocs, 177,836 frees, 18,544,347 bytes allocated
==79556== 
==79556== 16 bytes in 1 blocks are definitely lost in loss record 24 of 1,259
==79556==    at 0x483A809: malloc (vg_replace_malloc.c:307)
==79556==    by 0x5BF334E: strdup (in /usr/lib64/libc-2.31.so)
==79556==    by 0x5DEC73: zbx_strdup2 (misc.c:658)
==79556==    by 0x47407D: add_message_alert (escalator.c:1323)
==79556==    by 0x47253B: flush_user_msg (escalator.c:801)
==79556==    by 0x47503E: escalation_execute_recovery_operations (escalator.c:1699)
==79556==    by 0x475FC4: escalation_recover (escalator.c:2111)
==79556==    by 0x476AFB: process_db_escalations (escalator.c:2418)
==79556==    by 0x477731: process_escalations (escalator.c:2688)
==79556==    by 0x4779AF: escalator_thread (escalator.c:2758)
==79556==    by 0x5D6CA8: zbx_thread_start (threads.c:136)
==79556==    by 0x426827: MAIN_ZABBIX_ENTRY (server.c:1241)
==79556== 
==79556== 16 bytes in 1 blocks are definitely lost in loss record 25 of 1,259
==79556==    at 0x483A809: malloc (vg_replace_malloc.c:307)
==79556==    by 0x5BF334E: strdup (in /usr/lib64/libc-2.31.so)
==79556==    by 0x5DEC73: zbx_strdup2 (misc.c:658)
==79556==    by 0x47407D: add_message_alert (escalator.c:1323)
==79556==    by 0x47253B: flush_user_msg (escalator.c:801)
==79556==    by 0x474CEA: escalation_execute_operations (escalator.c:1602)
==79556==    by 0x475F13: escalation_execute (escalator.c:2088)
==79556==    by 0x476B48: process_db_escalations (escalator.c:2424)
==79556==    by 0x477731: process_escalations (escalator.c:2688)
==79556==    by 0x4779AF: escalator_thread (escalator.c:2758)
==79556==    by 0x5D6CA8: zbx_thread_start (threads.c:136)
==79556==    by 0x426827: MAIN_ZABBIX_ENTRY (server.c:1241)


 Comments   
Comment by Viktors Tjarve [ 2020 Jul 17 ]

Released in:

Generated at Sat Apr 19 04:39:13 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.