-
Incident report
-
Resolution: Duplicate
-
Major
-
None
-
2.0.11
-
None
-
Linux kernel 3.14.2
After linux kernel upgrade to 3.14.2 net.tcp.listen returns 0 on some ports which are actually in listen state.
strace tells that read from /proc/net/tcp returns only 4050 bytes for each call:
open("/proc/net/tcp", O_RDONLY|O_LARGEFILE) = 3
read(3, " sl local_address rem_address "..., 65536) = 4050
read(3, " 26: 00000000:8BBE 00000000:000"..., 65536) = 4050
read(3, " 53: 0100007F:2742 0100007F:D4F"..., 65536) = 4050
read(3, " 80: 0100007F:D42D 0100007F:274"..., 65536) = 4050
[...]
and zabbix in proc_read_file() function (src/libs/zbxsysinfo/linux/net.c) assumes that if number of read bytes (read() retcode) less then buffer size then whole file was read. It's incorrect assumption for /proc.
I think we should not aim to read /proc/net/tcp by one read() call.
Patch is simple, I can provide it if needed.
- duplicates
-
ZBX-8108 zabbix 2.2.3 net.udp.listen[port] check is not stable
- Closed