• Bug#1104514: screen: corrupts the main terminal screen after detach due

    From Vincent Lefevre@21:1/5 to Vincent Lefevre on Mon May 5 12:40:01 2025
    On 2025-05-05 03:10:50 +0200, Vincent Lefevre wrote:
    On 2025-05-04 23:51:46 +0200, Vincent Lefevre wrote:
    In short, the issue may be been introduced with the systemd upgrade
    from 256.7-1 to 257.5-2 (the very old machine on which I do not see
    the issue has systemd 255.5-1).

    The main thing that could affect screen is that utmp has been disabled
    in systemd 257: screen uses utmp when attaching and detaching sessions
    (via utempter) and the issue seems to occur when detaching a session.

    I've downgraded the systemd packages from 257.5-2 back to 256.7-1
    on one of my machines, and the issue disappeared. Then I've added
    a /etc/apt/sources.list.d/systemd-256.7-2.list file with

    deb [check-valid-until=no] https://snapshot.debian.org/archive/debian/20241018T203641Z/ sid main
    deb-src [check-valid-until=no] https://snapshot.debian.org/archive/debian/20241018T203641Z/ sid main

    and installed the systemd packages 256.7-2, which is where utmp support
    was disabled:

    systemd (256.7-2) unstable; urgency=medium
    [...]
    * Disable utmp support, not y2038 safe. utmp support in tmux has been
    disabled, so autopkgtest should no longer break
    [...]
    -- Luca Boccassi <[email protected]> Fri, 18 Oct 2024 15:47:12 +0100

    and the issue reappeared. So this confirms that it has been introduced
    with the systemd upgrade, and most probably due to the disabled utmp
    support in systemd.

    BTW, in the systemd changelog above, I can see that utmp support was
    disabled in tmux. Disabling it in screen too would fix this bug, as
    I could check:

    Now, if I fix that and remove --enable-utempter from debian/rules,
    the screen binary is no longer linked against libutempter... and
    the issue has disappeared.

    However, I get the following error message:

    /var/run/utmp: No such file or directory

    I think that utmp support should completely be removed from screen.

    --
    Vincent Lef�vre <[email protected]> - Web: <https://www.vinc17.net/>
    100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
    Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)