Bug 15066 - tail with option -c fails on large files
Summary: tail with option -c fails on large files
Status: NEW
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.34.x
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-20 04:35 UTC by kurien.mathew
Modified: 2022-10-20 04:35 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kurien.mathew 2022-10-20 04:35:57 UTC
tail from
BusyBox v1.34.1 (2022-06-06 22:12:17 UTC) multi-call binary.
when used with the "-c +<byte-offset>" option on a large file (several GB)
we encounter the error "tail: write error: Bad address". The error is sometimes fatal since retries do not always help progress the offset to EOF

For eg
user@mkd:~/test$ kubectl exec -it recorder-9f955c7d4-fjqpl -c generator -- /bin/sh -c "ls -al /data/content.tar.gz"
-rw-r--r--    1 daemon   daemon   2969605492 Oct 20 00:45 /data/content.tar.gz
user@mkd:~/test$ kubectl exec recorder-9f955c7d4-fjqpl -c generator -- /usr/bin/tail -c +2963709953 /data/content.tar.gz
tail: write error: Bad address
command terminated with exit code 1