[ZBX-10405] Updating log item metadata causes memory leak in history cache Created: 2016 Feb 18 Updated: 2017 May 30 Resolved: 2016 Feb 18 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Proxy (P), Server (S) |
Affects Version/s: | 3.0.0 |
Fix Version/s: | 3.0.1rc1, 3.2.0alpha1 |
Type: | Incident report | Priority: | Blocker |
Reporter: | Andris Zeila | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | memoryleak | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: |
![]() |
||||||||
Issue Links: |
|
Description |
When updating log item metadata (lastlogsize, mtime) a meta value is added to history cache with flag ZBX_DC_FLAG_NOVALUE set. When adding values to history cache this flag is not checked and a value is always cloned into shared memory. However when removing values history cache does check for ZBX_DC_FLAG_NOVALUE flag and does not free value contents if this flag is set. This causes memory leak for log type items - zbx_log_value_t structure is allocated when meta value is added to cache and not freed when the value is removed. Symptoms: Zabbix server/proxy keep running but doesn't do data gathering. Cache usage graph: |
Comments |
Comment by Andris Zeila [ 2016 Feb 18 ] |
Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-10405 |
Comment by Alexander Vladishev [ 2016 Feb 18 ] |
Successfully tested. Take a look at my changes in r58549. wiper reviewed, thanks! |
Comment by Andris Zeila [ 2016 Feb 18 ] |
Released in:
|