microsoft / wslg

Enabling the Windows Subsystem for Linux to include support for Wayland and X server related scenarios
MIT License
10.26k stars 310 forks source link

GUI Apps Segfault on Ubuntu 22.04+ #1297

Open vesk4000 opened 1 month ago

vesk4000 commented 1 month ago

Windows Version

Microsoft Windows [Version 10.0.22631.4317]

WSL Version

2.3.24.0

Are you using WSL 1 or WSL 2?

Kernel Version

5.15.153.1-microsoft-standard-WSL2

Distro Version

Ubuntu 22.04.5 LTS, Ubuntu 24.04.1 LTS

Other Software

No response

Repro Steps

Install Ubuntu 22.04 or Ubuntu 24.04 (via the Microsoft store, the terminal, or by importing a custom WSL Ubuntu distribution). Run

sudo apt update
sudo apt upgrade
sudo apt install mesa-utils
glxgears

Expected Behavior

I expect a window to open showing three gears. In fact, this works WSL for Ubuntu 20.04.6 LTS:

Image

Actual Behavior

It segfaults:

Segmentation fault (core dumped)

This happens when I try to run any (GPU-accelerated) app that I can think of. I've tried many different drivers and mesa PPA's, but none of them do the trick.

Diagnostic Logs

WslLogs-2024-10-21_19-12-01.zip

nvidia-smi
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 565.51.01              Driver Version: 565.90         CUDA Version: 12.7     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce GTX 1650        On  |   00000000:01:00.0 Off |                  N/A |
| N/A   37C    P8              2W /   25W |       0MiB /   4096MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
 ldd /usr/bin/glxgears
        linux-vdso.so.1 (0x00007fffb8dd9000)
        libGL.so.1 => /lib/x86_64-linux-gnu/libGL.so.1 (0x00007f7ce0097000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7cdffb0000)
        libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007f7cdfe70000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7cdfc47000)
        libGLdispatch.so.0 => /lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007f7cdfb8f000)
        libGLX.so.0 => /lib/x86_64-linux-gnu/libGLX.so.0 (0x00007f7cdfb5b000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f7ce012d000)
        libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f7cdfb2f000)
        libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007f7cdfb29000)
        libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f7cdfb21000)
        libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f7cdfb09000)
        libmd.so.0 => /lib/x86_64-linux-gnu/libmd.so.0 (0x00007f7cdfafc000)

Running with GDB gives:

(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr/bin/glxgears
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe1293640 (LWP 803)]

Thread 1 "glxgears" received signal SIGSEGV, Segmentation fault.
0x00007fffffff9c30 in ?? ()

Image

github-actions[bot] commented 1 month ago

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. 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.

How to collect WSL logs Download and execute [collect-wsl-logs.ps1](https://github.com/Microsoft/WSL/blob/master/diagnostics/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 script will output the path of the log file once done. If this is a networking issue, please use [collect-networking-logs.ps1](https://github.com/Microsoft/WSL/blob/master/diagnostics/collect-networking-logs.ps1), following the instructions [here](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues) Once completed please upload the output files to this Github issue. [Click here for more info on logging](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#8-collect-wsl-logs-recommended-method) If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

View similar issues

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!

Open similar issues:

Closed similar issues:

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

github-actions[bot] commented 1 month ago
Diagnostic information ``` Issue was edited and new log file was found: https://github.com/user-attachments/files/17464672/WslLogs-2024-10-21_19-12-01.zip Detected appx version: 2.3.24.0 ```
vesk4000 commented 1 month ago

I've updated the issue. Note that the logs that I've uploaded don't including the importing/installation of the distro, but let me know if I should publish logs with the importing included. Let me know if I can give you any other info.