I guess it’s not typical use-case.
When emptying trash ( through Nemo, not through trash-applet so not the same as Trash applets : freezes whole desktop while emptying? ) all desktop becomes unresponsive and ends up by logging out.
Before it logs out, the deletion process had no effect on some running applications : I could still use Firefox or Thunderbird for example. But panels and desktop were totally frozen.
I said not typical use-case because I had something like ten thousands .png files ( thumbnails ) in the trash so I expected some slow down eventually but not the session logout ! Those thumbnails were not « in use » though.
What else ? Those files sit on a partition of an SSD disk, if of any interest, in the root of /home/$USER.
Any settings or attentions to care when deleting thousands of files ? A kind of buffer ?
I got a freeze a couple of hours ago that might be parallel to this.
I was doing a big search on image files (basically png and svg) in /usr/share or something, the search listed many files (lots of themes installed), but I believe there were too many thumbnails to handle or something. My session crashed to gdm after a while. And at next login budgie-wm was incriminated by the bug report as the culprit.
Given all the observations above that involve hundreds and hundreds of files this is most likely a bug with nemo where it isn’t releasing file handles correctly during trash cleanup.
There is only a finite number of file handles that can be created and if you exhaust this number the rest of the user session will not be able itself to create and release file handles for it’s normal usage. Hence the observation of freezes and budgie-wm reports.
Suggest look upstream https://github.com/linuxmint/nemo for any outstanding issues in this area … create a new issue if you don’t see your trash cleanup issues.