fix clipboard race condition ends up as assertion failure #54
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is to address the race condition issue when Windows client responded failure on clipboard request from WSLg. The investigation is done in context of microsoft/wslg#609 and the core dump provided by @edburns.
#0 0x00007fb5f23ae115 in raise () from /lib/libc.so.6
#1 0x00007fb5f239861e in abort () from /lib/libc.so.6
#2 0x00007fb5f2398429 in __assert_fail_base.cold () from /lib/libc.so.6
#3 0x00007fb5f23a6806 in __assert_fail () from /lib/libc.so.6
#4 0x00007fb5f15ccf4c in clipboard_data_source_cancel (base=0x7fb5cc0011a0) at ../libweston/backend-rdp/rdpclip.c:1141
#5 0x00007fb5f23460d8 in weston_seat_set_selection (seat=0x55a956c01b80, source=0x7fb5cc000f50, serial=15342)
at ../libweston/data-device.c:1149
#6 0x00007fb5f15cd25e in clipboard_data_source_publish (fd=51, mask=1, arg=0x7fb5cc000f50)
at ../libweston/backend-rdp/rdpclip.c:1199
#7 0x00007fb5f2302c1a in wl_event_loop_dispatch (loop=0x55a95688d790, timeout=timeout@entry=-1)
at src/event-loop.c:1050
#8 0x00007fb5f23010e5 in wl_display_run (display=0x55a95688da10) at src/wayland-server.c:1351
#9 0x00007fb5f254c613 in wet_main (argc=1, argv=0x7ffefbe12188) at ../compositor/main.c:3438
#10 0x000055a954abb159 in main (argc=7, argv=0x7ffefbe12188) at ../compositor/executable.c:33