microsoft / microsoft/WSL

WSL exits unexpectedly when compiling software.

Open
#40,458 19 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs-investigation wsl2
Dominant language
C++
Stars
33.7k
Forks
1.8k
Avg merge
3d 17h
Merged PRs (30d)
116

Description

### Windows Version

Microsoft Windows [Version 10.0.26200.8246]

### WSL Version

2.6.3.0

### Are you using WSL 1 or WSL 2?

- [x] WSL 2
- [ ] WSL 1

### Kernel Version

Linux version 6.6.87.2-microsoft-standard-WSL2 (root@439a258ad544) (gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37) #1 SMP PREEMPT_DYNAMIC Thu Jun 5 18:30:46 UTC 2025

### Distro Version

Ubuntu 24.04.4

### Other Software

Visual Studio 2022
Command Prompt
other wsl instance ( running top)

### Repro Steps

# Initial Configuration
1) Install Ubuntu using the Visual Studio option to "Install WSL For Me" under the Project Menu
2) Open a command line after the Installation completes sucessfully.
3) sign into root on the VM using the command:
```
wsl -u root
```
4) Install the Dependencies to build the Vulkan SDK for linux ( Documentation Here: https://vulkan.lunarg.com/doc/sdk/latest/linux/getting_started.html )
```
apt update
apt upgrade
apt install xz-utils

apt-get install libglm-dev cmake libxcb-dri3-0 libxcb-present0 libpciaccess0 \
libpng-dev libxcb-keysyms1-dev libxcb-dri3-dev libx11-dev g++ gcc \
libwayland-dev libxrandr-dev libxcb-randr0-dev libxcb-ewmh-dev \
git python-is-python3 bison libx11-xcb-dev liblz4-dev libzstd-dev \
ocaml-core ninja-build pkg-config libxml2-dev wayland-protocols python3-jsonschema \
clang-format qtbase5-dev qt6-base-dev
```
5) Create the folder ``` /opt/vulkansdk/custom_built ```.
6) Change the group and file ownership of the folder created in step 5 to allow the non-root wsl user the ability to create/edit files in this path.
7) exit out of this session.
8) Use Visual Studio to download the Repository https://github.com/kphillisjr/VkSDKBuilder
9) Issue the Configuration, and build commands on visual studio for wsl linux. The first build I am doing uses the default configuration for ```linux-debug```.
10) use the open command prompt to launch wsl.
11) run the command ```top```

Note: Once the first crash happens it can be reproduced with the following sequence
1) open wsl on command line
```wsl```
2) run the following sequence.
```
cd ~/.vs/VkSDKBuilder/out/build/linux-debug
ninja clean
ninja
```

### Expected Behavior

For the build script to complete without crashing wsl.

### Actual Behavior

# Visual Studio 2022 behavior
The build goes for a while and then eventually stops with no indication that the build actually failed.

# wsl directly
The build goes for a while, and then wsl crashes out to the windows command line without any indication that wsl had crashed.

**Note 1:** Both build methods appear to crash at about the same area.
**Note 2:** I noticed that a process called ```VmmemWSL``` suddenly has a massive increase in disk usage.
**Note 3:** This bug happened on two different Windows 11 Computers with all updates applied.

### Diagnostic Logs

[dmesg.0.txt](https://github.com/user-attachments/files/27499667/dmesg.0.txt)

[wsl_commandline.txt](https://github.com/user-attachments/files/27499991/wsl_commandline.txt)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing dmesg.0.txt and wsl_commandline.txt, then reproduce the failure from ~/.vs/VkSDKBuilder/out/build/linux-debug with ninja clean followed by ninja while monitoring top. Compare the logs and build behavior around the crash; done means the Vulkan SDK build completes without WSL exiting unexpectedly.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, linux, ubuntu
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.