| 1 | wpa_profile: no-filter.wpaProfile |
| 2 | |
| 3 | logs_rules: |
| 4 | missing_logs_message: | |
| 5 | # Logs are required for review from WSL team |
| 6 | |
| 7 | If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. |
| 8 | **Otherwise, please attach logs by following the instructions below**, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine. |
| 9 | |
| 10 | <details> |
| 11 | |
| 12 | <summary>How to collect WSL logs</summary> |
| 13 | |
| 14 | Download and execute [collect-wsl-logs.ps1](https://github.com/Microsoft/WSL/blob/master/diagnostics/collect-wsl-logs.ps1) in an **administrative powershell prompt**: |
| 15 | |
| 16 | ``` |
| 17 | Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1 |
| 18 | Set-ExecutionPolicy Bypass -Scope Process -Force |
| 19 | .\collect-wsl-logs.ps1 |
| 20 | ``` |
| 21 | |
| 22 | The script will output the path of the log file once done. |
| 23 | |
| 24 | If this is a networking issue, please use `.\collect-wsl-logs.ps1 -LogProfile networking` instead, following the instructions in [Collect WSL logs for networking issues](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues) |
| 25 | |
| 26 | Once completed please upload the output files to this GitHub issue. |
| 27 | |
| 28 | See [Collect WSL logs (recommended method)](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#8-collect-wsl-logs-recommended-method). |
| 29 | |
| 30 | If you choose to email these logs instead of attaching them to the bug, please send them to wsl-gh-logs@microsoft.com with the GitHub issue number in the subject, and include a link to your GitHub issue comment in the message body, and reply with '/emailed-logs'. |
| 31 | </details> |
| 32 | |
| 33 | |
| 34 | missing_logs_add_tags: ['needs-author-feedback'] |
| 35 | missing_logs_etl_message: 'No logs.etl found in the archive. Make sure that you ran `collect-wsl-logs.ps1` as administrator and that the `logs.etl` file is in the archive.' |
| 36 | skip_tags: ['emailed-logs'] |
| 37 | |
| 38 | optional_component_rules: |
| 39 | - name: VirtualMachinePlatform |
| 40 | set: vmp-oc-enabled |
| 41 | |
| 42 | - name: Microsoft-Windows-Subsystem-Linux |
| 43 | set: wsl-oc-enabled |
| 44 | |
| 45 | tags_rules: |
| 46 | ignore: ['/featurename'] |
| 47 | tags: |
| 48 | - contains: '/question' |
| 49 | tag: 'question' |
| 50 | |
| 51 | - contains: '/feature' |
| 52 | tag: 'feature' |
| 53 | |
| 54 | - contains: '/emailed-logs' |
| 55 | tag: 'emailed-logs' |
| 56 | |
| 57 | rules: |
| 58 | - logline: |
| 59 | provider: Microsoft.Windows.Lxss.Manager |
| 60 | task: GuestLog |
| 61 | field1: |
| 62 | contains: 'brd: module loaded' |
| 63 | set: booting |
| 64 | |
| 65 | - logline: |
| 66 | provider: Microsoft.Windows.Lxss.Manager |
| 67 | task: GuestLog |
| 68 | field1: |
| 69 | contains: 'oom-kill' |
| 70 | set: |
| 71 | name: oom |
| 72 | capture: |
| 73 | field1: oom-error |
| 74 | |
| 75 | - logline: |
| 76 | provider: Microsoft.Windows.Lxss.Manager |
| 77 | task: GuestLog |
| 78 | field1: |
| 79 | contains: 'Kernel panic' |
| 80 | set: |
| 81 | name: kernel-panic |
| 82 | capture: |
| 83 | field1: kmsg |
| 84 | |
| 85 | - logline: |
| 86 | provider: Microsoft.Windows.Lxss.Manager |
| 87 | task: GuestLog |
| 88 | field1: |
| 89 | regex: 'WSL (.*) ERROR' |
| 90 | set: init-error |
| 91 | |
| 92 | - logline: |
| 93 | provider: Microsoft.Windows.Lxss.Manager |
| 94 | task: GuestLog |
| 95 | field1: |
| 96 | regex: 'init(.*) segfault' |
| 97 | set: |
| 98 | name: init-crash |
| 99 | capture: |
| 100 | field1: error |
| 101 | |
| 102 | - logline: |
| 103 | provider: Microsoft.Windows.Subsystem.Lxss |
| 104 | task: UserVisibleError |
| 105 | set: |
| 106 | name: user-visible-error |
| 107 | capture: |
| 108 | field3: error |
| 109 | |
| 110 | - logline: |
| 111 | provider: Microsoft.Windows.Subsystem.Lxss |
| 112 | task: UserVisibleError |
| 113 | field3: Wsl/CallMsi/REGDB_E_CLASSNOTREG |
| 114 | set: msix-bad-install-state |
| 115 | |
| 116 | - logline: |
| 117 | provider: Microsoft.Windows.Subsystem.Lxss |
| 118 | task: LxssException |
| 119 | field1: 'onecore\vm\wsl\lxss\wslutil\liftedsupport.cpp' |
| 120 | field5: '0x80070002' |
| 121 | set: msix-bad-app-exec-alias-state |
| 122 | |
| 123 | - logline: |
| 124 | provider: Microsoft-Windows-Hyper-V-Chipset |
| 125 | field1: |
| 126 | regex: '.*biosdevice.*80070057.*' # 80070057 = E_INVALIDARG |
| 127 | set: corrupted-initramfs |
| 128 | |
| 129 | - logline: |
| 130 | provider: Microsoft.Windows.Lxss.Manager |
| 131 | task: FailedToStartVm |
| 132 | set: |
| 133 | name: vm-failed-to-start |
| 134 | capture: |
| 135 | field4: error |
| 136 | |
| 137 | - logline: |
| 138 | provider: Microsoft.Windows.Lxss.Manager |
| 139 | task: Error |
| 140 | field8: '0x8004032D' # 0x8004032D = WSL_E_VIRTUAL_MACHINE_PLATFORM_REQUIRED |
| 141 | set: |
| 142 | name: vmp-required |
| 143 | capture: |
| 144 | field8: error |
| 145 | |
| 146 | - logline: |
| 147 | provider: Microsoft.Windows.Lxss.Manager |
| 148 | task: Error |
| 149 | field9: {contains: HcnCreateNetwork} |
| 150 | set: |
| 151 | name: hns-create-network-error |
| 152 | capture: |
| 153 | field9: error |
| 154 | field8: hresult |
| 155 | |
| 156 | - logline: |
| 157 | provider: Microsoft.Windows.Lxss.Manager |
| 158 | set: service-running |
| 159 | oneshot: true |
| 160 | |
| 161 | - logline: |
| 162 | provider: Microsoft.Windows.Subsystem.Lxss |
| 163 | task: LxssException |
| 164 | field7: |
| 165 | regex: '.*0x80070422.*' |
| 166 | set: service-disabled-error |
| 167 | |
| 168 | - logline: |
| 169 | provider: Microsoft.Windows.Subsystem.Lxss |
| 170 | task: UserVisible Error |
| 171 | field3: {regex: '.*/ConfigureNetworking/HNS/.*'} |
| 172 | set: |
| 173 | name: hns-fatal-error |
| 174 | capture: |
| 175 | field3: error |
| 176 | |
| 177 | - logline: |
| 178 | provider: Microsoft.Windows.Hyper.V.NetMgmt |
| 179 | task: NetMgmt::CreateVirtualSwitch |
| 180 | field4: '0x80041002' |
| 181 | set: |
| 182 | name: vmswitch-known-issue |
| 183 | capture: |
| 184 | field4: error |
| 185 | |
| 186 | - logline: |
| 187 | provider: Microsoft.Windows.Lxss.Manager |
| 188 | task: GuestLog |
| 189 | field1: |
| 190 | contains: 'EXT4-fs error' |
| 191 | set: |
| 192 | name: ext4-error |
| 193 | capture: |
| 194 | field1: error |
| 195 | |
| 196 | - logline: |
| 197 | provider: Microsoft.Windows.Lxss.Manager |
| 198 | task: GuestLog |
| 199 | field1: {regex: "EXT4-fs.*Can't find ext4 filesystem"} |
| 200 | set: |
| 201 | name: ext4-mount-error |
| 202 | capture: |
| 203 | field1: error |
| 204 | |
| 205 | - logline: |
| 206 | provider: Microsoft.Windows.Lxss.Manager |
| 207 | task: GuestLog |
| 208 | field1: {regex: ".*No space left on device"} |
| 209 | set: |
| 210 | name: disk-out-of-space |
| 211 | capture: |
| 212 | field1: error |
| 213 | |
| 214 | - logline: |
| 215 | provider: Microsoft.Windows.Lxss.Manager |
| 216 | task: LinuxCrash |
| 217 | set: |
| 218 | name: linux-crash |
| 219 | capture: |
| 220 | field3: linux-crash-path |
| 221 | field6: linux-crash-process |
| 222 | |
| 223 | - logline: |
| 224 | provider: Microsoft.Windows.Lxss.Manager |
| 225 | set: wsl-service-logs |
| 226 | oneshot: true |
| 227 | |
| 228 | - logline: |
| 229 | provider: Microsoft.Windows.Subsystem.Lxss |
| 230 | set: wsl-client-logs |
| 231 | oneshot: true |
| 232 | |
| 233 | - logline: |
| 234 | provider: Microsoft.Windows.Subsystem.Lxss |
| 235 | field8: {regex: ".*InstallMsix\\(.*"} |
| 236 | set: |
| 237 | name: msix-install-error |
| 238 | capture: |
| 239 | field7: error |
| 240 | oneshot: true |
| 241 | |
| 242 | - logline: |
| 243 | provider: Microsoft-Windows-VHDMP |
| 244 | task: VHD_VIRTUAL_DISK_HANDLE_CREATE_TASK |
| 245 | event: 'Microsoft-Windows-VHDMP/VHD_VIRTUAL_DISK_HANDLE_CREATE_TASK/win:Stop' |
| 246 | field1: {not: '0x00000000'} |
| 247 | set: |
| 248 | name: disk-attach-error |
| 249 | capture: |
| 250 | field1: error |
| 251 | field2: vhdpath |
| 252 | |
| 253 | - logline: |
| 254 | provider: Microsoft.Windows.HyperV.Worker |
| 255 | task: FallbackError |
| 256 | field2: {regex: ".*vmchipset\\.dll.*80090006.*"} #0x80090006 = NTE_BAD_SIGNATURE |
| 257 | set: |
| 258 | name: hyper-v-firmware-expired |
| 259 | capture: |
| 260 | field2: signature-error |
| 261 | |
| 262 | actions: |
| 263 | - foreach: |
| 264 | var: user-visible-error |
| 265 | debug_message: 'Detected user visible error: $error' |
| 266 | skip_similar_issues: false |
| 267 | |
| 268 | - foreach: |
| 269 | var: linux-crash |
| 270 | debug_message: 'Found evidence of linux crash: $linux-crash-process (dump: $linux-crash-path)' |
| 271 | skip_similar_issues: false |
| 272 | |
| 273 | - foreach: |
| 274 | var: disk-attach-error |
| 275 | debug_message: 'Found evidence of disk failing to attach. Error: $error, Path: $vhdpath' |
| 276 | |
| 277 | - when: |
| 278 | condition: 'init-crash' |
| 279 | debug_message: 'Found evidence of init crash: $error' |
| 280 | tag: init-crash |
| 281 | |
| 282 | - when: |
| 283 | condition: 'kernel-panic' |
| 284 | debug_message: 'Found evidence of kernel panic: $kmsg' |
| 285 | skip_similar_issues: false |
| 286 | |
| 287 | - when: |
| 288 | condition: |
| 289 | and: ['oom', 'booting'] |
| 290 | user_message: 'The logs show that WSL2 ran out of memory. Try increasing wsl2.memory in .wslconfig and see if that solves the issue.' |
| 291 | debug_message: 'Found evidence of OOM kill: $oom-error' |
| 292 | tag: needs-author-feedback |
| 293 | skip_similar_issues: true |
| 294 | |
| 295 | - when: |
| 296 | condition: |
| 297 | and: ['vm-failed-to-start', 'hyperv-firmware-expired'] |
| 298 | user_message: 'The logs show that your Hyper-V firmware is expired. Please update your Windows build and see if that solves the issue' |
| 299 | tag: needs-author-feedback |
| 300 | skip_similar_issues: true |
| 301 | |
| 302 | - when: |
| 303 | condition: 'hns-create-network-error' |
| 304 | debug_message: 'Found evidence of HcnCreateNetwork failure: $error. HResult: $hresult' |
| 305 | |
| 306 | - when: |
| 307 | condition: |
| 308 | and: ['vm-failed-to-start', 'hns-create-network-error'] |
| 309 | user_message: "The logs show that the VM failed to start because the HNS network couldn't be created. Adding network tag" |
| 310 | tag: network |
| 311 | skip_similar_issues: true |
| 312 | |
| 313 | - when: |
| 314 | condition: |
| 315 | and: ['vm-failed-to-start', 'corrupted-initramfs'] |
| 316 | user_message: 'Your WSL installation seems corrupted. Please try to download and install the [latest WSL release](https://github.com/microsoft/WSL/releases/latest)' |
| 317 | tag: needs-author-feedback |
| 318 | skip_similar_issues: true |
| 319 | |
| 320 | - when: |
| 321 | condition: |
| 322 | and: [{not: 'service-running'}, 'service-disabled-error'] |
| 323 | user_message: 'The logs show that wslservice is disabled. Try to run (elevated command prompt): `sc.exe config wslservice start= demand` and see if that solves the issue' |
| 324 | tag: needs-author-feedback |
| 325 | skip_similar_issues: true |
| 326 | |
| 327 | - when: |
| 328 | condition: |
| 329 | and: ['vm-failed-to-start', 'hns-fatal-error'] |
| 330 | user_message: 'An HNS error seems to be causing WSL2 to fail to start. Adding network tag' |
| 331 | debug_message: 'Found HNS error: $error' |
| 332 | tag: 'network' |
| 333 | |
| 334 | - when: |
| 335 | condition: |
| 336 | and: ['vm-failed-to-start', 'vmswitch-known-issue'] |
| 337 | user_message: 'Known vmswitch issue found (error: $error). Adding network tag' |
| 338 | debug_message: 'Found evidence of vmswitch error: $error' |
| 339 | tag: 'network' |
| 340 | skip_similar_issues: true |
| 341 | |
| 342 | |
| 343 | - when: |
| 344 | condition: {or: ['ext4-error', 'ext4-mount-error']} |
| 345 | user_message: 'The logs shows that a disk mount error occurred. Try to [follow these repair instructions](https://learn.microsoft.com/en-us/windows/wsl/disk-space#how-to-repair-a-vhd-mounting-error) and see if that solves the issue.' |
| 346 | debug_message: 'Found evidence of ext4 error: $error' |
| 347 | tag: 'needs-author-feedback' |
| 348 | skip_similar_issues: true |
| 349 | |
| 350 | |
| 351 | - when: |
| 352 | condition: |
| 353 | not: |
| 354 | or: ['wsl-client-logs', 'wsl-service-logs'] |
| 355 | user_message: "The log file doesn't contain any WSL traces. Please make sure **that you reproduced the issue while the log collection was running.**" |
| 356 | debug_message: 'Found no WSL traces in the logs' |
| 357 | tag: 'needs-author-feedback' |
| 358 | skip_similar_issues: false |
| 359 | |
| 360 | - when: |
| 361 | condition: |
| 362 | and: |
| 363 | - vmp-required |
| 364 | - not: vmp-oc-enabled |
| 365 | debug_message: 'Found evidence of virtual machine platform component missing: $error' |
| 366 | user_message: 'It appears that the VirtualMachinePlatform optional component is not enabled. Please try running: `dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart`, then reboot and see if that solves the issue.' |
| 367 | skip_similar_issues: false |
| 368 | tag: 'needs-author-feedback' |
| 369 | |
| 370 | - when: |
| 371 | condition: msix-install-error |
| 372 | debug_message: 'Found evidence of MSIX install error: $error, adding msix tag' |
| 373 | tag: 'msix' |
| 374 | |
| 375 | - when: |
| 376 | condition: msix-bad-app-exec-alias-state |
| 377 | debug_message: 'Found evidence of failed app execution alias execution in LiftedSupport' |
| 378 | |
| 379 | - when: |
| 380 | condition: {or: [msix-bad-install-state, msix-bad-app-exec-alias-state]} |
| 381 | user_message: | |
| 382 | Your WSL installation appears to be in a bad state. Can you try running the following command to reinstall WSL (elevated powershell) and see if that solves the issue? |
| 383 | |
| 384 | ``` |
| 385 | Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/triage/install-latest-wsl.ps1" -OutFile install-latest-wsl.ps1 |
| 386 | Set-ExecutionPolicy Bypass -Scope Process -Force |
| 387 | .\install-latest-wsl.ps1 |
| 388 | ``` |
| 389 | |
| 390 | |
| 391 | tag: 'msix' |
| 392 | |
| 393 | - when: |
| 394 | condition: disk-out-of-space |
| 395 | debug_message: 'Found evidence of disk being full: $error' |
| 396 | user_message: | |
| 397 | It looks like WSL is out of space. If you're importing a new distribution, try to add: |
| 398 | |
| 399 | ``` |
| 400 | [wsl2] |
| 401 | defaultVhdSize = <size> # (example: 1500GB) |
| 402 | ``` |
| 403 | |
| 404 | Otherwise, if you need to increase the size of an existing distribution, you can follow [these instructions](https://learn.microsoft.com/en-us/windows/wsl/disk-space#how-to-expand-the-size-of-your-wsl-2-virtual-hard-disk). |
| 405 | |
| 406 | - when: |
| 407 | condition: |
| 408 | and: ['hyper-v-firmware-expired', 'vm-failed-to-start'] |
| 409 | tag: 'needs-author-feedback' |
| 410 | debug_message: 'Found evidence of hyper-v firmware expiration: $signature-error' |
| 411 | user_message: | |
| 412 | It looks like the Hyper-V firmware on your Windows build has expired. Please try to update Windows to a more recent build and see if that solves the issue. |