GNU bug report logs - #75682
ls -l sometimes shows a year in place of the hour and minute

Previous Next

Package: coreutils;

Reported by: Kasia <xo.okasia <at> proton.me>

Date: Mon, 20 Jan 2025 04:50:02 UTC

Severity: normal

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Kasia <xo.okasia <at> proton.me>
To: "bug-coreutils <at> gnu.org" <bug-coreutils <at> gnu.org>
Subject: ls -l sometimes shows a year in place of the hour and minute
Date: Mon, 20 Jan 2025 01:01:15 +0000
[Message part 1 (text/plain, inline)]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hello Coreutils maintainers,

I believe I've found a bug in the coreutils' ls command.

I was watching a file with watch and ls -l while it was being updated, but sometimes I saw that the time would display a year instead of an hour and minute.

Later I reproduced this issue by doing the following:
- open a terminal emulator
- create two tabs
- run `touch test`
- in tab 1, run
either
while (true); do { ls -l test; }; done;
or
while (true); do { ls -l test | grep -F 2025; }; done;
- in tab 2, run
while (true); do {
 head -c 1 </dev/urandom | grep '[0-9]' | xargs -r -I LENGTH truncate -cs LENGTH test;
}; done;

One tab randomly changes the length of file, while the other shows ls -l of the tile.

In tab 1 I see this:
-rw-r--r-- 1 katarzyna katarzyna 9 Jan 20 00:57 test
-rw-r--r-- 1 katarzyna katarzyna 9 Jan 20 00:57 test
-rw-r--r-- 1 katarzyna katarzyna 9 Jan 20 00:57 test
-rw-r--r-- 1 katarzyna katarzyna 9 Jan 20 00:57 test
-rw-r--r-- 1 katarzyna katarzyna 2 Jan 20  2025 test
-rw-r--r-- 1 katarzyna katarzyna 2 Jan 20 00:57 test
-rw-r--r-- 1 katarzyna katarzyna 2 Jan 20 00:57 test
-rw-r--r-- 1 katarzyna katarzyna 2 Jan 20 00:57 test
-rw-r--r-- 1 katarzyna katarzyna 2 Jan 20 00:57 test

Do you know what might be causing this if it's my system instead of coreutils' ls?

x Kasia
-----BEGIN PGP SIGNATURE-----
Version: ProtonMail

wrsEARYKAG0FgmeNoEYJkJB2+lKi7Z06RRQAAAAAABwAIHNhbHRAbm90YXRp
b25zLm9wZW5wZ3Bqcy5vcmeKB0EiDKo4Q8tcb+sPDcQmtDFjBfOONCanoH3P
zU3VaRYhBOhSZ7P0U35Z9WJN9ZB2+lKi7Z06AACrzQEAg7+S4Y3v8VBJYdRA
3/KlH6A07kxdL8777aXuLGDqdXEA/if94j5pOe7DkpXfqLvK/PgJCvah/SGb
WLUUEVPd9XMD
=jtIB
-----END PGP SIGNATURE-----
[publickey - xo.okasia@proton.me - 0xE85267B3.asc (application/pgp-keys, attachment)]
[publickey - xo.okasia@proton.me - 0xE85267B3.asc.sig (application/pgp-signature, attachment)]

This bug report was last modified 181 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.