Skip to content

Clipboard integration on libweston may cause race condition and crash the weston process #1407

@tumugin

Description

@tumugin

Windows build number:

10.0.26220.0

Your Distribution version:

Ubuntu 24.04.3 LTS

Your WSL versions:

WSL バージョン: 2.7.0.0
カーネル バージョン: 6.6.114.1-1
WSLg バージョン: 1.0.71
MSRDC バージョン: 1.2.6676
Direct3D バージョン: 1.611.1-81528511
DXCore バージョン: 10.0.26100.1-240331-1435.ge-release
Windows バージョン: 10.0.26220.7344

Steps to reproduce:

  • Open gnome-terminal on Linux side with WSLg.
  • Open Microsoft Edge on Windows side and copy some text from the website.
    • I could reproduce on Google. I typed some text on the search bar in the website and copied the text.
    • When copying, use Ctrl+C and hit the key combination for 10 to 20 times as fast as you can

WSL logs:

weston.log before the crash

[04:34:55.967] read fd:127 12 (available 65536, mask 0x5)
[04:34:55.967] nothing happened, buffered the bytes
[04:34:55.967] read fd:127 0 (available 131060, mask 0x4)
[04:34:55.967] non-incr transfer read complete
[04:34:56.106] xfixes selection notify event: owner 2097153
[04:34:56.106] our window, skipping
[04:34:56.107] selection request, CLIPBOARD, target UTF8_STRING, property FCITX_X11_SEL_CLIPBOARD
[04:34:56.107]


RDP clipboard_data_source_send new (0x782208000b80:received data:fd 130) vs prev (0x782208000b80:received data:fd 126): outstanding RDP data request (client to server)

stderr.log after the crash

weston: ../libweston/backend-rdp/rdpclip.c:967: clipboard_data_source_write: Assertion `source->data_source_fd == fd' failed.
(EE)[04:28:19.011] <5>WSLGd: Run:110:  pid 14 terminated with signal 6, /usr/bin/sh -c /usr/bin/weston --backend=rdp-backend.so --modules=wslgd-notify.so --xwayland --socket=wayland-0 --shell=rdprail-shell.so --log=/mnt/wslg/weston.log --logger-scopes=log,rdp-backend,rdprail-shell failed to write to XWayland fd: Broken pipe

WSL dumps:

No response

Expected behavior:

No response

Actual behavior:

Weston will crash and the Linux GUI apps will stop running.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions