-
-
Notifications
You must be signed in to change notification settings - Fork 274
Closed
Description
Few months ago we discovered a bug that can be reproduced using Defaults use_pty while connected to a machine using SSH.
The bug was "more" related, and here you can find the report: more: exit if POLLHUP or POLLERR on stdin is received.
Now we are facing - more or less - the same problem but with tail. In short, you can reproduce the issue doing:
- be sure to use
Defaults use_pty(that is now the default) sudo su -tail -f /var/log/messages- kill the SSH connection
You will see the tail still running after that. strace produced this output:
strace: Process 2051 attached
select(5, [4], NULL, NULL, NULL) = 1 (in [4])
read(4, "\1\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0", 34) = 16
fstat(3, {st_mode=S_IFREG|0640, st_size=2031533, ...}) = 0
read(3, "2024-02-21T10:51:06.467247+01:00"..., 8192) = 215
write(1, "2024-02-21T10:51:06.467247+01:00"..., 215) = -1 EIO (Errore di input/output)
read(3, "", 8192) = 0
select(5, [4], NULL, NULL, NULL) = 1 (in [4])
read(4, "\1\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0", 34) = 16
fstat(3, {st_mode=S_IFREG|0640, st_size=2031648, ...}) = 0
read(3, "2024-02-21T10:51:06.477515+01:00"..., 8192) = 115
write(1, "2024-02-21T10:51:06.477515+01:00"..., 115) = -1 EIO (Errore di input/output)
read(3, "", 8192) = 0
and it never ends. Basically tail keep reading from the file.
Considering that they are not the only tasks with a similar problem, can be this caused by sudo, specifically, the option use_pty ?
The use of KillUserProcesses=yes is not an option.
Thank you!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels