terminal-util: ANSI size query on container ttys leaves cursor-position replies in agetty login prompt
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 20/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- c, linux
- Ambito
- operating-systems
Direzione di ricerca
Start with the terminal-util code that sends the ANSI size query (CSI 18 / DSR) for container ttys, and the EAGAIN-to-retry change in commit ba10d78 referenced by PR 43802. Reproduce by running [email protected] in a container with a tty console and checking whether the login field is pre-filled with cursor-position replies. Done means no stray replies reach agetty on boot, while resizes still propagate after startup.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
systemd version the issue has been seen with
262.1 (Fedora 45 container image). Not reproducible with 257.5 (Fedora 42).
Used distribution
Fedora 45 (container image). Also reported on Arch Linux containers by another user on the Proxmox forum.
Linux kernel version used
7.0.14-26-pve (Proxmox VE 9.2.24 host)
CPU architectures issue was seen on
x86_64
Component
systemd
Expected behaviour you didn't see
A clean login prompt on tty1 served by [email protected].
Also reported on Proxmox forum here: https://forum.proxmox.com/threads/troubleshooting-lxc-tty-terminal-login-prompt-shows-gibberish.178350/
Unexpected behaviour you saw
After a reboot with the Proxmox web console attached in "tty" mode, the login field is pre-filled with ^[[24;80R^[[24;80R, which is two DSR cursor-position reports. agetty stores them as username input. util-linux 2.40.3+ (commit 7b90601) makes them visible as "^["; older agetty versions echoed them invisibly but still stored them.
Login field without pre-filled text (Fedora 42):
Login field with pre-filled text (Fedora 45):
Steps to reproduce the problem
- Run a Fedora 45 LXC container on Proxmox VE 9.2.24 with console mode "tty".
- Reboot the container (not power-off) and open the web console while it boots.
- Observe the login prompt on tty1.
Additional program output to the terminal or log subsystem illustrating the issue
- A drop-in on [email protected] setting TTYRows=24 and TTYColumns=80 eliminates the issue on every reboot (values confirmed via busctl). This indicates the per-service ANSI terminal-size query (CSI 18 / DSR) is the source: the replies arrive after the query gives up and are read by agetty.
- With the pinned size, the console still tracks resizes after startup (stty size follows the browser window).
- The regression appeared between 257.5 and 258.x. PR 43802 notes a change from abandoning the query on EAGAIN to retrying until the timeout (commit ba10d78). That may be related, but it is unconfirmed.
- PR 43802 skips the query on virtual consoles only. Pseudo-terminals used as container ttys remain affected.
- Suggested fix: skip the query for container ttys, or flush tty input after the query times out.
Workaround:
# /etc/systemd/system/[email protected]/10-no-size-probe.conf
[Service]
TTYRows=24
TTYColumns=80
All testing and verification performed by me (the reporter). Diagnosis and write-up assisted by Claude Opus 5.5 (Anthropic).
- Lingua principale
- C
- Stelle
- 17k
- Fork
- 4.8k
- Merge medio
- 2g 10h
- PR unite (30g)
- 342
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di systemd/systemd
-
login
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
hwdb needs-patch
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
systemd/systemd#44825 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
cryptsetup
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
documentation pid1
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
I maintainer di solito rispondono entro 1 giorno
-
needs-better-log-message network RFE 🎁
Difficoltà 1/5 1-3 ore Idoneità per principianti 72/100
systemd/systemd#44563 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di systemd/systemd
Issue simili
-
[compiler-rt][ASan][Darwin] dispatch_apply_f interceptor leaks its context (24 bytes per call)Apertacompiler-rt:asan
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
llvm/llvm-project#242921 ·
I maintainer di solito rispondono entro 1 giorno
-
Missing gcc __builtin_stdc_bit_width/floor/ceil signature makes intellisense wrongly report error 70Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
microsoft/vscode-cpptools#14874 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
FujiNetWIFI/fujinet-firmware#2401 ·
I maintainer di solito rispondono entro 1 giorno
-
[simdutf] update to 9.4.0Apertacategory:port-update
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 2 giorni
-
polish
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
ChupathingyCE/chupathingyce#1366 ·
I maintainer di solito rispondono entro 1 giorno