WSL: Starting WSL Preview from the command line fails with `{Application Error} The application was unable to start correctly (0xlx).`

Version

Microsoft Windows [Version 10.0.22000.282]

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

Default Distribution: Ubuntu Default Version: 2 WSL version: 0.48.2.0 Kernel version: 5.10.60.1 WSLg version: 1.0.29 Windows version: 10.0.22000.282

Distro Version

Ubuntu 21.10 (updated from Store release)

Other Software

N/A, just Windows Terminal

Repro Steps

  1. Install WSL Preview from the Microsoft Store
  2. Run wsl.exe --shutdown
  3. Run wsl.exe. Observe as it freezes for a second and then fails.
  4. Run ubuntu.exe or click Ubuntu in the Start menu. Observe as it also fails.
  5. Run wsl.exe --status or wsl.exe --help. These commands succeed.
  6. From the Start menu or the Microsoft Store, open “Windows Subsystem for Linux Preview” and observe that WSL starts.
  7. Now, WSL will start regardless of which method you use.
  8. After running wsl --shutdown, notice that the problem reappears.

Note: Uninstalling WSL Preview from the store and using the version of WSL 2 included in Windows prevents this problem.

Expected Behavior

WSL should always start successfully from both the command line and the Start menu.

Actual Behavior

WSL fails to start from the command line. When using Windows Terminal, it shows the error message of:

{Application Error}
The application was unable to start correctly (0xlx). Click OK to close the application.


[process exited with code 3221226505 (0xc0000409)]

Note: Powershell thinks the error level is -1073740791.

However, WSL does start when clicking “Windows Susbsystem for Linux Preview” from the Start menu but not when clicking “Ubuntu”.

Diagnostic Logs

See diagnostic details

My command history:

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

PS C:\Users\Matthew> wsl --shutdown
PS C:\Users\Matthew> wsl --help
Copyright (c) Microsoft Corporation. All rights reserved.
For privacy information about this product please visit https://aka.ms/privacy.

Usage: wsl.exe [Argument] [Options...] [CommandLine]

# Lengthy command output snipped

PS C:\Users\Matthew> wsl --status
Default Distribution: Ubuntu
Default Version: 2
WSL version: 0.48.2.0
Kernel version: 5.10.60.1
WSLg version: 1.0.29
Windows version: 10.0.22000.282
PS C:\Users\Matthew> wsl
{Application Error}
The application was unable to start correctly (0xlx). Click OK to close the application.

PS C:\Users\Matthew> wsl
{Application Error}
The application was unable to start correctly (0xlx). Click OK to close the application.

PS C:\Users\Matthew> echo $LASTEXITCODE
-1073740791
PS C:\Users\Matthew> ubuntu --help
Launches or configures a Linux distribution.

Usage:
    <no args>
        Launches the user's default shell in the user's home directory.

    install [--root]
        Install the distribuiton and do not launch the shell when complete.
          --root
              Do not create a user account and leave the default user set to root.

    run <command line>
        Run the provided command line in the current working directory. If no
        command line is provided, the default shell is launched.

    config [setting [value]]
        Configure settings for this distribution.
        Settings:
          --default-user <username>
              Sets the default user to <username>. This must be an existing user.

    help
        Print usage information.
PS C:\Users\Matthew> ubuntu
{Application Error}
The application was unable to start correctly (0xlx). Click OK to close the application.

PS C:\Users\Matthew> # This is where I started WSL Preview from the Start menu
PS C:\Users\Matthew> wsl

(process:283): dconf-WARNING **: 14:15:40.720: failed to commit changes to dconf: Could not connect: Connection refused
root@Matthew-Laptop:/mnt/c/Users/Matthew# cd
root@Matthew-Laptop:~# lsb_release -a
LSB Version:    core-11.1.0ubuntu3-noarch:printing-11.1.0ubuntu3-noarch:security-11.1.0ubuntu3-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 21.10
Release:        21.10
Codename:       impish
root@Matthew-Laptop:~# uname -a
Linux Matthew-Laptop 5.10.60.1-microsoft-standard-WSL2 #1 SMP Wed Aug 25 23:20:18 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
root@Matthew-Laptop:~# exit
logout
PS C:\Users\Matthew> wsl --shutdown
PS C:\Users\Matthew> ubuntu
{Application Error}
The application was unable to start correctly (0xlx). Click OK to close the application.

PS C:\Users\Matthew> echo $LASTEXITCODE
-1073740791
PS C:\Users\Matthew> ^C

WinDbg Output:

Microsoft (R) Windows Debugger Version 10.0.22415.1003 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.

CommandLine: C:\Windows\System32\wsl.exe

************* Path validation summary **************
Response                         Time (ms)     Location
Deferred                                       srv*
Symbol search path is: srv*
Executable search path is: 
ModLoad: 00007ff7`69ee0000 00007ff7`69f0b000   wsl.exe 
ModLoad: 00007ffb`85740000 00007ffb`85947000   ntdll.dll
ModLoad: 00007ffb`846e0000 00007ffb`8479d000   C:\WINDOWS\System32\KERNEL32.DLL
ModLoad: 00007ffb`82bf0000 00007ffb`82f64000   C:\WINDOWS\System32\KERNELBASE.dll

************* Path validation summary **************
Response                         Time (ms)     Location
Deferred                                       srv*
Symbol search path is: srv*
Executable search path is: 
ModLoad: 00007ff6`e7170000 00007ff6`e726e000   conhost.exe
ModLoad: 00007ffb`85740000 00007ffb`85947000   ntdll.dll
ModLoad: 00007ffb`846e0000 00007ffb`8479d000   C:\WINDOWS\System32\KERNEL32.DLL
ModLoad: 00007ffb`82bf0000 00007ffb`82f64000   C:\WINDOWS\System32\KERNELBASE.dll
ModLoad: 00007ffb`83390000 00007ffb`8342d000   C:\WINDOWS\System32\msvcp_win.dll
ModLoad: 00007ffb`83180000 00007ffb`83291000   C:\WINDOWS\System32\ucrtbase.dll
(5d18.2734): Break instruction exception - code 80000003 (first chance)
ntdll!LdrpDoDebuggerBreak+0x30:
00007ffb`8581ca64 cc              int     3
1:001> g
ModLoad: 00007ffb`84930000 00007ffb`84a1a000   C:\WINDOWS\System32\shcore.dll
ModLoad: 00007ffb`83e90000 00007ffb`83f3c000   C:\WINDOWS\System32\advapi32.dll
ModLoad: 00007ffb`83de0000 00007ffb`83e83000   C:\WINDOWS\System32\msvcrt.dll
ModLoad: 00007ffb`84d70000 00007ffb`84e0d000   C:\WINDOWS\System32\sechost.dll
ModLoad: 00007ffb`847a0000 00007ffb`848c1000   C:\WINDOWS\System32\RPCRT4.dll
ModLoad: 00007ffb`84340000 00007ffb`846b8000   C:\WINDOWS\System32\combase.dll
ModLoad: 00007ffb`84bc0000 00007ffb`84d6c000   C:\WINDOWS\System32\user32.dll
ModLoad: 00007ffb`83360000 00007ffb`83386000   C:\WINDOWS\System32\win32u.dll
ModLoad: 00007ffb`84f80000 00007ffb`84fa9000   C:\WINDOWS\System32\GDI32.dll
ModLoad: 00007ffb`83060000 00007ffb`83172000   C:\WINDOWS\System32\gdi32full.dll
ModLoad: 00007ffb`841f0000 00007ffb`84221000   C:\WINDOWS\System32\IMM32.DLL
ModLoad: 00007ffb`81d40000 00007ffb`81d58000   C:\WINDOWS\SYSTEM32\kernel.appcore.dll
ModLoad: 00007ffb`82f70000 00007ffb`82ff0000   C:\WINDOWS\System32\bcryptPrimitives.dll
ModLoad: 00007ffb`84fb0000 00007ffb`8505f000   C:\WINDOWS\System32\clbcatq.dll
ModLoad: 00007ffb`77d80000 00007ffb`77d9b000   C:\WINDOWS\SYSTEM32\windows.staterepositorycore.dll
onecore\com\combase\registrationstore\registrationstore.cpp(7933)\combase.dll!00007FFB843ED8E4: (caller: 00007FFB8434D9C5) ReturnHr(1) tid(54c0) 80070002 The system cannot find the file specified.
onecore\com\combase\registrationstore\registrationstore.cpp(7933)\combase.dll!00007FFB843ED8E4: (caller: 00007FFB8434D9C5) ReturnHr(2) tid(54c0) 80070002 The system cannot find the file specified.
onecore\com\combase\registrationstore\registrationstore.cpp(7933)\combase.dll!00007FFB843ED8E4: (caller: 00007FFB8434D9C5) ReturnHr(3) tid(54c0) 80070002 The system cannot find the file specified.
ModLoad: 00007ffb`6e710000 00007ffb`6e719000   C:\ProgramData\Microsoft\Windows\AppRepository\Packages\Microsoft.WindowsTerminal_1.11.2921.0_x64__8wekyb3d8bbwe\PackagedCom\OpenConsoleProxy.dll
ModLoad: 00007ffb`53480000 00007ffb`5349b000   C:\WINDOWS\SYSTEM32\VCRUNTIME140.dll
ModLoad: 00007ffb`7cb60000 00007ffb`7cbf1000   C:\WINDOWS\SYSTEM32\apphelp.dll
onecore\windows\core\console\open\src\interactivity\base\hostsignalinputthread.cpp(99)\conhost.exe!00007FF6E7208D69: (caller: 00007FFB846F54E0) LogNt(1) tid(6034) C0000008 An invalid HANDLE was specified.
onecore\windows\core\console\open\src\interactivity\base\hostsignalinputthread.cpp(99)\conhost.exe!00007FF6E7208D69: (caller: 00007FFB846F54E0) LogNt(2) tid(6034) C0000008 An invalid HANDLE was specified.
ModLoad: 00007ffb`83180000 00007ffb`83291000   C:\WINDOWS\System32\ucrtbase.dll
ModLoad: 00007ffb`84930000 00007ffb`84a1a000   C:\WINDOWS\System32\shcore.dll
ModLoad: 00007ffb`83390000 00007ffb`8342d000   C:\WINDOWS\System32\msvcp_win.dll
ModLoad: 00007ffb`84340000 00007ffb`846b8000   C:\WINDOWS\System32\combase.dll
ModLoad: 00007ffb`847a0000 00007ffb`848c1000   C:\WINDOWS\System32\RPCRT4.dll
ModLoad: 00007ffb`84ea0000 00007ffb`84f76000   C:\WINDOWS\System32\OLEAUT32.dll
(466c.6238): Break instruction exception - code 80000003 (first chance)
ntdll!LdrpDoDebuggerBreak+0x30:
00007ffb`8581ca64 cc              int     3
0:000> g
ModLoad: 00007ffb`81d40000 00007ffb`81d58000   C:\WINDOWS\SYSTEM32\kernel.appcore.dll
ModLoad: 00007ffb`83de0000 00007ffb`83e83000   C:\WINDOWS\System32\msvcrt.dll
ModLoad: 00007ffb`82f70000 00007ffb`82ff0000   C:\WINDOWS\System32\bcryptPrimitives.dll
ModLoad: 00007ffb`84d70000 00007ffb`84e0d000   C:\WINDOWS\System32\sechost.dll
ModLoad: 00007ffb`84fb0000 00007ffb`8505f000   C:\WINDOWS\System32\clbcatq.dll
ModLoad: 00007ffb`4afb0000 00007ffb`4afec000   C:\Windows\System32\AppExtension.dll
ModLoad: 00007ffb`4e880000 00007ffb`4e9b4000   C:\Windows\System32\Windows.StateRepositoryPS.dll
ModLoad: 00007ffb`84bc0000 00007ffb`84d6c000   C:\WINDOWS\System32\user32.dll
ModLoad: 00007ffb`83360000 00007ffb`83386000   C:\WINDOWS\System32\win32u.dll
ModLoad: 00007ffb`84f80000 00007ffb`84fa9000   C:\WINDOWS\System32\GDI32.dll
ModLoad: 00007ffb`83060000 00007ffb`83172000   C:\WINDOWS\System32\gdi32full.dll
ModLoad: 00007ffb`841f0000 00007ffb`84221000   C:\WINDOWS\System32\IMM32.DLL
ModLoad: 00007ffb`532d0000 00007ffb`533c0000   C:\Windows\System32\Windows.ApplicationModel.dll
ModLoad: 00007ffb`80bb0000 00007ffb`80d16000   C:\WINDOWS\SYSTEM32\wintypes.dll
ModLoad: 00007ffb`68530000 00007ffb`6856e000   C:\WINDOWS\SYSTEM32\windows.staterepositoryclient.dll
ModLoad: 00007ffb`80d20000 00007ffb`81582000   C:\WINDOWS\SYSTEM32\windows.storage.dll
ModLoad: 00007ffb`84a20000 00007ffb`84bba000   C:\WINDOWS\System32\ole32.dll
ModLoad: 00007ffb`85670000 00007ffb`856cd000   C:\WINDOWS\System32\shlwapi.dll
ModLoad: 00007ffb`828f0000 00007ffb`8293c000   C:\WINDOWS\SYSTEM32\CFGMGR32.dll
ModLoad: 00007ffb`80880000 00007ffb`80977000   C:\WINDOWS\system32\propsys.dll
ModLoad: 00007ffb`82b20000 00007ffb`82b41000   C:\WINDOWS\SYSTEM32\profapi.dll
ModLoad: 00007ffb`835a0000 00007ffb`83d4a000   C:\WINDOWS\System32\shell32.dll
ModLoad: 00007ffb`5a020000 00007ffb`5a038000   C:\WINDOWS\system32\NetworkExplorer.dll
ModLoad: 00007ffb`835a0000 00007ffb`83d4a000   C:\WINDOWS\System32\SHELL32.dll
ModLoad: 00007ffb`49890000 00007ffb`49905000   C:\Windows\System32\Windows.FileExplorer.Common.dll
ModLoad: 00007ffb`7a7d0000 00007ffb`7aa82000   C:\Windows\System32\iertutil.dll
ModLoad: 00007ffb`83e90000 00007ffb`83f3c000   C:\WINDOWS\System32\advapi32.dll
onecore\com\combase\objact\objact.cxx(4080)\combase.dll!00007FFB843A5105: (caller: 00007FFB843A1B12) ReturnHr(1) tid(6238) 80040154 Class not registered
ModLoad: 00007ffb`678f0000 00007ffb`6791b000   C:\WINDOWS\system32\mssprxy.dll
ModLoad: 00007ffb`7cd00000 00007ffb`7cdac000   C:\WINDOWS\system32\uxtheme.dll
ModLoad: 00007ffb`39b10000 00007ffb`39b32000   C:\Program Files\MenuTools\MenuToolsHook64.dll

************* Path validation summary **************
Response                         Time (ms)     Location
Deferred                                       srv*
Symbol search path is: srv*
Executable search path is: 
ModLoad: 00007ff7`3d220000 00007ff7`3d2ad000   wsl.exe 
ModLoad: 00007ffb`85740000 00007ffb`85947000   ntdll.dll
ModLoad: 00007ffb`846e0000 00007ffb`8479d000   C:\WINDOWS\System32\KERNEL32.DLL
ModLoad: 00007ffb`82bf0000 00007ffb`82f64000   C:\WINDOWS\System32\KERNELBASE.dll
onecore\windows\core\console\open\src\interactivity\base\hostsignalinputthread.cpp(99)\conhost.exe!00007FF6E7208D69: (caller: 00007FFB846F54E0) LogNt(3) tid(6034) C0000008 An invalid HANDLE was specified.
onecore\windows\core\console\open\src\interactivity\base\hostsignalinputthread.cpp(99)\conhost.exe!00007FF6E7208D69: (caller: 00007FFB846F54E0) LogNt(4) tid(6034) C0000008 An invalid HANDLE was specified.
onecore\windows\core\console\open\src\interactivity\base\hostsignalinputthread.cpp(99)\conhost.exe!00007FF6E7208D69: (caller: 00007FFB846F54E0) LogNt(5) tid(6034) C0000008 An invalid HANDLE was specified.
ModLoad: 00007ffb`854e0000 00007ffb`8554f000   C:\WINDOWS\System32\WS2_32.dll
ModLoad: 00007ffb`847a0000 00007ffb`848c1000   C:\WINDOWS\System32\RPCRT4.dll
ModLoad: 00007ffb`85670000 00007ffb`856cd000   C:\WINDOWS\System32\SHLWAPI.dll
ModLoad: 00007ffb`83de0000 00007ffb`83e83000   C:\WINDOWS\System32\msvcrt.dll
ModLoad: 00007ffb`84bc0000 00007ffb`84d6c000   C:\WINDOWS\System32\USER32.dll
ModLoad: 00007ffb`83360000 00007ffb`83386000   C:\WINDOWS\System32\win32u.dll
ModLoad: 00007ffb`84f80000 00007ffb`84fa9000   C:\WINDOWS\System32\GDI32.dll
ModLoad: 00007ffb`83060000 00007ffb`83172000   C:\WINDOWS\System32\gdi32full.dll
ModLoad: 00007ffb`83390000 00007ffb`8342d000   C:\WINDOWS\System32\msvcp_win.dll
ModLoad: 00007ffb`83180000 00007ffb`83291000   C:\WINDOWS\System32\ucrtbase.dll
ModLoad: 00007ffb`835a0000 00007ffb`83d4a000   C:\WINDOWS\System32\SHELL32.dll
ModLoad: 00007ffb`84a20000 00007ffb`84bba000   C:\WINDOWS\System32\ole32.dll
ModLoad: 00007ffb`84340000 00007ffb`846b8000   C:\WINDOWS\System32\combase.dll
ModLoad: 00007ffb`83e90000 00007ffb`83f3c000   C:\WINDOWS\System32\ADVAPI32.dll
ModLoad: 00007ffb`84d70000 00007ffb`84e0d000   C:\WINDOWS\System32\sechost.dll
ModLoad: 00007ffb`84ea0000 00007ffb`84f76000   C:\WINDOWS\System32\OLEAUT32.dll
ModLoad: 00007ffb`342e0000 00007ffb`3436d000   C:\WINDOWS\SYSTEM32\MSVCP140.dll
ModLoad: 00007ffb`53480000 00007ffb`5349b000   C:\WINDOWS\SYSTEM32\VCRUNTIME140.dll
ModLoad: 00007ffb`67d40000 00007ffb`67d4c000   C:\WINDOWS\SYSTEM32\VCRUNTIME140_1.dll
ModLoad: 00007ffb`82290000 00007ffb`822b9000   C:\WINDOWS\SYSTEM32\USERENV.dll
ModLoad: 00007ffb`821d0000 00007ffb`82237000   C:\WINDOWS\SYSTEM32\MSWSOCK.dll
ModLoad: 00007ffb`6e120000 00007ffb`6e130000   C:\Program Files\WindowsApps\MicrosoftCorporationII.WindowsSubsystemforLinux_0.48.2.0_x64__8wekyb3d8bbwe\WslDeps.dll
(637c.4134): Break instruction exception - code 80000003 (first chance)
ntdll!LdrpDoDebuggerBreak+0x30:
00007ffb`8581ca64 cc              int     3
2:017> g
ModLoad: 00007ffb`841f0000 00007ffb`84221000   C:\WINDOWS\System32\IMM32.DLL
ModLoad: 00007ffb`81d40000 00007ffb`81d58000   C:\WINDOWS\SYSTEM32\kernel.appcore.dll
ModLoad: 00007ffb`82f70000 00007ffb`82ff0000   C:\WINDOWS\System32\bcryptPrimitives.dll
ModLoad: 00007ffb`84fb0000 00007ffb`8505f000   C:\WINDOWS\System32\clbcatq.dll
ModLoad: 00007ffb`7b0c0000 00007ffb`7b1c1000   C:\Windows\System32\MrmCoreR.dll
ModLoad: 00007ffb`84930000 00007ffb`84a1a000   C:\WINDOWS\System32\SHCORE.dll
ModLoad: 00007ffb`7a7a0000 00007ffb`7a7cd000   C:\Windows\System32\bcp47mrm.dll
ModLoad: 00007ffb`7ae80000 00007ffb`7b008000   C:\Windows\System32\Windows.UI.dll
ModLoad: 00007ffb`7cd00000 00007ffb`7cdac000   C:\WINDOWS\system32\uxtheme.dll
ModLoad: 00007ffb`79030000 00007ffb`79296000   C:\Windows\System32\twinapi.appcore.dll
ModLoad: 00007ffb`80bb0000 00007ffb`80d16000   C:\Windows\System32\WinTypes.dll
onecore\com\combase\registrationstore\registrationstore.cpp(7927)\combase.dll!00007FFB843ED8E4: (caller: 00007FFB8434D9C5) ReturnHr(1) tid(4134) 80070002 The system cannot find the file specified.
ModLoad: 00007ffb`77d80000 00007ffb`77d9b000   C:\WINDOWS\SYSTEM32\windows.staterepositorycore.dll
onecore\com\combase\registrationstore\registrationstore.cpp(7927)\combase.dll!00007FFB843ED8E4: (caller: 00007FFB8434D9C5) ReturnHr(2) tid(4134) 80070002 The system cannot find the file specified.
onecore\com\combase\registrationstore\registrationstore.cpp(7927)\combase.dll!00007FFB843ED8E4: (caller: 00007FFB8434D9C5) ReturnHr(3) tid(4134) 80070002 The system cannot find the file specified.
ModLoad: 00007ffb`68c50000 00007ffb`68c5b000   C:\ProgramData\Microsoft\Windows\AppRepository\Packages\MicrosoftCorporationII.WindowsSubsystemforLinux_0.48.2.0_x64__8wekyb3d8bbwe\PackagedCom\WslServiceProxyStub.dll
D:\a\1\s\src\windows\wsl\main.cpp(1693)\wsl.exe!00007FF73D22F6B2: (caller: 00007FF73D239B9B) Exception(1) tid(4134) 8007023F {Application Error}
The application was unable to start correctly (0x%lx). Click OK to close the application.
(637c.4134): C++ EH exception - code e06d7363 (first chance)
(637c.4134): C++ EH exception - code e06d7363 (first chance)
ModLoad: 00007ffb`5b260000 00007ffb`5b2e3000   C:\Windows\System32\execmodelclient.dll
ModLoad: 00007ffb`681b0000 00007ffb`681cc000   C:\Windows\System32\Windows.Shell.ServiceHostBuilder.dll
ModLoad: 00007ffb`5ca20000 00007ffb`5ca39000   C:\WINDOWS\system32\execmodelproxy.dll
onecoreuap\base\appmodel\execmodel\client\applicationinstance\applicationinstance.cpp(58)\execmodelclient.dll!00007FFB5B29CD1C: (caller: 00007FF73D22DCFB) ReturnHr(1) tid(4134) D0000225     CallContext:[\GetActivatedEventArgsClient] 
(637c.4134): C++ EH exception - code e06d7363 (first chance)
(637c.4134): C++ EH exception - code e06d7363 (first chance)
D:\a\1\s\src\windows\wsl\main.cpp(458)\wsl.exe!00007FF73D2371A6: (caller: 00007FF73D230D6E) FailFast(1) tid(4134) 8007023E {Application Error}
The exception %s (0x(637c.4134): Security check failure or stack buffer overrun - code c0000409 (!!! second chance !!!)
Subcode: 0x7 FAST_FAIL_FATAL_APP_EXIT 
*** WARNING: Unable to verify checksum for wsl.exe
KERNELBASE!RaiseFailFastException+0x152:
00007ffb`82d31dd2 0f1f440000      nop     dword ptr [rax+rax]
2:017> .dump
           ^ Non-empty string required in '.dump'
windbg> .hh .dump
2:017> .dump /f
*****************************************************************************
* .dump /ma is the recommend method of creating a complete memory dump      *
* of a user mode process.                                                   *
*****************************************************************************
              ^ Non-empty string required in '.dump /f'
2:017> .dump /ma
               ^ Non-empty string required in '.dump /ma'
2:017> .dump /f fulldump.dmp
*****************************************************************************
* .dump /ma is the recommend method of creating a complete memory dump      *
* of a user mode process.                                                   *
*****************************************************************************
Unable to create file 'fulldump.dmp' - Win32 error 0n5
    "Access is denied."
2:017> .dump /f C:\Users\Matthew\Downloads\fulldump.dmp
*****************************************************************************
* .dump /ma is the recommend method of creating a complete memory dump      *
* of a user mode process.                                                   *
*****************************************************************************
Creating C:\Users\Matthew\Downloads\fulldump.dmp - user full dump
Dump successfully written
2:017> .dump /ma C:\Users\Matthew\Downloads\minidump.dmp
Creating C:\Users\Matthew\Downloads\minidump.dmp - mini user dump
Dump successfully written
2:017> g
WARNING: Continuing a non-continuable exception
(637c.4134): Security check failure or stack buffer overrun - code c0000409 (!!! second chance !!!)
Subcode: 0x7 FAST_FAIL_FATAL_APP_EXIT 
wsl+0x707b:
00007ff7`3d22707b cd29            int     29h
2:017> .dump /ma C:\Users\Matthew\Downloads\minidump2.dmp
Creating C:\Users\Matthew\Downloads\minidump2.dmp - mini user dump
Dump successfully written
2:017> g
WARNING: Continuing a non-continuable exception
(637c.4134): Security check failure or stack buffer overrun - code c0000409 (!!! second chance !!!)
Subcode: 0x7 FAST_FAIL_FATAL_APP_EXIT 
wsl+0x707b:
00007ff7`3d22707b cd29            int     29h
2:017> g
WARNING: Continuing a non-continuable exception
(637c.4134): Security check failure or stack buffer overrun - code c0000409 (!!! second chance !!!)
Subcode: 0x7 FAST_FAIL_FATAL_APP_EXIT 
wsl+0x707b:
00007ff7`3d22707b cd29            int     29h
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\atlmfc.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\ObjectiveC.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\concurrency.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\cpp_rest.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\stl.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\Windows.Data.Json.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\Windows.Devices.Geolocation.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\Windows.Devices.Sensors.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\Windows.Media.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\windows.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\winrt.natvis'

Memory Dump Analysis:

fulldump.dmp:

Microsoft (R) Windows Debugger Version 10.0.22415.1003 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.


Loading Dump File [C:\Users\Matthew\Downloads\fulldump.dmp]
User Dump File: Only application data is available


************* Path validation summary **************
Response                         Time (ms)     Location
Deferred                                       srv*
Symbol search path is: srv*
Executable search path is: 
Windows 10 Version 22000 UP Free x64
Product: WinNt, suite: TerminalServer SingleUserTS Personal
Machine Name:
Debug session time: Sat Oct 30 14:22:19.147 2021 (UTC - 4:00)
System Uptime: 0 days 22:10:24.314
Process Uptime: not available
..........................................
(637c.4134): Security check failure or stack buffer overrun - code c0000409 (!!! second chance !!!)
Subcode: 0x7 FAST_FAIL_FATAL_APP_EXIT 
For analysis of this file, run !analyze -v
*** WARNING: Unable to verify checksum for wsl.exe
KERNELBASE!RaiseFailFastException+0x152:
00007ffb`82d31dd2 0f1f440000      nop     dword ptr [rax+rax]
0:000> !analyze -v
*******************************************************************************
*                                                                             *
*                        Exception Analysis                                   *
*                                                                             *
*******************************************************************************

DEBUG_FLR_EXCEPTION_CODE(8007023e) and the ".exr -1" ExceptionCode(c0000409) don't match

KEY_VALUES_STRING: 1

    Key  : Analysis.CPU.mSec
    Value: 2280

    Key  : Analysis.DebugAnalysisManager
    Value: Create

    Key  : Analysis.Elapsed.mSec
    Value: 7862

    Key  : Analysis.Init.CPU.mSec
    Value: 421

    Key  : Analysis.Init.Elapsed.mSec
    Value: 9034

    Key  : Analysis.Memory.CommitPeak.Mb
    Value: 113

    Key  : FailFast.Name
    Value: FATAL_APP_EXIT

    Key  : FailFast.Type
    Value: 7

    Key  : Timeline.OS.Boot.DeltaSec
    Value: 79824

    Key  : WER.Process.Version
    Value: 10.0.10011.16384


NTGLOBALFLAG:  70

PROCESS_BAM_CURRENT_THROTTLED: 0

PROCESS_BAM_PREVIOUS_THROTTLED: 0

APPLICATION_VERIFIER_FLAGS:  0

EXCEPTION_RECORD:  (.exr -1)
ExceptionAddress: 00007ff73d2371a6 (wsl+0x00000000000171a6)
   ExceptionCode: c0000409 (Security check failure or stack buffer overrun)
  ExceptionFlags: 00000001
NumberParameters: 3
   Parameter[0]: 0000000000000007
   Parameter[1]: ffffffff8007023e
   Parameter[2]: 00000000000001ca
Subcode: 0x7 FAST_FAIL_FATAL_APP_EXIT 

FAULTING_THREAD:  ffffffff

PROCESS_NAME:  wsl.exe

EXCEPTION_CODE_STR:  8007023e

CONTEXT:  0000007af9b7e540 -- (.cxr 0x7af9b7e540)
rax=00007ffb8576822a rbx=00007ff73d29e0f8 rcx=0000018c0dd70000
rdx=0000018c0dde0bf0 rsi=0000007af9b7ee30 rdi=0000000019930520
rip=00007ffb82c3466c rsp=0000007af9b7ecd0 rbp=0000007af9b7ee50
 r8=00007ffb8576910c  r9=0000018c0dd70000 r10=0000007a40000062
r11=0000000000000060 r12=0000000000000000 r13=00007ffb831a3900
r14=0000000000000000 r15=0000000000000000
iopl=0         nv up ei pl nz na po nc
cs=0033  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000204
KERNELBASE!RaiseException+0x6c:
00007ffb`82c3466c 0f1f440000      nop     dword ptr [rax+rax]
Resetting default scope

STACK_TEXT:  
0000007a`f9b7ecd0 00007ffb`53486480     : 00000000`00000000 0000007a`f9b7ede8 00000000`d0000225 00007ff7`3d22b797 : KERNELBASE!RaiseException+0x6c
0000007a`f9b7edb0 00007ff7`3d23c14a     : 00007ffb`5b29cd1c 0000007a`f9b7ef88 0000007a`f9b7ef88 00007ff7`3d2a50d0 : VCRUNTIME140!_CxxThrowException+0x90
0000007a`f9b7ee10 00007ff7`3d22dd27     : 0000007a`f9b7ef88 00007ffb`5b287246 00000000`00000000 00000000`00000000 : wsl+0x1c14a
0000007a`f9b7ee60 00007ff7`3d22ab64     : 00007ff7`3d2a50d8 0000007a`f9b7eef9 00007ff7`3d2a50d0 0000007a`f9b7ef88 : wsl+0xdd27
0000007a`f9b7eea0 00007ff7`3d22c74c     : 00007ffb`8327f4f8 00007ffb`00000000 00000000`00000000 0000007a`f9b7f148 : wsl+0xab64
0000007a`f9b7ef60 00007ff7`3d23baec     : 00000000`00000000 00000000`00000000 00000000`0000004e 00007ffb`831a3900 : wsl+0xc74c
0000007a`f9b7f000 00007ff7`3d239c03     : 0000007a`f9b7f120 0000007a`f9b7f47e 0000007a`f9b7f47e 0000007a`f9b7f47e : wsl+0x1baec
0000007a`f9b7f050 00007ff7`3d230d6e     : 0000007a`f9b7f47c 0000018c`0dd7f370 0000007a`f9b7f47e 0000006c`00730077 : wsl+0x19c03
0000007a`f9b7f3f0 00007ff7`3d23c4f4     : 00000000`00000001 00007ff7`3d26e174 0000018c`0dd81bc0 0000018c`0dd94664 : wsl+0x10d6e
0000007a`f9b7f690 00007ff7`3d265adc     : 00000000`00000000 00007ff7`3d265be9 0000018c`0dd7f370 00000000`00000000 : wsl+0x1c4f4
0000007a`f9b7f780 00007ffb`846f54e0     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : wsl+0x45adc
0000007a`f9b7f7c0 00007ffb`8574485b     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : KERNEL32!BaseThreadInitThunk+0x10
0000007a`f9b7f7f0 00000000`00000000     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ntdll!RtlUserThreadStart+0x2b


STACK_COMMAND:  .cxr 7af9b7e540 ; kb ; .cxr 0x7af9b7e540 ; kb

SYMBOL_NAME:  wsl+1c14a

MODULE_NAME: wsl

IMAGE_NAME:  wsl.exe

BUCKET_ID_MODPRIVATE: 1

FAILURE_BUCKET_ID:  FAIL_FAST_FATAL_APP_EXIT_8007023e_wsl.exe!Unknown

OSPLATFORM_TYPE:  x64

OSNAME:  Windows 10

IMAGE_VERSION:  10.0.10011.16384

FAILURE_ID_HASH:  {c86a08ff-5f4e-b421-710b-3f35cdd1b5ca}

Followup:     MachineOwner
---------

NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\atlmfc.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\ObjectiveC.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\concurrency.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\cpp_rest.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\stl.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\Windows.Data.Json.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\Windows.Devices.Geolocation.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\Windows.Devices.Sensors.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\Windows.Media.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\windows.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\winrt.natvis'

minidump.dmp:

Microsoft (R) Windows Debugger Version 10.0.22415.1003 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.


Loading Dump File [C:\Users\Matthew\Downloads\minidump.dmp]
User Mini Dump File with Full Memory: Only application data is available


************* Path validation summary **************
Response                         Time (ms)     Location
Deferred                                       srv*
Symbol search path is: srv*
Executable search path is: 
Windows 10 Version 22000 MP (8 procs) Free x64
Product: WinNt, suite: SingleUserTS Personal
Edition build lab: 22000.1.amd64fre.co_release.210604-1628
Machine Name:
Debug session time: Sat Oct 30 14:22:32.000 2021 (UTC - 4:00)
System Uptime: 0 days 22:10:37.851
Process Uptime: 0 days 0:02:49.000
..........................................
This dump file has an exception of interest stored in it.
The stored exception information can be accessed via .ecxr.
(637c.4134): Security check failure or stack buffer overrun - code c0000409 (first/second chance not available)
Subcode: 0x7 FAST_FAIL_FATAL_APP_EXIT 
For analysis of this file, run !analyze -v
*** WARNING: Unable to verify checksum for wsl.exe
KERNELBASE!RaiseFailFastException+0x152:
00007ffb`82d31dd2 0f1f440000      nop     dword ptr [rax+rax]
0:000> !analyze -v
*******************************************************************************
*                                                                             *
*                        Exception Analysis                                   *
*                                                                             *
*******************************************************************************

DEBUG_FLR_EXCEPTION_CODE(8007023e) and the ".exr -1" ExceptionCode(c0000409) don't match

KEY_VALUES_STRING: 1

    Key  : Analysis.CPU.mSec
    Value: 1656

    Key  : Analysis.DebugAnalysisManager
    Value: Create

    Key  : Analysis.Elapsed.mSec
    Value: 1817

    Key  : Analysis.Init.CPU.mSec
    Value: 358

    Key  : Analysis.Init.Elapsed.mSec
    Value: 4020

    Key  : Analysis.Memory.CommitPeak.Mb
    Value: 113

    Key  : FailFast.Name
    Value: FATAL_APP_EXIT

    Key  : FailFast.Type
    Value: 7

    Key  : Timeline.OS.Boot.DeltaSec
    Value: 79837

    Key  : Timeline.Process.Start.DeltaSec
    Value: 169

    Key  : WER.OS.Branch
    Value: co_release

    Key  : WER.OS.Timestamp
    Value: 2021-06-04T16:28:00Z

    Key  : WER.OS.Version
    Value: 10.0.22000.1

    Key  : WER.Process.Version
    Value: 10.0.10011.16384


NTGLOBALFLAG:  70

PROCESS_BAM_CURRENT_THROTTLED: 0

PROCESS_BAM_PREVIOUS_THROTTLED: 0

APPLICATION_VERIFIER_FLAGS:  0

CONTEXT:  0000007af9b7e540 -- (.cxr 0x7af9b7e540)
rax=00007ffb8576822a rbx=00007ff73d29e0f8 rcx=0000018c0dd70000
rdx=0000018c0dde0bf0 rsi=0000007af9b7ee30 rdi=0000000019930520
rip=00007ffb82c3466c rsp=0000007af9b7ecd0 rbp=0000007af9b7ee50
 r8=00007ffb8576910c  r9=0000018c0dd70000 r10=0000007a40000062
r11=0000000000000060 r12=0000000000000000 r13=00007ffb831a3900
r14=0000000000000000 r15=0000000000000000
iopl=0         nv up ei pl nz na po nc
cs=0033  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000204
KERNELBASE!RaiseException+0x6c:
00007ffb`82c3466c 0f1f440000      nop     dword ptr [rax+rax]
Resetting default scope

EXCEPTION_RECORD:  (.exr -1)
ExceptionAddress: 00007ff73d2371a6 (wsl+0x00000000000171a6)
   ExceptionCode: c0000409 (Security check failure or stack buffer overrun)
  ExceptionFlags: 00000001
NumberParameters: 3
   Parameter[0]: 0000000000000007
   Parameter[1]: ffffffff8007023e
   Parameter[2]: 00000000000001ca
Subcode: 0x7 FAST_FAIL_FATAL_APP_EXIT 

PROCESS_NAME:  wsl.exe

EXCEPTION_CODE_STR:  8007023e

FAULTING_THREAD:  ffffffff

STACK_TEXT:  
0000007a`f9b7ecd0 00007ffb`53486480     : 00000000`00000000 0000007a`f9b7ede8 00000000`d0000225 00007ff7`3d22b797 : KERNELBASE!RaiseException+0x6c
0000007a`f9b7edb0 00007ff7`3d23c14a     : 00007ffb`5b29cd1c 0000007a`f9b7ef88 0000007a`f9b7ef88 00007ff7`3d2a50d0 : VCRUNTIME140!_CxxThrowException+0x90
0000007a`f9b7ee10 00007ff7`3d22dd27     : 0000007a`f9b7ef88 00007ffb`5b287246 00000000`00000000 00000000`00000000 : wsl+0x1c14a
0000007a`f9b7ee60 00007ff7`3d22ab64     : 00007ff7`3d2a50d8 0000007a`f9b7eef9 00007ff7`3d2a50d0 0000007a`f9b7ef88 : wsl+0xdd27
0000007a`f9b7eea0 00007ff7`3d22c74c     : 00007ffb`8327f4f8 00007ffb`00000000 00000000`00000000 0000007a`f9b7f148 : wsl+0xab64
0000007a`f9b7ef60 00007ff7`3d23baec     : 00000000`00000000 00000000`00000000 00000000`0000004e 00007ffb`831a3900 : wsl+0xc74c
0000007a`f9b7f000 00007ff7`3d239c03     : 0000007a`f9b7f120 0000007a`f9b7f47e 0000007a`f9b7f47e 0000007a`f9b7f47e : wsl+0x1baec
0000007a`f9b7f050 00007ff7`3d230d6e     : 0000007a`f9b7f47c 0000018c`0dd7f370 0000007a`f9b7f47e 0000006c`00730077 : wsl+0x19c03
0000007a`f9b7f3f0 00007ff7`3d23c4f4     : 00000000`00000001 00007ff7`3d26e174 0000018c`0dd81bc0 0000018c`0dd94664 : wsl+0x10d6e
0000007a`f9b7f690 00007ff7`3d265adc     : 00000000`00000000 00007ff7`3d265be9 0000018c`0dd7f370 00000000`00000000 : wsl+0x1c4f4
0000007a`f9b7f780 00007ffb`846f54e0     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : wsl+0x45adc
0000007a`f9b7f7c0 00007ffb`8574485b     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : kernel32!BaseThreadInitThunk+0x10
0000007a`f9b7f7f0 00000000`00000000     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ntdll!RtlUserThreadStart+0x2b


STACK_COMMAND:  .cxr 7af9b7e540 ; kb ; .cxr 0x7af9b7e540 ; kb

SYMBOL_NAME:  wsl+1c14a

MODULE_NAME: wsl

IMAGE_NAME:  wsl.exe

BUCKET_ID_MODPRIVATE: 1

FAILURE_BUCKET_ID:  FAIL_FAST_FATAL_APP_EXIT_8007023e_wsl.exe!Unknown

OS_VERSION:  10.0.22000.1

BUILDLAB_STR:  co_release

OSPLATFORM_TYPE:  x64

OSNAME:  Windows 10

IMAGE_VERSION:  10.0.10011.16384

FAILURE_ID_HASH:  {c86a08ff-5f4e-b421-710b-3f35cdd1b5ca}

Followup:     MachineOwner
---------

NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\atlmfc.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\ObjectiveC.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\concurrency.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\cpp_rest.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\stl.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\Windows.Data.Json.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\Windows.Devices.Geolocation.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\Windows.Devices.Sensors.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\Windows.Media.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\windows.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\winrt.natvis'

minidump2.dmp:

Microsoft (R) Windows Debugger Version 10.0.22415.1003 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.


Loading Dump File [C:\Users\Matthew\Downloads\minidump2.dmp]
User Mini Dump File with Full Memory: Only application data is available


************* Path validation summary **************
Response                         Time (ms)     Location
Deferred                                       srv*
Symbol search path is: srv*
Executable search path is: 
Windows 10 Version 22000 MP (8 procs) Free x64
Product: WinNt, suite: SingleUserTS Personal
Edition build lab: 22000.1.amd64fre.co_release.210604-1628
Machine Name:
Debug session time: Sat Oct 30 14:23:10.000 2021 (UTC - 4:00)
System Uptime: 0 days 22:11:16.075
Process Uptime: 0 days 0:03:27.000
..........................................
This dump file has an exception of interest stored in it.
The stored exception information can be accessed via .ecxr.
(637c.4134): Security check failure or stack buffer overrun - code c0000409 (first/second chance not available)
Subcode: 0x7 FAST_FAIL_FATAL_APP_EXIT 
For analysis of this file, run !analyze -v
*** WARNING: Unable to verify checksum for wsl.exe
wsl+0x707b:
00007ff7`3d22707b cd29            int     29h
0:000> !analyze -v
*******************************************************************************
*                                                                             *
*                        Exception Analysis                                   *
*                                                                             *
*******************************************************************************


KEY_VALUES_STRING: 1

    Key  : Analysis.CPU.mSec
    Value: 1593

    Key  : Analysis.DebugAnalysisManager
    Value: Create

    Key  : Analysis.Elapsed.mSec
    Value: 1869

    Key  : Analysis.Init.CPU.mSec
    Value: 406

    Key  : Analysis.Init.Elapsed.mSec
    Value: 2668

    Key  : Analysis.Memory.CommitPeak.Mb
    Value: 137

    Key  : FailFast.Name
    Value: FATAL_APP_EXIT

    Key  : FailFast.Type
    Value: 7

    Key  : Timeline.OS.Boot.DeltaSec
    Value: 79876

    Key  : Timeline.Process.Start.DeltaSec
    Value: 207

    Key  : WER.OS.Branch
    Value: co_release

    Key  : WER.OS.Timestamp
    Value: 2021-06-04T16:28:00Z

    Key  : WER.OS.Version
    Value: 10.0.22000.1

    Key  : WER.Process.Version
    Value: 10.0.10011.16384


NTGLOBALFLAG:  70

PROCESS_BAM_CURRENT_THROTTLED: 0

PROCESS_BAM_PREVIOUS_THROTTLED: 0

APPLICATION_VERIFIER_FLAGS:  0

CONTEXT:  (.ecxr)
rax=0000007af9b79eb0 rbx=0000007af9b7a510 rcx=0000000000000007
rdx=0000007af9b7a360 rsi=00007ff73d230d6e rdi=0000000000000001
rip=00007ff73d22707b rsp=0000007af9b7a3e0 rbp=0000007af9b7a5e0
 r8=0000000000000000  r9=0000007af9b7a320 r10=00000fff705a6391
r11=0000000000020000 r12=0000000000000000 r13=0000000000000000
r14=00000000000001ca r15=00007ff73d26eeb8
iopl=0         nv up ei pl nz na pe nc
cs=0033  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000202
wsl+0x707b:
00007ff7`3d22707b cd29            int     29h
Resetting default scope

EXCEPTION_RECORD:  (.exr -1)
ExceptionAddress: 00007ff73d22707b (wsl+0x000000000000707b)
   ExceptionCode: c0000409 (Security check failure or stack buffer overrun)
  ExceptionFlags: 00000001
NumberParameters: 1
   Parameter[0]: 0000000000000007
Subcode: 0x7 FAST_FAIL_FATAL_APP_EXIT 

PROCESS_NAME:  wsl.exe

ERROR_CODE: (NTSTATUS) 0xc0000409 - The system detected an overrun of a stack-based buffer in this application. This overrun could potentially allow a malicious user to gain control of this application.

EXCEPTION_CODE_STR:  c0000409

EXCEPTION_PARAMETER1:  0000000000000007

FAULTING_THREAD:  ffffffff

STACK_TEXT:  
0000007a`f9b7ecd0 00007ffb`82c3466c KERNELBASE!RaiseException+0x6c
0000007a`f9b7edb0 00007ffb`53486480 VCRUNTIME140!_CxxThrowException+0x90
0000007a`f9b7ee10 00007ff7`3d23c14a wsl+0x1c14a
0000007a`f9b7ee60 00007ff7`3d22dd27 wsl+0xdd27
0000007a`f9b7eea0 00007ff7`3d22ab64 wsl+0xab64
0000007a`f9b7ef60 00007ff7`3d22c74c wsl+0xc74c
0000007a`f9b7f000 00007ff7`3d23baec wsl+0x1baec
0000007a`f9b7f050 00007ff7`3d239c03 wsl+0x19c03
0000007a`f9b7f3f0 00007ff7`3d230d6e wsl+0x10d6e
0000007a`f9b7f690 00007ff7`3d23c4f4 wsl+0x1c4f4
0000007a`f9b7f780 00007ff7`3d265adc wsl+0x45adc
0000007a`f9b7f7c0 00007ffb`846f54e0 kernel32!BaseThreadInitThunk+0x10
0000007a`f9b7f7f0 00007ffb`8574485b ntdll!RtlUserThreadStart+0x2b


SYMBOL_NAME:  wsl+1c14a

MODULE_NAME: wsl

IMAGE_NAME:  wsl.exe

STACK_COMMAND:  .cxr 7af9b7e540 ; kb ; ** Pseudo Context ** Pseudo ** Value: 1bfdb1f4000 ** ; kb

BUCKET_ID_MODPRIVATE: 1

FAILURE_BUCKET_ID:  FAIL_FAST_FATAL_APP_EXIT_c0000409_wsl.exe!Unknown

OS_VERSION:  10.0.22000.1

BUILDLAB_STR:  co_release

OSPLATFORM_TYPE:  x64

OSNAME:  Windows 10

IMAGE_VERSION:  10.0.10011.16384

FAILURE_ID_HASH:  {2e63dc9d-b85f-9d2a-c868-a2a28c186178}

Followup:     MachineOwner
---------

NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\atlmfc.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\ObjectiveC.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\concurrency.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\cpp_rest.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\stl.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\Windows.Data.Json.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\Windows.Devices.Geolocation.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\Windows.Devices.Sensors.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\Windows.Media.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\windows.natvis'
NatVis script unloaded from 'C:\Program Files\WindowsApps\Microsoft.WinDbg_1.2108.26002.0_neutral__8wekyb3d8bbwe\amd64\Visualizers\winrt.natvis'

Feedback Hub report:

Report link Note: This report contains the memory dumps. Unfortunately, Feedback Hub gave me an error when I tried to record the problem.

WSL logs

[removed]

Please let me know if there is anything else I can do to help you debug this issue.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 46 (2 by maintainers)

Most upvoted comments

Here is a simple tutorial for the fix:

  1. Make sure that File Explorer is set to show hidden and system files.
  2. Open File Explorer to C:\Program Files\
  3. Right-click WindowsApps and open properties, then open the advanced security options.
  4. Remove any specific user accounts (usually with Full Control) from the list and click Apply.
  5. Click “Change” next to the “Owner:” line and accept the UAC dialog.
  6. Paste NT SERVICE\TrustedInstaller into the box, then click “Check Names” and OK.
  7. Check the box next to “Replace owner on subcontianers and objects” and click OK.
  8. In an elevated PowerShell window, run Remove-AppxPackage (get-appxpackage MicrosoftCorporationII.WindowsSubsystemforLinux -Allusers) -AllUsers
  9. Reinstall the WSL Preview app from the Microsoft Store here.
  10. To check the permissions, run get-acl "C:\Program Files\WindowsApps\MicrosoftCorporationII.WindowsSubsystemforLinux_0.48.2.0_x64__8wekyb3d8bbwe\wsl.exe" | Format-List and make sure that it is owned by NT SERVICE\TrustedInstaller and that your user account does not have access.

@MatthewL246 thanks for your replies, I think we figured it out.

So there are two issues here:

1) WSL fails to properly start

That’s caused by the permission change you mentioned. I was able to reproduce this issue by changing the permissions of WindowsApps as well, and I was able to recover by doing the following actions:

  • Restore the ownership of C:\Program Files\WindowsApps to NT SERVICE\TrustedInstaller
  • Fully uninstall the WSL app with: Remove-AppxPackage (get-appxpackage MicrosoftCorporationII.WindowsSubsystemforLinux -Allusers) -AllUsers
  • Install WSL again

The core issue is that if the permissions of the WindowsApps are not what’s expected, the ACL’s for wsl.exe & wslhost.exe are wrong, and the processes fail to start correctly.

You can check that the permissions are correct by running get-acl "C:\Program Files\WindowsApps\MicrosoftCorporationII.WindowsSubsystemforLinux_0.49.1.23_x64__8wekyb3d8bbwe\wsl.exe" | Format-List

If you do NOT see something like:

 my-machine\my-account Allow  FullControl

Then the permissions are CORRECT.

2) wsl.exe fails to correctly handle this error

This specific error triggers a bad code path in wsl.exe and ends up crashing. This will be fixed in the next release.

Anyway, thanks a lot for the high-quality issue @MatthewL246. Let me know if the above instructions to restore WSL work for you

This problem was not solved in WSL Preview version 0.50.2. The PATH tweak (see above) still works though. Note: you might need to rearrange the order of the paths in the PATH environment variable so that %USERPROFILE%\AppData\Local\Microsoft\WindowsApps takes precedence over C:\Windows\System32.

Default Distribution: Ubuntu
Default Version: 2
WSL version: 0.50.2.0
Kernel version: 5.10.74.3
WSLg version: 1.0.29
Windows version: 10.0.22000.346

@OneBlue Yes, the service starts successfully. The same problem occurs whether I use an elevated or non-elevated command prompt. @minusium I have the same results, C:\Windows\System32\wsl.exe and C:\Program Files\WindowsApps\MicrosoftCorporationII.WindowsSubsystemforLinux_0.48.2.0_x64__8wekyb3d8bbwe\wsl.exe fail but C:\Users\Matthew\AppData\Local\Microsoft\WindowsApps\wsl.exe works.

I found another workaround for this problem!

If you go to your Windows app settings and move the Windows Subsystem for Linux Preview app from your system drive to an external drive, this problem disappears. I suspect this is because my external drive’s WindowsApps folder has never been modified, so the security permissions are correct.

If you have modified your external drive’s WindowsApps folder, this trick might not work, but you can try creating another NTFS partition on your drive, assigning a new drive letter, and moving the WSL Preview app to that new partition. That should create a new WindowsApps folder on that partition with correct permissions.

Note that you will need to keep this drive connected to your computer whenever you want to use WSL, or WSL will fail to start.

Yes,thank you 😅

Sorry

@jerryasher Unfortunately, I am not sure how to completely fix the problem. I would recommend just not touching the WindowsApps folder for now and waiting for the fix to be released.

One suggestion is that you can use C:\Users\your-username\AppData\Local\Microsoft\WindowsApps\wsl.exe instead of wsl.exe in System32. You can try adding the above path to your Windows PATH environment variable.

@OneBlue Check this: image

image

@WtfJoke I’m glad the workaround worked for you!

However, it’s unfortunate that the issue wasn’t fully fixed upstream; my computer just somehow magically fixed my environment. I assume that in my case some Windows or Microsoft Store update just reset the permissions correctly, and now I am able to use WSL Preview without any problems or workarounds.

I’m not 100% sure how to fix that @zstg, but here are some ideas. The only workaround I know of right now (if the permissions fix doesn’t work) is the PATH tweak, as Microsoft no longer allows the app to be moved to another drive after an update.

Even after modifying the PATH variables and restarting it looks like the System32 wsl gets preference …?

Did you modify the System PATH variable like this so that your WindowsApps folder is on top? I believe that the System PATH always takes precedence before the User PATH, and the order of entries does matter.

image

Please note: I have not tested this on a system with multiple users. I do not know what sort of problems adding a user-specific path to the system environment variables can cause.

Is C:\Users\DELL\AppData\Local\Microsoft\WindowsApps\wsl.exe a symlink for the current version of WSL (C:\Program Files\WindowsApps\MicrosoftCorporationII.WindowsSubsystemforLinux_0.56.2.0_x64_8wekyb3d8bbwe\wsl.exe) ??

Yeah, it looks like a symlink, but I’m not 100% sure which WSL it links to.

I have a C:\Program Files\WindowsApps\MicrosoftCorporationII.WindowsSubsystemforLinux_0.56.2.0_neutral_~_8wekyb3d8bbwe\wsl.exe and a C:\Program Files\WindowsApps\MicrosoftCorporationII.WindowsSubsystemforLinux_0.56.2.0_x64_8wekyb3d8bbwe\wsl.exe - this is normal right?

It is just like that for me as well, so I guess that’s normal for Store apps.

Finally: if all of this fails, you can just uninstall the WSL preview Store app. You won’t be able to use newer WSL features, but at least WSL will be functional.

Oh this is interesting. It could definitely affect this path.

Did you do that before or after installing WSL ?

What if you run (elevated powershell)

Remove-AppxPackage (get-appxpackage MicrosoftCorporationII.WindowsSubsystemforLinux -Allusers) -AllUsers

And then install from the store again ? I wonder if that’s enough to reset the ACL