weston crashes when running winit apps
Windows build number:
Microsoft Windows NT 10.0.26100.0
Your Distribution version:
Ubuntu 24.04
Your WSL versions:
WSL version: 2.6.1.0 Kernel version: 6.6.87.2-1 WSLg version: 1.0.66 MSRDC version: 1.2.6353 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.26100.1-240331-1435.ge-release Windows version: 10.0.26100.6899
Steps to reproduce:
- Install Rust from rustup.rs (
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh) - Clone winit/softbuffer repo:
git clone https://github.com/rust-windowing/softbuffer.git cd softbuffer- Run example from this repo:
cargo run --example fruit - Resize window that appears, drag it by the right border to the right.
App now crashes because it loses connection to wayland:
user@pc:~/softbuffer$ cargo run --example fruit
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.06s
Running `/home/user/target/debug/examples/fruit`
Io error: Connection reset by peer (os error 104)
thread 'main' (6910) panicked at examples/fruit.rs:51:55:
called `Result::unwrap()` on an `Err` value: PlatformError(Some("Wayland dispatch failure"), Some(Backend(Io(Os { code: 104, kind: ConnectionReset, message: "Connection reset by peer" }))))
Only some winit apps cause wayland to crash, e.g. cargo run --example animation from the same repo runs without crashing.
dmesg output:
[ 1558.330486] weston[7906]: segfault at 724da41c7690 ip 0000724dc0acfc10 sp 00007ffe67cbf7d8 error 4 in libpixman-1.so.0.42.2[724dc0a4c000+85000] likely on CPU 8 (core 4, socket 0)
[ 1558.330495] 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
[ 1558.330501] weston: weston: potentially unexpected fatal signal 11.
[ 1558.330502] CPU: 8 PID: 7906 Comm: weston Not tainted 6.6.87.2-microsoft-standard-WSL2 #1
[ 1558.330504] RIP: 0033:0x724dc0acfc10
[ 1558.330506] 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
[ 1558.330507] RSP: 002b:00007ffe67cbf7d8 EFLAGS: 00010206
[ 1558.330508] RAX: 0000724da41c7680 RBX: 00000000000012e8 RCX: 00000000000012a8
[ 1558.330508] RDX: 0000724db8286000 RSI: 0000724db8286000 RDI: 0000724da41c8940
[ 1558.330509] RBP: 00000000000012e8 R08: 0000724db8286000 R09: 000000000000002b
[ 1558.330509] R10: 0000724da41c8968 R11: 00000000000012e8 R12: 00000000000012c0
[ 1558.330510] R13: 000000000000004a R14: 0000000000000000 R15: 0000000000000000
[ 1558.330510] FS: 0000724dbd6b9ec0 GS: 0000000000000000
[ 1558.331267] WSL (7998 - CaptureCrash): Capturing crash for pid: 7406, executable: !usr!bin!weston, signal: 11, port: 50005
Similar issue reported in #1358 but for me my app doesn't segfaults, only weston does. Unlike in that issue it stays reproducible without restarting WSL.
WSL logs:
WSL dumps:
These dumps contain private information, like URLs of open tabs in Firefox (how is this even possible?). So I won't upload them.
Expected behavior:
GUI apps using winit work
Actual behavior:
weston crashes