System freeze on importing file into flatpak

Description:

Whenever you try to import/upload a file into a flatpak application on gnome wayland, the entire system freeze. You cannot change TTY or wait for a crash. You're only option is to force shutdown This seems to come from xdg-portal since flatpaked electron app are unaffected. I've tested on three different GTK applications. Same result Another user reported the same issue on KDE wayland.

I would really like to help on profiling this of course, but as explained by seth on the forum linked below making a dump out of freeze system seems difficult. I don't know how to make this with QEMU either (if it is possible).

Additional info:

Steps to reproduce:

  1. make a fresh install with arch-install
  2. select linux-hardened and desktop profile (GNOME or KDE, with wayland)
  3. install a flatpak application that accept files (for example Avvie on Flathub)
  4. Import image or try to open an image with Avvie
  5. Result in system freeze