-
Type:
Problem report
-
Resolution: Unresolved
-
Priority:
Trivial
-
None
-
Affects Version/s: 7.4.15, 8.0.0rc1, 8.0.0rc2
-
Component/s: None
-
None
-
Environment:- Zabbix agent 2 7.4.15 from repo.zabbix.com
- Ubuntu 24.04, Ubuntu 26.04 and Debian 13 (all affected)
- The item works on Debian 13 hosts that do not have the packages below
system.sw.packages.get returns ZBX_NOTSUPPORTED as soon as ONE installed deb package
has a fractional Installed-Size. The classic key system.sw.packages[,dpkg] still works on
the same hosts.
Packages in our case (Synology Active Backup for Business Linux agent, third party):
$ dpkg-query -W -f='${Package}|${Installed-Size}|${Version}\n' synosnap synology-active-backup-business-linux-service
synosnap|1068.865234375|0.12.10
synology-active-backup-business-linux-service|204288.181640625|3.2.1-5059
All other packages on the hosts have integer sizes (for example rsyslog: 1999).
dpkg itself accepts and stores these values without complaint.
Steps to reproduce:
1. Install a deb package whose control file has a non-integer Installed-Size
(we hit it with the two packages above).
2. Run: zabbix_agent2 -c /etc/zabbix/zabbix_agent2.conf -t system.sw.packages.get
Result:
system.sw.packages.get [m|ZBX_NOTSUPPORTED] [Failed to read sw value: cannot obtain package information.]
Expected:
The item returns the package list. A single package with an unusual size field should not
make the whole item fail. A size that cannot be parsed could be reported as 0, the same as
for a missing size, or the package could be skipped with a debug message.
Analysis (src/go/plugins/system/sw/sw_linux.go, function dpkgDetails):
if split[4] != "" {
size, err = strconv.ParseUint(split[4], 10, 64)
if err != nil
}
Only an empty Installed-Size is tolerated (the ZBX-22678 fix). Any other value that is
not an unsigned integer makes ParseUint fail, and the error is returned for the whole
list. The pacman and slackware code paths parse sizes with ParseFloat; the rpm path has
the same strict ParseUint behaviour (compare ZBX-26961, where "(none)" in the size
field causes the same failure on RHEL).
Verification that the size is the trigger: with a temporary dpkg-query wrapper placed first
in PATH that rounds the two fractional values to integers, the same command returns the
full package list. Nothing on the system was modified for this test.
Related:
ZBX-22678(empty Installed-Size, fixed in 6.4.9 / 7.0.0)- ZBX-26961 (rpm, "(none)" in the size field, still unresolved)
Workaround:
Use system.sw.packages[,dpkg] instead of system.sw.packages.get.