wslg icon indicating copy to clipboard operation
wslg copied to clipboard

Copy and paste on CLion running in wslg crashes the ap completely

Open rcosnita opened this issue 4 years ago • 16 comments

Environment

Windows build number: Version 10.0.22000.348
Your Distribution version: Ubuntu-20.04
Your WSLg version: 1.0.26

Steps to reproduce

This issue reproduces after a period of time running the Jetbrains CLion app (or any other Java based UI app for that matter). Mainly, once I try to copy and paste things the app crashes immediately.

stderr.log

WSL logs:

pulseaudio.log weston.log

Versions.txt contains the following content:

WSLg ( x86_64 ): 1.0.26+Branch.main.Sha.26ce2c09b86442f3c7f4f6462f770ed2afa76a25
Mariner: VERSION="1.0.20210224"
FreeRDP: b05321cd4e6a862aef76163a69db4e1910245736
weston: 46756d0e77e5c01b5995fbbee6f3ab0db9b30612
pulseaudio: 2f0f0b8c3872780f15e275fc12899f4564f01bd5
mesa:

Expected behavior

No crash should occur and copy / paste must work as expected.

Actual behavior

The application crashes and the following log entries appear in the error log:

Errors from xkbcomp are not fatal to the X server
weston: ../libweston/backend-rdp/rdpclip.c:1189: clipboard_data_source_request: Assertion `peerCtx->clipboard_data_request_event_source' failed.
<4>WSLGd: /usr/bin/weston terminated with signal 6.
(EE) failed to read Wayland events: Broken pipe
<4>WSLGd: /mnt/c/Windows/System32/mstsc.exe exited with status 0.
/usr/share/icons/hicolor/scalable/apps/ibus-setup.svg: unrecognized file header 0x3c 0x3f 0x78 0x6d
glamor: 'wl_drm' not supported
Missing Wayland requirements for glamor GBM backend
Failed to initialize glamor, falling back to sw
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Internal error:   Could not resolve keysym XF86FullScreen
Errors from xkbcomp are not fatal to the X server
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported maximum keycode 569, clipping.
>                   X11 cannot support keycodes above 255.
> Internal error:   Could not resolve keysym XF86FullScreen
Errors from xkbcomp are not fatal to the X server

rcosnita avatar Nov 28 '21 16:11 rcosnita

FYI: I have just applied https://digitalfortress.tech/debug/what-should-you-do-when-ubuntu-freezes/. Maybe it fixes the issue.

rcosnita avatar Nov 28 '21 16:11 rcosnita

I have just tried to apply the fix mentioned in the above link but the problem still occurs.

rcosnita avatar Nov 29 '21 04:11 rcosnita

@rcosnita, thanks for trying out WSLg. It looks you are on older WSLg build, would you please upgrade by installing WSL from Store app (from https://www.microsoft.com/en-us/p/windows-subsystem-for-linux-preview/9p9tqf7mrm4r) ? While there are some fixes aren't included in this release, but this release has several key fixes, so it might be worth to try out, thanks!

hideyukn88 avatar Jan 05 '22 00:01 hideyukn88

After opening the issue I migrated to the latest WSLg version from app store:

C:\Users\raduc>wsl --status Default Distribution: Ubuntu-20.04 Default Version: 2 WSL version: 0.50.2.0 Kernel version: 5.10.74.3 WSLg version: 1.0.29 Windows version: 10.0.22000.376

The problem is still occuring but at a slower pace. Not sure if this is related to the Ubuntu version or is a more general problem.

rcosnita avatar Jan 05 '22 16:01 rcosnita

Issue also exists in other IDEA IDEs Microsoft Windows NT 10.0.22000.0 Ubuntu 20.04 WSLg 1.0.26 Kernel 5.10.60.1

pulseaudio.log stderr.log weston.log

rfhold avatar Feb 24 '22 16:02 rfhold

With WSLg version 1.0.30 the issue still persist but it occurs rarely (maybe once per day). In the previous versions I was hitting this bug once every two - three hours.

rcosnita avatar Feb 26 '22 08:02 rcosnita

@rcosnita, thanks for update. Do you see any core file created under /mnt/wslg/dumps? if so please share with us, thanks!

hideyukn88 avatar Feb 28 '22 17:02 hideyukn88

Not yet. As soon as I manage to reproduce the issue again I will attach the resulting core file.

rcosnita avatar Mar 02 '22 13:03 rcosnita

Here is the core dump resulting from WebStorm crashing.

core.zip

Here is the result of wsl status:

C:\Users\raduc>wsl --status
Default Distribution: Ubuntu-20.04
Default Version: 2
WSL version: 0.51.3.0
Kernel version: 5.10.93.2
WSLg version: 1.0.30
Windows version: 10.0.22000.527

rcosnita avatar Mar 04 '22 08:03 rcosnita

I managed to reproduce the issue again so I'm attaching the new core dump collected. core.zip

rcosnita avatar Mar 05 '22 10:03 rcosnita

@rcosnita, thanks for dump.

#0 0x00007fe197408115 in raise () from /lib/libc.so.6 #1 0x00007fe1973f2555 in abort () from /lib/libc.so.6 #2 0x00007fe1973f2429 in __assert_fail_base.cold () from /lib/libc.so.6 #3 0x00007fe197400806 in __assert_fail () from /lib/libc.so.6 #4 0x00007fe19663c929 in clipboard_client_format_list (context=, formatList=) at ../libweston/backend-rdp/rdpclip.c:1581 #5 0x00007fe196462355 in cliprdr_server_receive_format_list (header=, header=, s=0x55a8639d62e0, context=0x55a8639e5d90) at /work/vendor/FreeRDP/channels/cliprdr/server/cliprdr_main.c:620 #6 cliprdr_server_receive_pdu (header=, s=0x55a8639d62e0, context=0x55a8639e5d90) at /work/vendor/FreeRDP/channels/cliprdr/server/cliprdr_main.c:858 #7 cliprdr_server_read (context=0x55a8639e5d90) at /work/vendor/FreeRDP/channels/cliprdr/server/cliprdr_main.c:1082 #8 cliprdr_server_check_event_handle (context=0x55a8639e5d90) at /work/vendor/FreeRDP/channels/cliprdr/server/cliprdr_main.c:1349 #9 0x00007fe19645f65e in cliprdr_server_thread (arg=0x55a8639e5d90) at /work/vendor/FreeRDP/channels/cliprdr/server/cliprdr_main.c:1192 #10 0x00007fe19638ea1c in thread_launcher (arg=0x55a8639d07e0) at /work/vendor/FreeRDP/winpr/libwinpr/thread/thread.c:316 #11 0x00007fe1972d209a in start_thread () from /lib/libpthread.so.0 #12 0x00007fe1974cb833 in clone () from /lib/libc.so.6

$1 = {base = {resource = 0x0, destroy_signal = {listener_list = {prev = 0x55a8639bfcc8, next = 0x55a863f3fb50}}, mime_types = {size = 24, alloc = 32, data = 0x7fe164000f10}, offer = 0x55a863f3fb40, seat = 0x0, accepted = false, actions_set = false, set_selection = true, dnd_actions = 0, current_dnd_action = WL_DATA_DEVICE_MANAGER_DND_ACTION_NONE, compositor_action = WL_DATA_DEVICE_MANAGER_DND_ACTION_NONE, accept = 0x7fe19663a4b0 <clipboard_data_source_accept>, send = 0x7fe19663cf90 <clipboard_data_source_send>, cancel = 0x7fe19663ca60 <clipboard_data_source_cancel>}, transfer_event_source = 0x0, defer_event_source = 0x0, data_contents = {size = 0, alloc = 0, data = 0x0}, context = 0x55a863690810, refcount = 2, data_source_fd = 106, format_index = 4, state = RDP_CLIPBOARD_SOURCE_FAILED, data_response_fail_count = 0, inflight_write_count = 0, inflight_data_to_write = 0x0, inflight_data_size = 0, is_data_processed = 0, is_canceled = 0, client_format_id_table = {13, 1, 0, 0, 49379}}

hideyukn88 avatar Mar 11 '22 19:03 hideyukn88

  • This seems to happen in WSLg <= 1.0.45. It is resolved in WSLg >= 1.0.47. I identified this as a resolved issue at https://youtrack.jetbrains.com/issue/TBX-8605.

linghengqian avatar Dec 12 '22 08:12 linghengqian

does not work for me on IDEA (and Eclipse) WLS 2.0.4 wlsg 1.0.58 is this a java issue?

rusefillc avatar Oct 06 '23 00:10 rusefillc

I have the same problem running Clion (and other JetBrains IDEs) on Ubuntu. After a long coding session, it eventually crashes the entire window manager upon a copy/paste and kicks me back to the console. I have had to stop using it and move to using VSCode which is a bummer.

Wielding avatar Jan 29 '24 17:01 Wielding

I am also having the same issue. on WSL version: 2.1.5.0. Ubuntun. RubyMine 2024.1.2. When I use 'p/P' with ideaVim the IDE crashes

hsuh avatar Jun 10 '24 11:06 hsuh

Just for kicks. I use PyCharm in WSL2. I had a functional Ubuntu 20.04 that did not crash. I installed 24.04 and crashes when I use 'p'. So I tried Debian 12. Same problem. I had previously reported this issue to Jetbrains with Ubuntu 22.04 on a different machine.

jhare-rectangle avatar Aug 27 '24 13:08 jhare-rectangle

Crashes observed when doing y/p (yank/paste) on IntelliJ/IdeaVim with

WSL version: 2.3.24.0 Kernel version: 5.15.153.1-2 WSLg version: 1.0.65 MSRDC version: 1.2.5620 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.26100.1-240331-1435.ge-release Windows version: 10.0.19045.5011

WSL distro: Ubuntu 24.04.1 LTS

sbj0 avatar Oct 28 '24 13:10 sbj0

I have the same issue

uname -a Linux OPTCN7181 5.15.153.1-microsoft-standard-WSL2 #1 SMP Fri Mar 29 23:14:13 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

PS C:\Users\me> wsl --version WSL-Version: 2.3.24.0 Kernelversion: 5.15.153.1-2 WSLg-Version: 1.0.65 MSRDC-Version: 1.2.5620 Direct3D-Version: 1.611.1-81528511 DXCore-Version: 10.0.26100.1-240331-1435.ge-release Windows-Version: 10.0.19045.5011 PS C:\Users\me>

cubimon avatar Nov 12 '24 15:11 cubimon

Setting set clipboard=+unnamed in ~/.ideavimrc would be a workaround

cubimon avatar Nov 13 '24 07:11 cubimon

Throughout the experience of this bug, I had set clipboard+=unnamed in my .ideavimrc file. But I also had set clipboard+=ideaput. I don't have the setup any more to test if removing the second one resolves the issue.

jhare-rectangle avatar Nov 13 '24 14:11 jhare-rectangle

Thank you both for sharing these suggestions.

It runs successfully (tested with 1'000+ put operations) on my system with any of

set clipboard=unnamed set clipboard=unnamedplus set clipboard+=unnamedplus

It crashes (after ~10 put operations or fewer) with any of

set clipboard+=unnamed << empty .ideavimrc >>

sbj0 avatar Nov 13 '24 21:11 sbj0