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: