screen -ls displays incorrect dates and times for existing sessions

Bug #2050938 reported by Stephen Bosch
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
screen (Debian)
New
Unknown
screen (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Consider the following output:

380639.pts-1.host user@host 2024-01-23 13:09:12 ~ $ screen -ls
There are screens on:
        380639.pts-1.host (11.02.2024 07:05:02) (Attached)
1 Socket in /run/screen/S-user.
 380639.pts-1.host user@host 2024-01-23 13:09:33 ~ $ LANG=C date
Tue Jan 23 13:09:42 UTC 2024
 380639.pts-1.host user@host 2024-01-23 13:09:42 ~ $

1. Ubuntu version
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.3 LTS"

2. Package version
$ LANG=C apt-cache policy screen
screen:
  Installed: 4.9.0-1
  Candidate: 4.9.0-1
  Version table:
 *** 4.9.0-1 500
        500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages
        100 /var/lib/dpkg/status

3. I expect creation dates for screen sessions listed via screen -ls to be in the past and to be accurate.

4. screen -ls dates are in the future.

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: screen 4.9.0-1
ProcVersionSignature: Ubuntu 5.4.0-169.187-generic 5.4.257
Uname: Linux 5.4.0-169-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: amd64
CasperMD5CheckResult: unknown
CloudArchitecture: x86_64
CloudID: lxd
CloudName: lxd
CloudPlatform: lxd
CloudSubPlatform: LXD socket API v. 1.0 (/dev/lxd/sock)
Date: Tue Jan 23 12:44:59 2024
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=de_DE.utf8
 SHELL=/bin/bash
SourcePackage: screen
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Stephen Bosch (omnicorn) wrote :
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thanks for taking the time to report a bug.

I've confirmed the problem locally. I have also noticed that the Debian package (which is where Ubuntu's screen comes from) carries its own patch to calculate session creation time. This is probably an issue with that patch, although I haven't tested other distros.

I opened a bug against the Debian package. Meanwhile, I'll set this one as Triaged and with a low priority.

Thank you.

Changed in screen (Ubuntu):
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Stephen Bosch (omnicorn) wrote :

I'm relieved you were able to reproduce it.

What I don't understand is that not all my Jammy containers exhibit this behaviour with screen. I wonder what it is about this specific instance that triggers this bug.

Do you have any insight into the mechanism?

Changed in screen (Debian):
status: Unknown → New
Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

> I wonder what it is about this specific instance that triggers this bug.

This would require further analysis of the patch mentioned by Sergio (and possibly more info on your setup). FWIW, it would be nice to provide such additional information in the Debian bug filed by Sergio so the Debian maintainers can get more context on the issue.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.