Hi,
I have a Proxmox host where I am running several LXC AlmaLinux 8 containers. I tried debugging this so I made sure to only use lxc tools (and not pct enter as example)
I observed following problem:
When I enter the container with lxc-attach and read a file that has long output, the output suddenly stops. It also does not stop consistently at the same line. When you cat the file again, you get a little bit more lines. Never less lines.
Before I open a GitHub issue I wanted to ask, if someone can reproduce this or even knows this problem?
In order to reproduce the issue, please do the follwing:
-
SSH to your host.
-
Create a basic LXC container ( as example, use the basic AlmaLinux 8 container template from Proxmox, http://download.proxmox.com/images/system/almalinux-8-default_20210928_amd64.tar.xz)
-
Enter the container with lxc-attach ID
-
Run this bash command in order to create a file with a lot of lines:
for i in {1..100000}; do echo "$i:abcdefghijklmnopqrstuvwxyz1234567890"; done > output.txt
- Afterwards, basically cat the file:
cat /root/output.txt
For me, the output suddenly ends like this:
6714:abcdefghijklmnopqrstuvwxyz1234567890
6715:abcdefghijklmnopqrstuvwxyz1234567890
6716:abcdefghijklmnopqrstuvwxyz1234567890
6717:abcdefghijklmnopqrstuvwxyz1234567890
6718:abcdefghijklmnopqrstuvwxy
If I do the cat command again, I get more lines, at this time I ended at 7086:
7081:abcdefghijklmnopqrstuvwxyz1234567890
7082:abcdefghijklmnopqrstuvwxyz1234567890
7083:abcdefghijklmnopqrstuvwxyz1234567890
7084:abcdefghijklmnopqrstuvwxyz1234567890
7085:abcdefghijklmnopqrstuvwxyz1234567890
7086:abcdefghijklmnopqrstuvwxyz1234567890
Then again:
7957:abcdefghijklmnopqrstuvwxyz1234567890
7958:abcdefghijklmnopqrstuvwxyz1234567890
7959:abcdefghijklmnopqrstuvwxyz1234567890
I have no idea how to debug or troubleshoot this, I also tried doing a log file:
lxc-attach 10000 -o /root/10000.log -l DEBUG
lxc-attach 10000 20241105120705.143 WARN terminal - ../src/lxc/terminal.c:lxc_terminal_ptx_io:357 - Short write on terminal r:838 != w:-1
lxc-attach 10000 20241105120705.143 WARN terminal - ../src/lxc/terminal.c:lxc_terminal_ptx_io:357 - Short write on terminal r:1024 != w:-1
lxc-attach 10000 20241105120705.143 WARN terminal - ../src/lxc/terminal.c:lxc_terminal_ptx_io:357 - Short write on terminal r:778 != w:-1
lxc-attach 10000 20241105120705.143 WARN terminal - ../src/lxc/terminal.c:lxc_terminal_ptx_io:357 - Short write on terminal r:266 != w:-1
lxc-attach 10000 20241105120705.143 WARN terminal - ../src/lxc/terminal.c:lxc_terminal_ptx_io:357 - Short write on terminal r:836 != w:-1
lxc-attach 10000 20241105120705.143 WARN terminal - ../src/lxc/terminal.c:lxc_terminal_ptx_io:357 - Short write on terminal r:704 != w:-1
lxc-attach 10000 20241105120705.143 WARN terminal - ../src/lxc/terminal.c:lxc_terminal_ptx_io:357 - Short write on terminal r:1024 != w:-1
lxc-attach 10000 20241105120705.143 WARN terminal - ../src/lxc/terminal.c:lxc_terminal_ptx_io:357 - Short write on terminal r:669 != w:-1
lxc-attach 10000 20241105120705.143 WARN terminal - ../src/lxc/terminal.c:lxc_terminal_ptx_io:357 - Short write on terminal r:991 != w:-1
lxc-attach 10000 20241105120705.143 WARN terminal - ../src/lxc/terminal.c:lxc_terminal_ptx_io:357 - Short write on terminal r:792 != w:-1
lxc-attach 10000 20241105120705.143 WARN terminal - ../src/lxc/terminal.c:lxc_terminal_ptx_io:357 - Short write on terminal r:528 != w:-1
lxc-attach 10000 20241105120705.143 WARN terminal - ../src/lxc/terminal.c:lxc_terminal_ptx_io:357 - Short write on terminal r:177 != w:-1
lxc-attach 10000 20241105120705.144 WARN terminal - ../src/lxc/terminal.c:lxc_terminal_ptx_io:357 - Short write on terminal r:17 != w:-1
Does anyone know this issue or can even reproduce this?
Thank you!