terminal-util: ANSI size query on container ttys leaves cursor-position replies in agetty login prompt
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 20/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- c, linux
- Lĩnh vực
- operating-systems
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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).
- Ngôn ngữ chính
- C
- Star
- 17k
- Fork
- 4.8k
- Merge trung bình
- 2 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 342
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của systemd/systemd
-
login
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
hwdb needs-patch
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
systemd/systemd#44825 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
cryptsetup
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation pid1
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-better-log-message network RFE 🎁
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 72/100
systemd/systemd#44563 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của systemd/systemd
Issue tương tự
-
[compiler-rt][ASan][Darwin] dispatch_apply_f interceptor leaks its context (24 bytes per call)Đang mởcompiler-rt:asan
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
llvm/llvm-project#242921 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Missing gcc __builtin_stdc_bit_width/floor/ceil signature makes intellisense wrongly report error 70Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
microsoft/vscode-cpptools#14874 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
FujiNetWIFI/fujinet-firmware#2401 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[simdutf] update to 9.4.0Đang mởcategory:port-update
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 2 ngày
-
polish
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
ChupathingyCE/chupathingyce#1366 ·
Maintainer thường phản hồi trong vòng 1 ngày