Description of problem: Updated a CentOS 7.6 system to CentOS 7.7 today and now pasting multiple lines in SSH bash terminal session does not paste commands after a systemctl/service start,stop,restart [root@server ~]# cat /etc/*release* CentOS Linux release 7.7.1908 (Core) ... [root@server ~]# [root@server ~]# uname -r 3.10.0-1062.1.1.el7.x86_64 [root@server ~]# [root@server ~]# rpm -qa | grep systemd systemd-sysv-219-67.el7_7.1.x86_64 systemd-libs-219-67.el7_7.1.x86_64 systemd-219-67.el7_7.1.x86_64 [root@server ~]# How reproducible: every time when either systemctl or service start, stop, restart cmds are in the pasted group of cmds. Steps to reproduce: 1. install CentOS 7 1810 minimal 2. paste multiple commands to test #example systemctl restart tuned.service 1 2 3 This will work on CentOS 7.6 3. yum update, reboot 4. paste multiple commands to test again #example systemctl restart tuned.service 1 2 3 This will no longer work on CentOS 7.7 pasting all commands Actual results: only the 1st command systemctl/service start, stop, restart will paste. No commands following it. Expected results: all commands to paste to the SSH terminal session
I'm not quite sure what you're talking about... Do the numbers in your example represent other commands? If yes, why didn't you write some other commands instead (e.g., "echo 1" etc.)? I don't like to play guessing games in the morning... Anyway, I can imagine only two scenarios which could lead to this situation: 1. systemctl hangs, so the following commands are not executed at all 2. systemctl mangles the terminal so badly that the output of the following commands is not visible In both cases the shell is not usable without further action (^C or "reset", respectively). But you didn't mention that...
Hi David, The issue appears after polkit upgrade. The systemctl does not hang, exits properly etc, but the whole buffer of copy/pasted commands following the systemctl command is gone. This is triggered only when you do a systemctl stop/start/restart etc of whatever service, because polkit is involved. In case of emergency (which of course will cause probably other issues with deps and X related etc): rpm -e polkit.x86_64 --nodeps
Hi David, yes its representing 4 lines of any commands being pasted with a systemctl or service command. In this example below only the 1st command will paste. It stops after the 1st systemctl command. I've tried 3 different ssh terminal apps - putty, kitty, mobaxterm all same results. #example systemctl restart tuned.service echo "1" echo "2" echo "3"
Can you please try downgrade polkit to version from CentOS 7.6 and try to reproduce again?
A downgrade to polkit-0.112-18.el7_6.1 fixes the problem
I think you can change the affected component of this bug to polkit. We are pasting the following lines as example: systemctl mask firewalld.service systemctl stop firewalld.service echo Test Result with polkit-0.112-22.el7_7.1 (After Upgrade to 7.7): [root@copernicus ~]# systemctl mask firewalld.service [root@copernicus ~]# Result with polkit-0.112-18.el7_6.1 (Downgraded): [root@copernicus ~]# systemctl mask firewalld.service [root@copernicus ~]# systemctl stop firewalld.service [root@copernicus ~]# echo Test Test
Hello, CentOS 7 does not allow downgrade past this version unfortunately. [root@centos7kvmtest1 ~]# yum downgrade polkit ... Only Upgrade available on package: polkit-0.112-22.el7_7.1.x86_64 Nothing to do [root@centos7kvmtest1 ~]# Pasting these lines systemctl restart tuned.service echo "1" echo "2" echo "3" Result with polkit-0.112-22.el7.x86_64 [root@centos7kvmtest1 ~]# systemctl restart tuned.service [root@centos7kvmtest1 ~]# It works on older version though. [root@centos7kvmtest5 ~]# systemctl restart tuned.service [root@centos7kvmtest5 ~]# echo "1" 1 [root@centos7kvmtest5 ~]# echo "2" 2 [root@centos7kvmtest5 ~]# echo "3" 3 [root@centos7kvmtest5 ~]# [root@centos7kvmtest5 ~]# rpm -qa |grep polkit polkit-pkla-compat-0.1-4.el7.x86_64 polkit-0.112-18.el7_6.1.x86_64 [root@centos7kvmtest5 ~]#
> CentOS 7 does not allow downgrade past this version unfortunately. rpm -Uvh https://rpmfind.net/linux/centos/7.6.1810/updates/x86_64/Packages/polkit-0.112-18.el7_6.1.x86_64.rpm --force Can also work with an active CentOS 7.6 updates-repo.
Hello, in rhel-7.7 we fixed a problem that if user doesn't provide password during authorization and lets it time out, it used to leave the echoing off and user could not see anything any more. With the patch, which fixes this issue, it seems that resetting the terminal blanks the clipboard somehow (even under root in which pkttyagent resets the terminal anyway). I'll dig into it some more.
Hello again, On a test VM this force downgrade did show it worked again. [root@localhost ~]# rpm -Uvh http://vault.centos.org/7.6.1810/updates/x86_64/Packages/polkit-0.112-18.el7_6.1.x86_64.rpm --force Retrieving http://vault.centos.org/7.6.1810/updates/x86_64/Packages/polkit-0.112-18.el7_6.1.x86_64.rpm Preparing... ################################# [100%] Updating / installing... 1:polkit-0.112-18.el7_6.1 ################################# [ 50%] Cleaning up / removing... 2:polkit-0.112-22.el7_7.1 ################################# [100%] [root@localhost ~]# [root@localhost ~]# systemctl restart tuned.service [root@localhost ~]# echo "1" 1 [root@localhost ~]# echo "2" 2 [root@localhost ~]# echo "3" 3 [root@localhost ~]#
Hello, Facing the same issue here. And here is what I've noticed. If I copy/paste the command using Putty with semicolons, they all get executed: ``` systemctl daemon-reload; service mysqld restart ``` but if I copy/paste commands separated with a line-break: ``` systemctl daemon-reload service mysqld restart ``` the second command will be never executed, as never entered. And by the way CentOS 8 is not affected here: `CentOS Linux release 8.0.1905 (Core)`: ``` # rpm -qa | grep polkit polkit-libs-0.115-6.el8.x86_64 polkit-0.115-6.el8.x86_64 polkit-pkla-compat-0.1-12.el8.x86_64 ``` Kindly advise. Regards, Alex.
The issue has been fixed in Fedora Rawhide now and is coming to F30. It is also scheduled for next release of RHEL7 and RHEL8.
Created attachment 1621887 [details] drain instead of flush on terminal setattr
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2020:1135