#1042546 tac: /tmp/tac...: read error: Illegal seek

Package:
coreutils
Source:
coreutils
Description:
GNU core utilities
Submitter:
наб
Date:
2023-07-31 12:00:06 UTC
Severity:
normal
#1042546#5
Date:
2023-07-30 04:09:17 UTC
From:
To:
Dear Maintainer,

$ truncate -s 5G 5G
$ cat 5G | /bin/tac | wc -c
/bin/tac: /tmp/tacOOOwnf: read error: Illegal seek
0

наб

#1042546#10
Date:
2023-07-30 11:14:10 UTC
From:
To:
Couldn't repo with 64 bit tac 9.1
or 32 bit tac latest

I just get the expected:

$ cat 5G | git/coreutils/src/tac | wc -c
git/coreutils/src/tac: /tmp/cutmpZRrn27: write error: No space left on device

cheers,
Pádraig

#1042546#15
Date:
2023-07-30 19:30:44 UTC
From:
To:
Tested on amd64.
Well, what if you let /tmp grow enough to allocate the 5G
(or put it on a compressed filesystem that'll discard the zeroes)?
I ran this on a big system so my /tmp has 47G avail,
but I can reproduce your lack of reproduction by making it too small:

# mount -t tmpfs -o size=1g tmpfs dir
$ cat 5G | TMPDIR=dir /bin/tac | wc -c
/bin/tac: dir/tacbIeNII: write error: No space left on device
0

Best,
наб

#1042546#20
Date:
2023-07-31 11:56:31 UTC
From:
To:
Indeed.
I'm addressing this upstream with the attached.

cheers,
Pádraig