Skip to content
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

Launching executables from WSL that touch filesystem makes new process on windows host very slow for many minutes, then gets back to normal or a reboot is necessary #11197

Closed
1 of 2 tasks
giovannicandido opened this issue Feb 23, 2024 · 4 comments

Comments

@giovannicandido
Copy link

Windows Version

Microsoft Windows [Version 10.0.22631.3155]

WSL Version

2.0.14

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.10.102.1

Distro Version

No response

Other Software

No response

Repro Steps

Not sure what the issue is, but after extensive testing, executables that do not interact with the Windows filesystem work as expected. To reproduce there is a couple of ways, one is as this:

  1. Install psql.exe on windows (you can use scoop install postgresql)

Launch a database on windows host (the best way to do it is to run on docker):

docker run --rm -it -e POSTGRES_PASSWORD=1234 -p 5432:5432 postgres:16

Now open a terminal with wsl (any distro affected, I tested in both native wsl and in the new one from microsoft store)

connect to the database (from the linux wsl instance):

psql.exe -U postgres -h 127.0.0.1

password is 1234

Everything working fine, now you will probably crash your system:

In the psql shell that you opened, type the following:

\l

This will list the databases. It will say something like that:

psql (16.2)
Digite "help" para obter ajuda.

postgres=# \l
'\wsl.localhost\Fedora\home\giova'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
Lista de bancos de dados
Nome | Dono | Codificação | Provedor de localidade | Ordenação | Ctype | Localidade ICU | Regras ICU | Privilégios de acesso
-----------+----------+-------------+------------------------+------------+------------+----------------+------------+-----------------------
postgres | postgres | UTF8 | libc | en_US.utf8 | en_US.utf8 | | |
template0 | postgres | UTF8 | libc | en_US.utf8 | en_US.utf8 | | | =c/postgres +
| | | | | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | libc | en_US.utf8 | en_US.utf8 | | | =c/postgres +
| | | | | | | | postgres=CTc/postgres
(3 linhas)

Now try to launch any new executable (browser, terminal tab, windows explorer, anything). Even the task manager will hang on for many minutes before it open.
Note: Existing process that are opened are not affect, you need to start new ones.

After 20 minutes more or less, it should return back to normal.

Second note: Process usage is low, memory usage is normal, disk usage is normal, network usage normal. Nothing abnormal happing in process explorer as far as understand.

I try with 1password cli and after it read the secrets the same behaviour happen. Let me know if anyone need other way to reproduce, this should affect more executables.

Third note: Its not esporadic. I try many configurations in wsl, (systemd enable, disabled, memory allocation, mirror mode network, many...) It happens all dozens of times I reproduced.

This video shows the problem: https://1drv.ms/v/s!AoHvV-Rb6N9QiIg9r1_hzSwy35Z1fw?e=12UWSY

The video above use 1passwor cli op, that is another affected executable.

Expected Behavior

After execution of windows process the system keeps behaving normal

Actual Behavior

After execution of windows executable in WSL the system behaves worse than if I have installed windows 11 in a 10mb 1core pentium II system.

Diagnostic Logs

No response

@giovannicandido giovannicandido changed the title Launching executables from WSL that touch filesystem makes new process on windows host very for many minutes, then gets back to normal or a reboot is necessary Launching executables from WSL that touch filesystem makes new process on windows host very slow for many minutes, then gets back to normal or a reboot is necessary Feb 23, 2024
Copy link

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@OneBlue
Copy link
Collaborator

OneBlue commented Feb 28, 2024

/logs

Copy link
Contributor

Hello! Could you please provide more logs to help us better diagnose your issue?

To collect WSL logs, download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The scipt will output the path of the log file once done.

Once completed please upload the output files to this Github issue.

Click here for more info on logging

If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue.

Thank you!

Copy link
Contributor

This issue has been automatically closed since it has not had any author activity for the past 7 days. If you're still experiencing this issue please re-file it as a new issue.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants