Exception during occ files:scan

While scanning one of the users an exception is thrown. Is this a bug I should report and/or is this something serious?

/var/www/html $ ./occ files:scan roland
Starting scan for user 1 out of 1 (roland)
Exception during scan: An exception occurred while executing a query: SQLSTATE[25P02]: In failed sql transaction: 7 ERROR:  current transaction is aborted, commands ignored until end of transaction block
#0 /var/www/html/3rdparty/doctrine/dbal/src/Connection.php(1728): Doctrine\DBAL\Driver\API\PostgreSQL\ExceptionConverter->convert(Object(Doctrine\DBAL\Driver\PDO\Exception), Object(Doctrine\DBAL\Query))
#1 /var/www/html/3rdparty/doctrine/dbal/src/Connection.php(1667): Doctrine\DBAL\Connection->handleDriverException(Object(Doctrine\DBAL\Driver\PDO\Exception), Object(Doctrine\DBAL\Query))
#2 /var/www/html/3rdparty/doctrine/dbal/src/Connection.php(1040): Doctrine\DBAL\Connection->convertExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDO\Exception), 'SELECT "filecac...', Array, Array)
#3 /var/www/html/lib/private/DB/Connection.php(226): Doctrine\DBAL\Connection->executeQuery('SELECT "filecac...', Array, Array, NULL)
#4 /var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(210): OC\DB\Connection->executeQuery('SELECT "filecac...', Array, Array)
#5 /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php(287): Doctrine\DBAL\Query\QueryBuilder->execute()
#6 /var/www/html/lib/private/Files/Cache/Cache.php(162): OC\DB\QueryBuilder\QueryBuilder->execute()
#7 /var/www/html/lib/private/Files/Cache/HomeCache.php(86): OC\Files\Cache\Cache->get('2020-08-27')
#8 /var/www/html/lib/private/Files/Cache/Cache.php(536): OC\Files\Cache\HomeCache->get('2020-08-27')
#9 /var/www/html/lib/private/Files/Cache/Scanner.php(274): OC\Files\Cache\Cache->remove('2020-08-27')
#10 /var/www/html/lib/private/Files/Cache/Scanner.php(465): OC\Files\Cache\Scanner->removeFromCache('2020-08-27')
#11 /var/www/html/lib/private/Files/Cache/Scanner.php(389): OC\Files\Cache\Scanner->handleChildren('', true, 3, 5, true, 0)
#12 /var/www/html/lib/private/Files/Cache/Scanner.php(341): OC\Files\Cache\Scanner->scanChildren('', true, 3, 5, true)
#13 /var/www/html/lib/private/Files/Utils/Scanner.php(260): OC\Files\Cache\Scanner->scan('', true, 3)
#14 /var/www/html/apps/files/lib/Command/Scan.php(158): OC\Files\Utils\Scanner->scan('/roland', true, NULL)
#15 /var/www/html/apps/files/lib/Command/Scan.php(214): OCA\Files\Command\Scan->scanFiles('roland', '/roland', Object(Symfony\Component\Console\Output\ConsoleOutput), false, true, false)
#16 /var/www/html/3rdparty/symfony/console/Command/Command.php(255): OCA\Files\Command\Scan->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /var/www/html/core/Command/Base.php(169): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /var/www/html/3rdparty/symfony/console/Application.php(1009): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /var/www/html/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Files\Command\Scan), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /var/www/html/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /var/www/html/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 /var/www/html/console.php(100): OC\Console\Application->run()
#23 /var/www/html/occ(11): require_once('/var/www/html/c...')
#24 {main}
+---------+-------+--------------+
| Folders | Files | Elapsed time |
+---------+-------+--------------+
| 1       | 0     | 00:00:00     |
+---------+-------+--------------+
/var/www/html $ ./occ files:recommendations:recommend roland

In ExceptionConverter.php line 83:
                                                                                                                                                          
  An exception occurred while executing a query: SQLSTATE[XX000]: Internal error: 7 ERROR:  could not find left sibling of block 892 in index "fs_mtime"  
                                                                                                                                                          

In Exception.php line 26:
                                                                                                           
  SQLSTATE[XX000]: Internal error: 7 ERROR:  could not find left sibling of block 892 in index "fs_mtime"  
                                                                                                           

In Statement.php line 82:
                                                                                                           
  SQLSTATE[XX000]: Internal error: 7 ERROR:  could not find left sibling of block 892 in index "fs_mtime"  
                                                                                                           

files:recommendations:recommend <uid> [<max>]

Nextcloud version (eg, 20.0.5): 21.0.1
Operating system and version (eg, Ubuntu 20.04): docker fpm-alpine
Apache or nginx version (eg, Apache 2.4.25): caddy / NA
PHP version (eg, 7.4): 7.4.16

The issue you are facing:

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

Steps to replicate it:

  1. run ./occ files:scan [user]

The output of your Nextcloud log in Admin > Logging:

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

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'filelocking.enabled' => true,
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'redis',
    'password' => '',
    'port' => 6379,
  ),
  'instanceid' => 'xxx',
  'passwordsalt' => '+xxx',
  'secret' => 'xxx',
  'trusted_domains' => 
  array (
    0 => '192.168.1.56:8080',
    1 => 'nextcloud.xxx',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'pgsql',
  'version' => '21.0.1.1',
  'overwrite.cli.url' => 'http://192.168.1.56:8080',
  'dbname' => 'nextcloud',
  'dbhost' => 'db',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'oc_roland',
  'dbpassword' => 'xxxx',
  'default_phone_region' => 'NL',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'tls',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'xxx',
  'mail_domain' => 'xxx',
  'mail_smtpauthtype' => 'PLAIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'xxx',
  'mail_smtpport' => '587',
  'mail_smtpname' => 'xxx',
  'mail_smtppassword' => 'xxx',
  'maintenance' => false,
  'trashbin_retention_obligation' => '30, auto',
  'versions_retention_obligation' => '30, auto',
  'loglevel' => 2,
  'app_install_overwrite' => 
  array (
    0 => 'bruteforcesettings',
  ),
  'data-fingerprint' => 'xxx',
);

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

N/A
2 Likes