-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AWS Session Manager - Slow while write / pasting code #3809
Comments
Have you noticed this kind of slow down in any other environment or is it just this specific one? I dont think it is an ARM problem as I seem to have no issues on my ARM based machine. |
I am getting this in most of my environments quite frankly. But they are all mostly running AL2023. At first I thought I was perhaps contaminating the environments somehow, thats why I created a fresh EC2 w/ AL2023 and installed just pwsh and it does it there too. |
Is it only with Copy/pasting? or do you have general typing lag? Also do you notice it more when you press |
Noticable when typing also. No diff when ctrl+c or right clicking (right click doesn't do anything in the console really) |
We tried reproducing this error but did not have any noticeable lag... Are there any network issues that may be contributing to this issue? Also, if you install 2.2.6 do you notice the lag goes away? |
Same issue w/ 2.2.6. More in depth steps to reproduce:
|
Hmm we were unable to reproduce this issue still, we tried it with PowerShell 7.3.6. I am pretty doubtful that it has to do with the update from 7.3.6-->7.3.7 but may be worth trying if you are still having lag issues. |
@CD10000 Can you run |
Exact same thing. This is really odd. |
Thanks. That at least rules out the history prediction from the root cause. It's really bizarre. |
I have tried this on a regular AL2023 x64 (not arm) and it gives me the same trouble. I have noticed this, if I copy a long-ish string, it will paste almost all of it real quick except for the last say 10 chars, which then slows down and goes slow. Doesn't matter if the string is 100 chars or 1000 chars, only the last little bit will slow down. Multi line is a nightmare. If I hammer down on my keyboard and write a lot gibberish, it will sorta keep up with me until the last 10-20ish character, a bit like pasting. I just tried on a Windows machine and it works fine!!! I'll ensure everything is up to date on Mac and reply back. Update: I have updated the mac book pro to the latest and still same problem. Odd. |
RECAP: Using session manager, pwsh 7.3.x + pwsh 7.2.x + |
What do you mean by "using session manager + macOS/windows"? Is it a macOS/Windows VMs running in AWS and you got the console access through the Session Manager? (I have no idea what the Session Manager is TBH)? Does this happen to you locally on a macOS, Windows, or Linux machine? |
Session manager is a utility provided by AWS to access the terminal from your browser. When you launch an ec2, you can use Session Manager to access the terminal instead of say... ssh via putty. And no, There is an ec2 (VM) running AL2023 (which is linux, fedora based). So I (on a Mac) will access Session Manager via (Chrome, Firefox or Safari) to connect to the EC2 running AL2023. If I do the same thing e.g. If I do these steps but running pwsh 7.2.x, I have no issues. If pwsh 7.3.x+ is installed on the ec2, I get the issue when connecting via Session Manager from my Mac. To re-add info from previous post, if I am running 7.3.x on AL2023 (ec2), and remove the module PSReadLine, I don't have the issue at all. |
Thank you for those additional information, very helpful to me to understand the scenario. FYI, we don't have direct access to AWS, so @StevenBucher98 emailed a contact we have in AWS and asked help to reproduce the issue. But they cannot reproduce it with your repro steps. Here is the reply we got:
It's very bizarre. Given that you are connecting to the VM console with a browser, it's hard to reason why it makes a difference between doing it from macOS vs. Windows. It feels like the issue lies in Session Manager instead of PowerShell.
Can you please try one more thing: install 7.2.x on the ec2 VM, and then upgrade PSReadLine to v2.3.4 (the latest stable). Then try again from macOS and Windows and see if it still works fine. |
I will give that a shot. Will report back. Would it be possible to ask your AWS contact to attempt this same thing but try with a Mac ? I didn't know this made a difference at the time. I have a contact that has a Mac too, will have them try. |
From both macOS and Windows? Does it work fine when connecting from Windows? BTW, @StevenBucher98 and I chatted about this offline and he will bring up the new info to our AWS contact and ask to try reproducing it again from macOS. |
Both have no colors, tab, etc. |
I asked someone who has a Mac to remote via Session Manager to the same ec2 instance and have the same issues I have. To recap: Mac -> Any Browsers -> Session Manager to ec2 -> pwsh 7.3.x w/ PSReadLine Module loaded = Issue |
@StevenBucher98 Can you please ask your contact at AWS to take another look at this issue? |
Adding response from our contact at AWS
I am starting to think it may be something specific to your session manager? Not sure how to resolve from this point |
@CD10000 Now we don't think the root cause for your issue is in the PowerShell or PSReadLine layer. |
For some closure, this issue seems to have been resolved in Session Manager. |
Prerequisites
Exception report
N/A
Screenshot
Hard to demonstrate, since it will look like just slow typing.
Environment data
Steps to reproduce
I started from a fresh install.
Spin up EC2 w/ AL2023 ARM base processor (unsure if its ARM related, doubt it, but throwing it out there)
Install powershell as such:
sudo dnf install -y libicu
sudo curl -L -o /tmp/powershell.tar.gz https://github.com/PowerShell/PowerShell/releases/download/v7.3.7/powershell-7.3.7-linux-arm64.tar.gz
sudo mkdir -p /opt/microsoft/powershell/7
sudo tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7
sudo chmod +x /opt/microsoft/powershell/7/pwsh
sudo ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh
Log in to the EC2 via Session Manager
Run pwsh
Start Typing or paste code
Expected behavior
Not lag behind or take a long time to paste
Actual behavior
Very slow to type. Very slow to paste.
If you uninstall PSReadLine, it all works fine.
The text was updated successfully, but these errors were encountered: