microsoft / wslg

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

Weston segfault in libpixman-1 when running Bevy Engine game #1139

Open afonsolage opened 1 year ago

afonsolage commented 1 year ago

Windows build number:

10.0.22621.0

Your Distribution version:

22.04

Your WSL versions:

Versão do WSL: 1.2.5.0 Versão do kernel: 5.15.90.1 Versão do WSLg: 1.0.51 Versão do MSRDC: 1.2.3770 Versão do Direct3D: 1.608.2-61064218 Versão do DXCore: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Versão do Windows: 10.0.22621.2506

Steps to reproduce:

  1. Install rustup https://rustup.rs/ (curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh)
  2. Clone Bevy Engine (git clone https://github.com/bevyengine/bevy.git)
  3. Move to Bevy Engine folder (cd bevy)
  4. Install Bevy Engine dependencies (sudo apt update && sudo apt install -y g++ pkg-config libx11-dev libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev)
  5. Install kisak mesa vulkan drivers (sudo add-apt-repository ppa:kisak/kisak-mesa -y && sudo apt update && sudo apt install -y mesa-vulkan-drivers)
  6. Run Bevy example (cargo run --example bevymark --features wayland)

WSL logs:

stderr.log weston.log pulseaudio.log

WSL dumps:

No response

Expected behavior:

image

Actual behavior:

Broken pipe error:

2023-11-11T10:16:25.338046Z ERROR smithay_client_toolkit::event_loop: Error trying to flush the wayland display: Broken pipe (os error 32)

dmesg output:

[ 7459.674196] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
[ 7459.674640] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
[ 7459.675074] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
[ 7459.675492] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
[ 7460.872469] weston[51492]: segfault at 7fc27c012010 ip 00007fc283c1bc10 sp 00007ffc2386b508 error 4 in libpixman-1.so.0.42.2[7fc283b98000+85000]
[ 7460.872478] Code: ff ff ff f6 c2 0f 75 e2 83 f9 3f 0f 8e 29 ff ff ff 83 e9 40 48 89 d6 41 89 cd 41 c1 ed 06 45 8d 65 01 49 c1 e4 06 4a 8d 3c 20 <f3> 0f 6f 50 10 f3 0f 6f 18 48 83 c0 40 48 83 c6 40 f3 0f 6f 48 e0
[ 7460.872483] potentially unexpected fatal signal 11.
[ 7460.872484] CPU: 1 PID: 51492 Comm: weston Not tainted 5.15.90.1-microsoft-standard-WSL2 #1
[ 7460.872486] RIP: 0033:0x7fc283c1bc10
[ 7460.872488] Code: ff ff ff f6 c2 0f 75 e2 83 f9 3f 0f 8e 29 ff ff ff 83 e9 40 48 89 d6 41 89 cd 41 c1 ed 06 45 8d 65 01 49 c1 e4 06 4a 8d 3c 20 <f3> 0f 6f 50 10 f3 0f 6f 18 48 83 c0 40 48 83 c6 40 f3 0f 6f 48 e0
[ 7460.872489] RSP: 002b:00007ffc2386b508 EFLAGS: 00010212
[ 7460.872513] RAX: 00007fc27c012000 RBX: 0000000000001e50 RCX: 0000000000001e10
[ 7460.872514] RDX: 00007fc27c0bd000 RSI: 00007fc27c0bd000 RDI: 00007fc27c013e40
[ 7460.872515] RBP: 0000000000001e50 R08: 00007fc27c0bd000 R09: 000000000000002c
[ 7460.872515] R10: 00007fc27c013e50 R11: 0000000000001e50 R12: 0000000000001e40
[ 7460.872516] R13: 0000000000000078 R14: 0000000000000000 R15: 0000000000000000
[ 7460.872517] FS:  00007fc2808c5ec0 GS:  0000000000000000
[ 7460.963179] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
[ 7460.963583] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
[ 7460.963977] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -22
[ 7460.964404] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
afonsolage commented 1 year ago

To make it easier to reproduce, in a fresh WSL Ubuntu install, I made a reproduce.sh script: https://gist.github.com/afonsolage/1fa533297ecda68eb374988d6896b589

Just run it and type sudo password and everything the error should be visible at the end.