Debian Bug report logs - #1042546
tac: /tmp/tac...: read error: Illegal seek

version graph

Package: coreutils; Maintainer for coreutils is Michael Stone <mstone@debian.org>; Source for coreutils is src:coreutils (PTS, buildd, popcon).

Reported by: наб <nabijaczleweli@nabijaczleweli.xyz>

Date: Sun, 30 Jul 2023 04:12:01 UTC

Severity: normal

Found in version coreutils/9.1-1

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Michael Stone <mstone@debian.org>:
Bug#1042546; Package coreutils. (Sun, 30 Jul 2023 04:12:03 GMT) (full text, mbox, link).


Acknowledgement sent to наб <nabijaczleweli@nabijaczleweli.xyz>:
New Bug report received and forwarded. Copy sent to Michael Stone <mstone@debian.org>. (Sun, 30 Jul 2023 04:12:03 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: наб <nabijaczleweli@nabijaczleweli.xyz>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: tac: /tmp/tac...: read error: Illegal seek
Date: Sun, 30 Jul 2023 06:09:17 +0200
[Message part 1 (text/plain, inline)]
Package: coreutils
Version: 9.1-1
Severity: normal

Dear Maintainer,

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

наб

-- System Information:
Debian Release: 12.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable-debug'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.1.0-9-amd64 (SMP w/24 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_FIRMWARE_WORKAROUND, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages coreutils depends on:
ii  libacl1      2.3.1-3
ii  libattr1     1:2.5.1-4
ii  libc6        2.36-9+deb12u1
ii  libgmp10     2:6.2.1+dfsg1-1.1
ii  libselinux1  3.4-1+b6

coreutils recommends no packages.

coreutils suggests no packages.

-- no debconf information
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Michael Stone <mstone@debian.org>:
Bug#1042546; Package coreutils. (Sun, 30 Jul 2023 11:15:04 GMT) (full text, mbox, link).


Acknowledgement sent to Pádraig Brady <P@draigBrady.com>:
Extra info received and forwarded to list. Copy sent to Michael Stone <mstone@debian.org>. (Sun, 30 Jul 2023 11:15:04 GMT) (full text, mbox, link).


Message #10 received at 1042546@bugs.debian.org (full text, mbox, reply):

From: Pádraig Brady <P@draigBrady.com>
To: наб <nabijaczleweli@nabijaczleweli.xyz>, 1042546@bugs.debian.org
Subject: Re: Bug#1042546: tac: /tmp/tac...: read error: Illegal seek
Date: Sun, 30 Jul 2023 12:14:10 +0100
On 30/07/2023 05:09, наб wrote:
> Package: coreutils
> Version: 9.1-1
> Severity: normal
> 
> Dear Maintainer,
> 
> $ truncate -s 5G 5G
> $ cat 5G | /bin/tac | wc -c
> /bin/tac: /tmp/tacOOOwnf: read error: Illegal seek
> 0
> 
> наб
> 
> -- System Information:
> Debian Release: 12.1
>    APT prefers stable-updates
>    APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable-debug'), (500, 'stable')
> Architecture: amd64 (x86_64)
> Foreign Architectures: i386

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



Information forwarded to debian-bugs-dist@lists.debian.org, Michael Stone <mstone@debian.org>:
Bug#1042546; Package coreutils. (Sun, 30 Jul 2023 19:33:04 GMT) (full text, mbox, link).


Acknowledgement sent to наб <nabijaczleweli@nabijaczleweli.xyz>:
Extra info received and forwarded to list. Copy sent to Michael Stone <mstone@debian.org>. (Sun, 30 Jul 2023 19:33:04 GMT) (full text, mbox, link).


Message #15 received at 1042546@bugs.debian.org (full text, mbox, reply):

From: наб <nabijaczleweli@nabijaczleweli.xyz>
To: Pádraig Brady <P@draigbrady.com>
Cc: 1042546@bugs.debian.org
Subject: Re: Bug#1042546: tac: /tmp/tac...: read error: Illegal seek
Date: Sun, 30 Jul 2023 21:30:44 +0200
[Message part 1 (text/plain, inline)]
On Sun, Jul 30, 2023 at 12:14:10PM +0100, Pádraig Brady wrote:
> On 30/07/2023 05:09, наб wrote:
> > $ truncate -s 5G 5G
> > $ cat 5G | /bin/tac | wc -c
> > /bin/tac: /tmp/tacOOOwnf: read error: Illegal seek
> > 0
> Couldn't repo with 64 bit tac 9.1
Tested on amd64.

> 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
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,
наб
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Michael Stone <mstone@debian.org>:
Bug#1042546; Package coreutils. (Mon, 31 Jul 2023 12:00:05 GMT) (full text, mbox, link).


Acknowledgement sent to Pádraig Brady <P@draigBrady.com>:
Extra info received and forwarded to list. Copy sent to Michael Stone <mstone@debian.org>. (Mon, 31 Jul 2023 12:00:05 GMT) (full text, mbox, link).


Message #20 received at 1042546@bugs.debian.org (full text, mbox, reply):

From: Pádraig Brady <P@draigBrady.com>
To: 1042546@bugs.debian.org
Subject: Re: Bug#1042546: tac: /tmp/tac...: read error: Illegal seek
Date: Mon, 31 Jul 2023 12:56:31 +0100
[Message part 1 (text/plain, inline)]
On 30/07/2023 20:30, наб wrote:
> On Sun, Jul 30, 2023 at 12:14:10PM +0100, Pádraig Brady wrote:
>> On 30/07/2023 05:09, наб wrote:
>>> $ truncate -s 5G 5G
>>> $ cat 5G | /bin/tac | wc -c
>>> /bin/tac: /tmp/tacOOOwnf: read error: Illegal seek
>>> 0
>> Couldn't repo with 64 bit tac 9.1
> Tested on amd64.
> 
>> 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
> 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

Indeed.
I'm addressing this upstream with the attached.

cheers,
Pádraig
[tac-short-read.patch (text/x-patch, attachment)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Feb 23 07:35:36 2024; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.