gvfs-trash hogs resources

Summary

https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/1558768 https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/1798828

Ubuntu LTS 16.04.6

118K files in trash gvfs-trash consumes both CPUs and 100% of available memory

"empty trash" goes into prepare phase, but nothing appears to happen, presumably because of the large number of files, so I closed the window by clicking the

rm -rf ~/.local/share/Trash/*

nautilus window on trash:/// goes dark for a long time, but eventually comes back to show Trash to be empty

opening the Trash icon (on the on the launch bar) shows it to be empty and both and buttons are greyed out, but the Trash icon still shows 'filled'

Steps to reproduce

have a lot of files in trash

Example Project

N/A

What is the current bug behavior?

system chokes

What is the expected correct behavior?#1790249

do not use more than one (1) cpu do not use 100% of memory

Relevant logs and/or screenshots

N/A

Output of checks

N/A

Results of GitLab environment info

N/A

Results of GitLab application Check

N/A

Possible fixes

N/A

Assignee Loading
Time tracking Loading