https://bugzilla.redhat.com/show_bug.cgi?id=2407742
Bug ID: 2407742
Summary: perl-File-Tail rereads entire file even if file has
not been rotated
Product: Fedora EPEL
Version: epel9
Hardware: All
OS: Linux
Status: NEW
Component: perl-File-Tail
Severity: medium
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
CC: [email protected], [email protected]
Target Milestone: ---
Classification: Fedora
Created attachment 2111494
--> https://bugzilla.redhat.com/attachment.cgi?id=2111494&action=edit
Patch for RPM spec, apply first because init-objects patch changes line numbers
Description of problem:
A file being tailed which is idle for too long will get re-opened and re-read
from the beginning, even if the file has _not_ rotated and the new file handle
is the same file as the old one, the reset_tail logic kicks in even though the
file hasn't been reset. The expected behavior is that if we reopen the same
file to reset our start position for reading at the same place we left off. I
think the bug is in the check for the inode cached in the object against the
new file handle when we re-open, this doesn't work as expected because the
initial file open doesn't cache the inode in the object, only after one
rotation does the inode get added. If you don't re-open a file because it has
activity (resetafter == 100s = interval 10s * adjustafter 10s) at least every
100s then this issue can go unnoticed.
https://stackoverflow.com/questions/78312852/getting-perl-filetail-to-begin-streaming-a-file-towards-the-end
Version-Release number of selected component (if applicable):
perl-File-Tail-1.3-24.el9
Additional info:
attached is a patch for the RPM, I needed to re-order with the init-objects
patch because that adds lines in Tail.pm file which breaks patch/diff without
changing the %_default_patch_fuzz value.
I would have also added this to a fork in src.fedoraproject.org but I haven't
used Pagure before and couldn't figure out how to make my fork writable by me.
I have this same patch added to a local fork of this package in our internal
Gitlab with Epoch: 1 so as to not conflict with EPEL.
--
You are receiving this mail because:
You are on the CC list for the bug.
https://bugzilla.redhat.com/show_bug.cgi?id=2407742
Report this comment as SPAM:
https://bugzilla.redhat.com/enter_bug.cgi?product=Bugzilla&format=report-spam&short_desc=Report%20of%20Bug%202407742%23c0
--
_______________________________________________
perl-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it:
https://pagure.io/fedora-infrastructure/new_issue