[ZBX-8238] logrt may continue reading an old file repeatedly. Created: 2014 May 21 Updated: 2017 May 30 Resolved: 2014 May 26 |
|
| Status: | Closed |
| Project: | ZABBIX BUGS AND ISSUES |
| Component/s: | Agent (G) |
| Affects Version/s: | 2.0.12, 2.2.3 |
| Fix Version/s: | 2.0.13rc1, 2.2.4rc1, 2.3.1 |
| Type: | Incident report | Priority: | Blocker |
| Reporter: | Yoshinori Komuro | Assignee: | Unassigned |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | logrt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
RHEL6.5 |
||
| Attachments: |
|
| Description |
|
When the size of a file new after log rotation is 0 byte, reading the log of an old file will be continued. --after log rotation old file new file --In process_logrt() First ?process_log() lastlogsize=0 ?Only lastlogsize is updated. --In process_logrt() Second.... ?process_log() lastlogsize=0 ?Only lastlogsize is updated..... |
| Comments |
| Comment by Oleksii Zagorskyi [ 2014 May 22 ] |
|
Might be duplicate of |
| Comment by Andris Mednis [ 2014 May 22 ] |
|
This is not a duplicate of |
| Comment by Andris Mednis [ 2014 May 22 ] |
|
Thanks, Yoshinori, for reporting the issue and patch! Small modification of patch + if (NULL != mtime) + *mtime = (int)buf.st_mtime; to prevent crash on log[] items. |
| Comment by Andris Mednis [ 2014 May 23 ] |
|
Documented in "Known issues" |
| Comment by Andris Mednis [ 2014 May 26 ] |
|
Patches for 2.0.12 and 2.2.3 available in attachments. Please review and test. wiper 2.0.12 patch successfully tested |
| Comment by Andris Mednis [ 2014 May 26 ] |
|
While not absolutely necessary, this patch improves also current 2.0 and 2.2 (with fix |
| Comment by Andris Mednis [ 2014 May 28 ] |
|
Fixed in versions pre-2.0.13 r45917, pre-2.2.4 r45927, pre-2.3.1 r45931. |
| Comment by Volker Fröhlich [ 2014 Jun 04 ] |
|
A backported patch for this issue is used in the following Fedora/EPEL packages: zabbix-2.0.12-2.fc19 |