microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.14k stars 802 forks source link

error code 0x8007274c #10174

Open sabruss opened 1 year ago

sabruss commented 1 year ago

Windows Version

Microsoft Windows [version 10.0.22621.1778]

WSL Version

1.1.3.0

Are you using WSL 1 or WSL 2?

Kernel Version

Linux version 5.15.90.1-microsoft-standard-WSL2

Distro Version

Ubuntu 20.04

Other Software

Docker Desktop Windows 4.19 Pycharm PhpStorm (latests versions)

Repro Steps

Start WSL, start docker compose dev on a project and edit lots of files from jetbrains ide and it crash when using git diff / commit / push

Expected Behavior

just working without crash

Actual Behavior

When using my ide in windows after a certain time i got the errors, sometimes the console does not respond, using git in the ide crash very often because of lost connexion between host and wsl

i need to wsl --shutdown very often

I use wsl 1.1.3.0 now but used 1.2.5 for a while and reverted back to see if somes improvment but nothing change

It is a duplicated of https://github.com/microsoft/WSL/issues/9852 https://github.com/microsoft/WSL/issues/9832 but wanted to up again this issue as it cause me lot of trouble during my works

Thanks

Diagnostic Logs

WslLogs-2023-06-08_18-37-53.zip

OneBlue commented 1 year ago

Thank you for reporting this @sabruss. Looking at the logs it does look like WSL got into a bad state.

I'd be curious to see the state of the linux processes when that happens, so to root cause this, can you please:

This should help us understand what's getting stuck inside the WSL2.

sabruss commented 1 year ago

diag.txt

Ok i executed the command after i got the message that tell me that git process lost connexion to wsl

What's my ide report in their logs ``` C:\WINDOWS\system32\wsl.exe --distribution Ubuntu --exec /bin/sh -l -c "export GIT_ASKPASS=/mnt/c/Users/username/AppData/Local/JetBrains/PhpStorm2023.2/tmp/intellij-git-askpass-wsl-Ubuntu.sh && export LANGUAGE='' && export GIT_EDITOR=/mnt/c/Users/username/AppData/Local/JetBrains/PhpStorm2023.2/tmp/intellij-git-editor-wsl-Ubuntu.sh && export INTELLIJ_SSH_ASKPASS_PORT=63342 && export DISPLAY=':0.0' && export GIT_TRACE=0 && export GIT_OPTIONAL_LOCKS=0 && export GIT_TRACE_PERFORMANCE=0 && export INTELLIJ_GIT_ASKPASS_PORT=63342 && export LC_ALL=en_US.UTF-8 && export INTELLIJ_SSH_ASKPASS_HANDLER=fe196eda-afd5-46d6-9cc7-fbd7963d062d && export SSH_ASKPASS_REQUIRE=force && export INTELLIJ_REBASE_HANDER_PORT=63342 && export SSH_ASKPASS=/mnt/c/Users/username/AppData/Local/JetBrains/PhpStorm2023.2/tmp/intellij-ssh-askpass-wsl-Ubuntu.sh && export GIT_TRACE_PACKET='' && export GIT_TRACE_SETUP=0 && export INTELLIJ_GIT_ASKPASS_HANDLER=c0b92028-2f80-4616-83c1-b45e76d5a0f9 && export GIT_TRACE_PACK_ACCESS='' && export INTELLIJ_REBASE_HANDER_NO=424e3efd-6043-4d79-a345-9bea8331a10d && setsid -w /usr/bin/git -c credential.helper= -c core.quotepath=false -c log.showSignature=false status --porcelain -z --untracked-files=no --ignored=no -- " 2023-06-09 14:19:20,249 [11077503] INFO - #c.i.o.v.c.ChangeListManagerImpl - U n e t e n t a t i v e d e c o n n e x i o n a c h o u c a r l e p a r t i c o n n e c t n  a p a s r p o n d u c o n v e n a b l e m e n t a u - d e l d  u n e c e r t a i n e d u r e o u u n e c o n n e x i o n t a b l i e a c h o u c a r l  h t e d e c o n n e x i o n n  a p a s r p o n d u . E r r o r c o d e : W s l / S e r v i c e / 0 x 8 0 0 7 2 7 4 c com.intellij.openapi.vcs.VcsException: U n e t e n t a t i v e d e c o n n e x i o n a c h o u c a r l e p a r t i c o n n e c t n  a p a s r p o n d u c o n v e n a b l e m e n t a u - d e l d  u n e c e r t a i n e d u r e o u u n e c o n n e x i o n t a b l i e a c h o u c a r l  h t e d e c o n n e x i o n n  a p a s r p o n d u . E r r o r c o d e : W s l / S e r v i c e / 0 x 8 0 0 7 2 7 4 c ```

it's a little hard to get the output of the command correctly cause of how long it is but it should be ok

For more informations of my computer, i'm using an I7 11800h, and 32gb RAM, RAM usage is frequently at 28-29gb / 32 of usage Multiple ide window openened at same times + docker running

Thanks

OneBlue commented 1 year ago

Thank you @sabruss. One thing that surprises me is that one init process seems to be missing. Can you also share the output of dmesg in the debug shell after getting WSL in that bad state ? I wonder if init crashed.

sabruss commented 1 year ago

dmesg.txt Ok there is a dmesg, i run it just after i notice a connection lost, i didn't really use it today, maybe it will help you i didn't have a bad state like the other days, but still getting a lost connection between host and wsl

OneBlue commented 1 year ago

Thank you @sabruss. I a lot of loglines like this: worker/0:2: page allocation failure: order:7, mode:0xdc0(GFP_KERNEL|__GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0, which seem to imply that WSL is running out of memory.

From the logs you shared earlier I can see that memory is set to 16GB. I won't know how much memory is used inside WSL, but can you try adding swap via:

[wsl2]
swap=16GB 

and see if that solves the issue ?

sabruss commented 1 year ago

image well i'm still having that issues,

Edit: there is somes logs after my wsl goes in a bad state, took like 10sec to open a new console, my ide is freezing, ram usage in host is 26/32 GB WslLogs-2023-06-13_15-12-36.zip dmesg.txt

crash2k commented 1 year ago

I have exactly the same problem, have you found a solution?

$ dmesg | grep failure [498452.882072] kworker/0:1: page allocation failure: order:6, mode:0xdc0(GFP_KERNEL|GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0 [498482.882233] kworker/0:1: page allocation failure: order:6, mode:0xdc0(GFP_KERNEL|__GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0 [498512.894954] kworker/0:1: page allocation failure: order:6, mode:0xdc0(GFP_KERNEL|GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0 [498542.905173] kworker/0:0: page allocation failure: order:6, mode:0xdc0(GFP_KERNEL|GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0 [499653.019377] kworker/0:2: page allocation failure: order:7, mode:0xdc0(GFP_KERNEL|__GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0 [499683.130859] kworker/0:2: page allocation failure: order:7, mode:0xdc0(GFP_KERNEL|GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0 [500852.909665] kworker/0:2: page allocation failure: order:6, mode:0xdc0(GFP_KERNEL|GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0 [500882.918636] kworker/0:2: page allocation failure: order:6, mode:0xdc0(GFP_KERNEL|__GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0 [500912.934958] kworker/0:2: page allocation failure: order:6, mode:0xdc0(GFP_KERNEL|GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0 [500943.048061] kworker/0:2: page allocation failure: order:7, mode:0xdc0(GFP_KERNEL|GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0 [502053.005191] kworker/0:2: page allocation failure: order:7, mode:0xdc0(GFP_KERNEL|__GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0 [502083.113383] kworker/0:2: page allocation failure: order:7, mode:0xdc0(GFP_KERNEL|GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0 [503253.019666] kworker/0:2: page allocation failure: order:7, mode:0xdc0(GFP_KERNEL|GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0 [503283.119078] kworker/0:2: page allocation failure: order:7, mode:0xdc0(GFP_KERNEL|__GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0 [504453.019320] kworker/0:2: page allocation failure: order:7, mode:0xdc0(GFP_KERNEL|GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0 [504483.126562] kworker/0:2: page allocation failure: order:7, mode:0xdc0(GFP_KERNEL|GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0 [505653.023033] kworker/0:2: page allocation failure: order:7, mode:0xdc0(GFP_KERNEL|__GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0 [505683.131568] kworker/0:2: page allocation failure: order:7, mode:0xdc0(GFP_KERNEL|GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0 [506428.927685] kworker/0:2: page allocation failure: order:7, mode:0xdc0(GFP_KERNEL|GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0 [506853.038626] kworker/0:2: page allocation failure: order:7, mode:0xdc0(GFP_KERNEL|__GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0 [506883.122023] kworker/0:2: page allocation failure: order:7, mode:0xdc0(GFP_KERNEL|GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0 [506968.701493] kworker/0:2: page allocation failure: order:7, mode:0xdc0(GFP_KERNEL|GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0 [506980.983022] kworker/0:2: page allocation failure: order:7, mode:0xdc0(GFP_KERNEL|__GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0 [507033.414500] kworker/0:2: page allocation failure: order:7, mode:0xdc0(GFP_KERNEL|GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0 [507538.259634] kworker/0:2: page allocation failure: order:7, mode:0xdc0(GFP_KERNEL|GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0 [507568.350231] kworker/0:2: page allocation failure: order:7, mode:0xdc0(GFP_KERNEL|__GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0 [507598.445570] kworker/0:2: page allocation failure: order:7, mode:0xdc0(GFP_KERNEL|GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0 [507654.138290] kworker/0:2: page allocation failure: order:7, mode:0xdc0(GFP_KERNEL|__GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0 [507749.028512] kworker/0:2: page allocation failure: order:7, mode:0xdc0(GFP_KERNEL|__GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0

$free -h total used free shared buff/cache available Mem: 3.8Gi 2.4Gi 162Mi 81Mi 1.3Gi 1.1Gi Swap: 8.0Gi 283Mi 7.7Gi

image

GondarMD commented 7 months ago

Are there ever any solutions to these issues?