wslg: No windows show up after sometime (shared memory error)

Environment

Windows build number: 10.0.21376.0
Your Distribution version: Debian
Your WSLg version: 1.0.19

Steps to reproduce

WSL logs:

  • Attach WSLg logs from /mnt/wslg

You can access the wslg logs using explorer at: \\wsl$\<Distro-Name>\mnt\wslg (e.g.: \\wsl$\Ubuntu-20.04\mnt\wslg)

  • puseaudio.log
  • weston.log Following errors repeated.
[18:37:13.702] Client: ClientGetAppidReq: pid:6559 appId:Emacs
[18:37:13.711] rdp_allocate_shared_memory: Failed to open "/mnt/shared_memory/{eacbe204-2cb2-4a82-b70f-fbd4100b19bc}" with error: Input/output error
[18:37:13.837] selection request, CLIPBOARD, target TARGETS, property GDK_SELECTION
[18:37:13.867] selection request, CLIPBOARD, target TARGETS, property GDK_SELECTION
[18:37:13.876] rdp_allocate_shared_memory: Failed to open "/mnt/shared_memory/{eacbe204-2cb2-4a82-b70f-fbd4100b19bc}" with error: Input/output error
[18:37:13.883] selection request, CLIPBOARD, target TARGETS, property GDK_SELECTION
[18:37:13.908] selection request, CLIPBOARD, target TARGETS, property GDK_SELECTION
[18:37:13.916] selection request, CLIPBOARD, target TARGETS, property GDK_SELECTION
[18:37:13.927] rdp_allocate_shared_memory: Failed to open "/mnt/shared_memory/{eacbe204-2cb2-4a82-b70f-fbd4100b19bc}" with error: Input/output error
[18:37:13.928] selection request, CLIPBOARD, target TARGETS, property GDK_SELECTION
[18:37:13.952] rdp_allocate_shared_memory: Failed to open "/mnt/shared_memory/{eacbe204-2cb2-4a82-b70f-fbd4100b19bc}" with error: Input/output error
[18:37:13.959] selection request, CLIPBOARD, target TARGETS, property GDK_SELECTION
[18:37:13.978] rdp_allocate_shared_memory: Failed to open "/mnt/shared_memory/{eacbe204-2cb2-4a82-b70f-fbd4100b19bc}" with error: Input/output error
[18:37:13.985] selection request, CLIPBOARD, target TARGETS, property GDK_SELECTION
[18:37:13.995] selection request, CLIPBOARD, target TARGETS, property GDK_SELECTION
[18:37:14.004] rdp_allocate_shared_memory: Failed to open "/mnt/shared_memory/{eacbe204-2cb2-4a82-b70f-fbd4100b19bc}" with error: Input/output error
[18:37:14.006] selection request, CLIPBOARD, target TARGETS, property GDK_SELECTION
[18:37:14.029] rdp_allocate_shared_memory: Failed to open "/mnt/shared_memory/{eacbe204-2cb2-4a82-b70f-fbd4100b19bc}" with error: Input/output error
[18:37:14.055] rdp_allocate_shared_memory: Failed to open "/mnt/shared_memory/{eacbe204-2cb2-4a82-b70f-fbd4100b19bc}" with error: Input/output error
[18:37:14.529] rdp_allocate_shared_memory: Failed to open "/mnt/shared_memory/{eacbe204-2cb2-4a82-b70f-fbd4100b19bc}" with error: Input/output error

More problems. Sometime the popmenu on gtk app doesn’t show. And it has errors in weston.log.

[18:45:01.419] Client: ClientGetAppidReq: WindowId:0x369 does not have appId, or not top level window.
[18:45:02.189] Client: ClientGetAppidReq: WindowId:0x36a does not have appId, or not top level window.
[18:45:02.318] rdp_allocate_shared_memory: Failed to open "/mnt/shared_memory/{cae4d147-668f-47b0-8683-aca5dc79695f}" with error: Invalid argument
[18:45:02.345] rdp_allocate_shared_memory: Failed to open "/mnt/shared_memory/{cae4d147-668f-47b0-8683-aca5dc79695f}" with error: Invalid argument
[18:45:02.346] Client: ClientGetAppidReq: WindowId:0x36b does not have appId, or not top level window.
[18:45:02.371] rdp_allocate_shared_memory: Failed to open "/mnt/shared_memory/{cae4d147-668f-47b0-8683-aca5dc79695f}" with error: Invalid argument
[18:45:04.524] rdp_allocate_shared_memory: Failed to open "/mnt/shared_memory/{16482c69-d453-4ac5-9bfb-8959d2f244c8}" with error: Invalid argument
[18:45:04.553] Client: ClientGetAppidReq: WindowId:0x370 does not have appId, or not top level window.
[18:45:04.562] rdp_allocate_shared_memory: Failed to open "/mnt/shared_memory/{16482c69-d453-4ac5-9bfb-8959d2f244c8}" with error: Invalid argument
[18:45:06.223] rdp_allocate_shared_memory: Failed to open "/mnt/shared_memory/{08efd4d5-e2f7-405f-b866-66e43c11a1a1}" with error: Invalid argument
[18:45:06.234] Client: ClientGetAppidReq: WindowId:0x373 does not have appId, or not top level window.
[18:45:06.249] rdp_allocate_shared_memory: Failed to open "/mnt/shared_memory/{08efd4d5-e2f7-405f-b866-66e43c11a1a1}" with error: Invalid argument
[18:45:06.924] rdp_allocate_shared_memory: Failed to open "/mnt/shared_memory/{08efd4d5-e2f7-405f-b866-66e43c11a1a1}" with error: Invalid argument
[18:45:07.223] rdp_allocate_shared_memory: Failed to open "/mnt/shared_memory/{40cedf35-0e4f-46ff-84a5-37fb80669ca9}" with error: Invalid argument
[18:45:07.251] Client: ClientGetAppidReq: WindowId:0x374 does not have appId, or not top level window.
[18:45:07.261] rdp_allocate_shared_memory: Failed to open "/mnt/shared_memory/{40cedf35-0e4f-46ff-84a5-37fb80669ca9}" with error: Invalid argument
  • versions.txt
WSLg ( x86_64 ): 1.0.19+Branch.main.Sha.2a47bf20c239b523d7413f315cbc9ee60dfde831
Mariner: VERSION="1.0.20210224"
FreeRDP: 5f083fa0b97d433d6204985f6047886e29c1c61e
weston: 16de531f00aa3dfd17e0de74c8f49e9fd7cec617
pulseaudio: 2f0f0b8c3872780f15e275fc12899f4564f01bd5
mesa:

Expected behavior

Actual behavior

Window doesn’t render sometimes. It does after killing it and restarting it after a while.

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 9
  • Comments: 28 (9 by maintainers)

Most upvoted comments

I was just able to get apps working again without needing to shutdown wsl by remounting /mnt/shared_memory in the system container:

 wsl --system umount /mnt/shared_memory '&&' mount -t virtiofs wslg /mnt/shared_memory -o dax

umount wasn’t able to unmount shared_memory until I’d closed all the Linux app windows, but this got things working again.

Update: this appears to have put WSLg into RAIL mode instead of VAIL, identified by [WARN: COPY MODE] in the taskbar tooltips, but I was able to resolve that by killing both Weston and msrdc.exe.

Encountered similar issue, after going away for a while came back to hung gui window and errors in the weston.log:

[23:40:45.549] rdp_allocate_shared_memory: Failed to open "/mnt/shared_memory/{2f1c9d0c-3aca-45ed-8115-82d7caf9d874}" with error: Input/output error
[23:41:45.568] rdp_allocate_shared_memory: Failed to open "/mnt/shared_memory/{2f1c9d0c-3aca-45ed-8115-82d7caf9d874}" with error: Input/output error
[23:41:45.591] rdp_allocate_shared_memory: Failed to open "/mnt/shared_memory/{2f1c9d0c-3aca-45ed-8115-82d7caf9d874}" with error: Input/output error
[23:41:51.295] rdp_rail_wake_handler is called on peerCtx:0x55bb29acbe80
[23:41:51.297] rdp_allocate_shared_memory: Failed to open "/mnt/shared_memory/{2f1c9d0c-3aca-45ed-8115-82d7caf9d874}" with error: Input/output error
[23:41:51.494] rdp_allocate_shared_memory: Failed to open "/mnt/shared_memory/{2f1c9d0c-3aca-45ed-8115-82d7caf9d874}" with error: Input/output error

Killing the application and starting again instantly crashed it/didnt start the window, but the process itself didn’t exit:

[23:47:09.897] rdp_allocate_shared_memory: Failed to open "/mnt/shared_memory/{8f391ac5-c919-488e-b859-1daea3e837d9}" with error: Input/output error
[23:47:09.904] Client: ClientGetAppidReq: pid:3003 appId:Alacritty
[23:47:09.914] app_list_monitor_thread: loadIconEvent is signalled. Alacritty
[23:47:09.914] app_list_monitor_thread: entry 0x7f52c8012810, image (nil)
[23:47:09.915] rdp_allocate_shared_memory: Failed to open "/mnt/shared_memory/{8f391ac5-c919-488e-b859-1daea3e837d9}" with error: Input/output error
[23:47:09.921] !!!cursor role is added after creation - WindowId:0xa
[23:47:09.921] rdp_allocate_shared_memory: Failed to open "/mnt/shared_memory/{8f391ac5-c919-488e-b859-1daea3e837d9}" with error: Input/output error
[23:47:10.082] rdp_allocate_shared_memory: Failed to open "/mnt/shared_memory/{8f391ac5-c919-488e-b859-1daea3e837d9}" with error: Input/output error

The GUID changes every time the application is started unsuccessfully.

After doing wsl --terminate Debian wslg didn’t even start and only had stderr.log:

<3>WSLGd: Exception: Input/output error @../main.cpp:144 (main)

After wsl --shutdown it started working again (I had docker images running, but didn’t try to kill just those before --shutdown).

versions.txt:

WSLg ( x86_64 ): 1.0.24+Branch.main.Sha.b42023b5fed7567955f4c6c36123a5cf22e9292a
Mariner: VERSION="1.0.20210224"
FreeRDP: b05321cd4e6a862aef76163a69db4e1910245736
weston: ed4f3bbbf5efbd5bde880704bc03497f2446c3f2
pulseaudio: 2f0f0b8c3872780f15e275fc12899f4564f01bd5
mesa:

@ThaDaVos I didn’t try yet but you can enable WESTON_RDPRAIL_SHELL_ALLOW_ZAP which restarts weston compositor and Xwayland by pressing Left-Ctrl + Left-Alt + Backspace.