When gnome-remote-desktop casts a session, gnome-shell segfaults. The crashing instruction is in NVIDIA’s runtime-generated GL code (/memfd:/.glXXXXXX). The next frames are in the /dev/nvidiactl mapping and then in mutter-screen-cast-memfd, which is the GL readback into the shared-memory screen-cast buffer. Every crash happens at the same page offsets. It’s intermittent and it’s the same on driver 610.57.04. It mainly hits the headless GDM remote-login greeter, but it has also crashed the logged-in user session. KMS capture (Sunshine) on the same machine works fine.
Bug report bundle is attached.
nvidia-bug-report.log.gz (575.0 KB)
For anyone who finds this thread: the crash happens inside the NVIDIA driver, but the cause is a buffer overrun in mutter.
When the remote-desktop virtual monitor uses a fractional scale (e.g. a Windows Remote Desktop client at 150 %), mutter 50.x’s screen cast reads back one more column and row than the shared-memory buffer holds: 2560x1600 at 1.5 becomes a 2561x1601 glReadPixels into a 2560x1600 buffer. NVIDIA’s runtime-generated GL code writes past the end of the buffer and segfaults. That matches the memfd:/.glXXXXXX frame and the mutter-screen-cast-memfd mapping in the original post. Mesa usually survives the same overrun, which explains why the headless session works on an iGPU. KMS capture (Sunshine) uses a different path.
Upstream:
Until your distribution ships a fixed mutter, the options are mutter 51 where available, or running the headless session on Mesa if the machine has another GPU.