I have modified the “pass” utility to add additional “echo” statements in order to pinpoint exactly which call to xclip caused the issue, and sure enough, it happened again!
The offending call is “xclip -o -selection "clipboard"”, but I still cannot reproduce the issue reliably. I managed to stop gnome-shell from hogging resources by switching to another VT and entering “echo foo | xclip -in -selection clipboard”, but after switching back its VT, gnome-shell still wasn't usable (at all). I suspect it's a different bug specific to VT switching, though, has it has happened before with the gdm VT. Since then, I reproduced the issue once again, and running the same command from a SSH session without doing any VT-switching saved my gnome-shell session!
signature.asc
Description: PGP signature