Deletion errors for one user causing trash_files to fill up the disk

Nextcloud version (eg, 12.0.2):13.0.5
Operating system and version (eg, Ubuntu 17.04): Debian 8.11
Apache or nginx version (eg, Apache 2.4.25): 2.4.10
PHP version (eg, 7.1): 5.6.36

The issue you are facing:

Roughly since the update to 13.0.5, something has been going drastically wrong that’s causing one customer’s trash_files directory to rapidly fill up with copies of the same set of files. The supposed automatic trash cleaning subsystems fail to kick in and over the space of a few days the entire 1.5 terabyte disk fills up and causes everyone else to be unable to create any new files.

The nextcloud error log shows multiple instances of the error message pasted below. Communication with the customer indicates that these are not, in fact, files they’ve been working on any time recently and they have no idea why they’re being churned like this.

Is this the first time you’ve seen this error? (Y/N): Y

The output of your Nextcloud log in Admin > Logging:

	Aws\S3\Exception\S3Exception: Error executing "DeleteObjects" on "https://vvv-venlo-nextcloudmarketing.s3-eu01.systemeccloud.nl/?delete"; AWS HTTP error: Client error response [url] https://vvv-venlo-nextcloudmarketing.s3-eu01.systemeccloud.nl/?delete [status code] 400 [reason phrase] Bad Request MalformedXML (client): The XML you provided was not well-formed or did not validate against our published schema - <?xml version="1.0" encoding="UTF-8"?><Error><Code>MalformedXML</Code><Message>The XML you provided was not well-formed or did not validate against our published schema</Message><RequestId>a1ee3ddc-4208-1e88-ab76-a81e84fabe28</RequestId><HostId>jBOYsMoriXrEQly2Jz--aV9lNfHacr-qWFygp6aQQ7c</HostId></Error>

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'instanceid' => 'XXXXX',
  'passwordsalt' => 'XXXXXXX',
  'secret' => 'XXXXXXX',
  'trusted_domains' => 
  array (
    0 => 'my.nc.site'
  ),
  'datadirectory' => '/cloud',
  'overwrite.cli.url' => 'https://my.nc.site/',
  'dbtype' => 'pgsql',
  'version' => '13.0.5.2',
  'appstoreenabled' => false,
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/nextcloud-13/apps',
      'url' => '/apps',
      'writable' => true,
    ),
    1 => 
    array (
      'path' => '/var/www/nextcloud-13/apps_local',
      'url' => '/apps_local',
      'writable' => true,
    ),
  ),
  'memcached_servers' => 
  array (
    0 => 
    array (
      0 => 'localhost',
      1 => 11211,
    ),
  ),
  'filelocking.enabled' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'dbindex' => 0,
    'timeout' => 0,
  ),
  'dbname' => 'XXXXXX',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'XXXXX',
  'dbpassword' => '**SECRET**',
  'installed' => true,
  'mail_smtpmode' => 'sendmail',
  'mail_from_address' => 'support',
  'mail_domain' => 'XXXXX',
  'mail_smtpport' => '25',
  'ldapIgnoreNamingRules' => false,
  'loglevel' => 2,
  'maintenance' => false,
  'mail_smtphost' => '**CLASSIFIED**,
  'trashbin_retention_obligation' => 'auto,3',
  'updatechecker' => false,
  'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
  'theme' => '',
  'updater.secret' => '**CLASSIFIED**',
);

The output of your Apache/nginx/system log in /var/log/____:

(Nothing relevant)

Did you try on NC 13.0.6 if it was fixed? I haven’t seen something on the changelogs, perhaps it was repaired by accident. If not, please report directly to the bug tracker on github.com/nextcloud/server/issues