-
Problem report
-
Resolution: Unresolved
-
Critical
-
6.0.37
-
- Two file systems: C is NTFS, and D is ReFS.
- This issue occurs only on ReFS.
- Zabbix Agent2 6.0.30
-
S25-W6/7
Steps to reproduce:
- Create a new file and rename it to http-client-test-XX.log.
- Update the log file using the command:
echo yyyy/mm/dd hh:mm "pattern_to_match keywords" >> file - The log file is read during the first interval check.
- During the next interval check (set to 5 minutes in this case), the log file is reread from the beginning.
agent debug log
2024/11/22 19:10:49.947315 log files reside on 'ReFS' file system 2024/11/22 19:10:49.947315 In add_logfile() filename:'D:\usr\sap\BP2\J10\log\http-client-9999-99-99.log' mtime:1732260929 size:190 2024/11/22 19:10:49.947315 add_logfile() logfiles:000001CB00448DB0 logfiles_alloc:64 2024/11/22 19:10:49.947904 End of add_logfile() 2024/11/22 19:10:49.947925 create_old2new_and_copy_of(): is_same_file(D:\usr\sap\BP2\J10\log\http-client-9999-99-99.log, D:\usr\sap\BP2\J10\log\http-client-9999-99-99.log) = 0 2024/11/22 19:10:49.947925 process_logrt() old file list: 2024/11/22 19:10:49.947925 nr:0 filename:'D:\usr\sap\BP2\J10\log\http-client-9999-99-99.log' mtime:1732260929 size:190 processed_size:190 seq:1 copy_of:-1 incomplete:0 dev:1727070486 ino_hi:0 ino_lo:7318349394549687 md5_block_size:190 first_block_md5:c47139dcb0547265a7d7cba2d69b6bda last_block_offset:0 last_block_md5:c47139dcb0547265a7d7cba2d69b6bda 2024/11/22 19:10:49.947925 process_logrt() new file list: (mtime:1732260929 lastlogsize:0 start_idx:0) 2024/11/22 19:10:49.948451 nr:0 filename:'D:\usr\sap\BP2\J10\log\http-client-9999-99-99.log' mtime:1732260929 size:190 processed_size:0 seq:0 copy_of:-1 incomplete:0 dev:14644400346382848250 ino_hi:4628923981209317223 ino_lo:6859022776727039004 md5_block_size:190 first_block_md5:c47139dcb0547265a7d7cba2d69b6bda last_block_offset:0 last_block_md5:c47139dcb0547265a7d7cba2d69b6bda 2024/11/22 19:10:49.948514 In process_log() filename:'D:\usr\sap\BP2\J10\log\http-client-9999-99-99.log' lastlogsize:0 mtime:1732260929 seek_offset:0
- After this, only newly added log entries are read, and rereads do not occur.
Result:
From the debug logs, it appears that the dev, ino_lo, and ino_hi values differ, leading to a reread, even though no changes were made to the file or file system.
https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/zabbix_agent/logfiles/logfiles.c#278,283,297,301,305-306,310-311,314-318,321,324,328-330,332,418,423,431,433
Is it possible that Zabbix uses a 64-bit FileId for the initial check but switches to a 128-bit FileId for subsequent checks, resulting in inconsistencies in identifying the same file on the ReFS file system?
- ino_hi:0 ino_lo:7318349394549687 → 64-bit FileId
- ino_hi:4628923981209317223 ino_lo:6859022776727039004 → 128-bit FileId
FYI:
https://community.osr.com/t/refs-and-128-bit-file-id/54689