microsoft / WSL

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

Segmentation Fault in /usr/lib/wsl/lib/libd3d12core.so #11461

Closed MaxCrazy1101 closed 6 months ago

MaxCrazy1101 commented 6 months ago

Windows Version

Microsoft Windows [Version 10.0.22631.3447]

WSL Version

2.1.5.0

Are you using WSL 1 or WSL 2?

Kernel Version

5.15.146.1-microsoft-standard-WSL2

Distro Version

Ubuntu 22.04.4 LTS

Other Software

WSL 版本: 2.1.5.0 内核版本: 5.15.146.1-2 WSLg 版本: 1.0.60 MSRDC 版本: 1.2.5105 Direct3D 版本: 1.611.1-81528511 DXCore 版本: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows 版本: 10.0.22631.3447

Repro Steps

https://github.com/stevenlovegrove/Pangolin/issues/908

Expected Behavior

when i use WAYLAND_DISPLAY=0 It works but if i quit the program, Segmentation Fault also shows. It did't fault in /usr/lib/wsl/lib/libd3d12core.so WSL2 is not a supported scenario and it looks like the issue is in /usr/lib/wsl/lib/libd3d12core.so. You better report the issue to the wslg project. without WAYLAND_DISPLAY=0 the example will fault in /usr/lib/wsl/lib/libd3d12core.so and didn't work properly

Actual Behavior

cs@XDUPC:~/3rd_lib/x11_egl/build/examples/HelloPangolin$ gdb ./HelloPangolin /mnt/wslg/dumps/core.HelloPangolin.1328
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./HelloPangolin...

warning: Can't open file /dev/zero (deleted) during file-backed mapping note processing

warning: Can't open file /memfd:mesa-shared (deleted) during file-backed mapping note processing

warning: Can't open file /memfd:wayland-cursor (deleted) during file-backed mapping note processing
[New LWP 1328]
[New LWP 1331]
[New LWP 1342]
[New LWP 1335]
[New LWP 1337]
[New LWP 1336]
[New LWP 1334]
[New LWP 1341]
[New LWP 1344]
[New LWP 1348]
[New LWP 1347]
[New LWP 1349]
[New LWP 1346]
[New LWP 1333]
[New LWP 1338]
[New LWP 1345]
[New LWP 1343]
[New LWP 1339]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
--Type <RET> for more, q to quit, c to continue without paging--c
Core was generated by `./HelloPangolin'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f1d91c46b4c in ?? () from /usr/lib/wsl/lib/libd3d12core.so
[Current thread is 1 (Thread 0x7f1d9d307c80 (LWP 1328))]
(gdb) bt
#0  0x00007f1d91c46b4c in ?? () from /usr/lib/wsl/lib/libd3d12core.so
#1  0x00007f1d91c46eb5 in ?? () from /usr/lib/wsl/lib/libd3d12core.so
#2  0x00007f1d91c471df in ?? () from /usr/lib/wsl/lib/libd3d12core.so
#3  0x00007f1d9bcc403a in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#4  0x00007f1d9bcee383 in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#5  0x00007f1d9bcac92d in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#6  0x00007f1d9bcc793d in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#7  0x00007f1d9bc9db4e in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#8  0x00007f1d9b1a6b5e in ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#9  0x00007f1d9d2c48cf in ?? () from /lib/x86_64-linux-gnu/libEGL_mesa.so.0
#10 0x00007f1d9d2bbdf5 in ?? () from /lib/x86_64-linux-gnu/libEGL_mesa.so.0
#11 0x00007f1d9d2afaf5 in ?? () from /lib/x86_64-linux-gnu/libEGL_mesa.so.0
#12 0x00007f1d9dc69ba6 in pangolin::wayland::DecorationSurface::draw (this=0x5595dd815290)
    at /home/cs/3rd_lib/x11_egl/components/pango_windowing/src/display_wayland.cpp:224
#13 0x00007f1d9dc6a4b1 in pangolin::wayland::Decoration::draw (this=0x5595dd918f70)
    at /home/cs/3rd_lib/x11_egl/components/pango_windowing/src/display_wayland.cpp:291
#14 0x00007f1d9dc660e6 in pangolin::wayland::WaylandWindow::SwapBuffers (this=0x5595dda8ed40)
    at /home/cs/3rd_lib/x11_egl/components/pango_windowing/src/display_wayland.cpp:1020
#15 0x00007f1d9e5252c2 in pangolin::PangolinGl::FinishFrame (this=0x5595dd57c800)
    at /home/cs/3rd_lib/x11_egl/components/pango_display/src/pangolin_gl.cpp:74
#16 0x00007f1d9e4ed745 in pangolin::FinishFrame ()
    at /home/cs/3rd_lib/x11_egl/components/pango_display/src/display.cpp:257
#17 0x00005595dc466889 in main () at /home/cs/3rd_lib/x11_egl/examples/HelloPangolin/main.cpp:33
(gdb)

Diagnostic Logs

WslLogs-2024-04-13_20-23-00.zip

github-actions[bot] commented 6 months 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 scipt will output the path of the log file once done. 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'.
MaxCrazy1101 commented 6 months ago

WslLogs-2024-04-13_20-23-00.zip

github-actions[bot] commented 6 months ago
Diagnostic information ``` .wslconfig found Detected appx version: 2.1.5.0 ```
MaxCrazy1101 commented 6 months ago

sorry it shout open in wslg