-
Notifications
You must be signed in to change notification settings - Fork 852
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
Timeout on pip commands when Windows defender for public network is turned on #6992
Comments
Thanks for reporting this @alkesander. This looks like a networking issue. Can you please follow the Networking issues |
@OneBlue I am having the same issue as @alkesander. I have run the diagnostics. Here is the script output. How can I share the wsl.etl file with you? It is 50MB. Here is the output of networking.bat run from powershell on Windows.
Here is the output of networking.sh when run from inside of the Ubuntu 20.04 on WSL2.
|
I did some testing and I have confirmed something. There maybe some problem involving the Keychain app. Normally I have keychain in my bashrc so that I start the ssh agent and add my keys the first time I open a terminal, and then it just stays set, until WSL shuts down. I realized with some experimentation that pip works just fine as long as I do not start the ssh agent with keychain. I tested starting the ssh-agent by hand without using the keychain app, and pip still worked fine. This is extremely strange, but extremely consistent behavior. |
@Apreche: Thanks for the output. This is interesting, I wonder if pip is somehow trying to interact with ssh-agent ? Can you share an strace of a pip command that times out ? ( |
@OneBlue I can now reproduce the problem with just WSL2, pip, and Microsoft Defender firewall. The keychain scenario was happening consistently before. However, now that I can reproduce the issue without it, it's good to know that the core problem lies elsewhere. Best not to be distracted by a possible red herring. Here is my current situation:
I have performed this exact sequence on 2-3 sequential reboots, so it is very reproduceable. I have produced straces of pip both in the failure case and the success case. You can see the failure case ends with a keyboard interrupt because otherwise it would just hang. It may time out eventually, but I never had the patience to wait that long. |
I spoke too soon, further discoveries have been made. I got suspicious upon seeing references to X11 in the strace. Why is pip doing anything with X11? It's an entirely CLI program? Regardless, we have a new reproducable pattern.
TL;DR: As long as DISPLAY is set if the X11 server is not running, things like this will fail. I also ran
Therefore I think this issue is very likely related to #2016 That's all the info I have for now. |
This issue seems to be the same as well: |
I think I have the same issue:
As it is fixable by starting the X server, I think that is fine. |
I am having the same issue up till now. I turned public firewall off but the pip isn't working as people did above. |
If the following command would returns |
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request. Thank you! |
just to confirm the issue or similar is still around, and can be solved by something as simple as |
Windows Build Number
Microsoft Windows [Version 10.0.19042.985]
WSL Version
Kernel Version
5.4.72
Distro Version
Ubunto 20.04
Other Software
Python 3.8.5
pip 21.1.2
Repro Steps
Expected Behavior
pip is working fine on WSL with defender turned on.
Actual Behavior
pip is failing with defender turned on
Diagnostic Logs
Please let me know what can be helpful to debug this issue. I was trying to add a rule to whitelist all traffic to windows defender but it wasn't working. Only turning it off for public networks resulted in success.
The text was updated successfully, but these errors were encountered: