Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception during scan #9462

Closed
Tas-sos opened this issue May 11, 2018 · 7 comments
Closed

Exception during scan #9462

Tas-sos opened this issue May 11, 2018 · 7 comments

Comments

@Tas-sos
Copy link

Tas-sos commented May 11, 2018

After updating from version 13.0.2 to the latest 13.0.2, I execute the following command:
sudo -u www-data php console.php files:scan --all

while for all users, the process went smoothly, to my user (where is the most active), i got the following Exception during scan :

sudo -u www-data php console.php files:scan --all

Scanning files for 12 users
Starting scan for user 1 out of 12 (User1)
Starting scan for user 2 out of 12 (User2)
Starting scan for user 3 out of 12 (User3)
Starting scan for user 4 out of 12 (User4)
Starting scan for user 5 out of 12 (User5)
Starting scan for user 6 out of 12 (User6)
Starting scan for user 7 out of 12 (User7)
Starting scan for user 8 out of 12 (User8)
Starting scan for user 9 out of 12 (User9)
Starting scan for user 10 out of 12 (Tassos)
Exception during scan: "files/f7bb502511a4e01b563a85f673b1735c" is locked
#0 /var/www/nextcloud/lib/private/Files/Storage/Common.php(709): OC\Lock\DBLockingProvider->acquireLock('files/f7bb50251...', 2)
#1 /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(592): OC\Files\Storage\Common->acquireLock('scanner::', 2, Object(OC\Lock\DBLockingProvider))
#2 /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(592): OC\Files\Storage\Wrapper\Wrapper->acquireLock('scanner::', 2, Object(OC\Lock\DBLockingProvider))
#3 /var/www/nextcloud/lib/private/Files/Cache/Scanner.php(331): OC\Files\Storage\Wrapper\Wrapper->acquireLock('scanner::', 2, Object(OC\Lock\DBLockingProvider))
#4 /var/www/nextcloud/lib/private/Files/Utils/Scanner.php(244): OC\Files\Cache\Scanner->scan('', true, 3)
#5 /var/www/nextcloud/apps/files/lib/Command/Scan.php(161): OC\Files\Utils\Scanner->scan('/Tassos')
#6 /var/www/nextcloud/apps/files/lib/Command/Scan.php(234): OCA\Files\Command\Scan->scanFiles('Tassos', '/Tassos', false, Object(Symfony\Component\Console\Output\ConsoleOutput), false)
#7 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(264): OCA\Files\Command\Scan->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /var/www/nextcloud/core/Command/Base.php(161): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/nextcloud/3rdparty/symfony/console/Application.php(874): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/nextcloud/3rdparty/symfony/console/Application.php(228): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Files\Command\Scan), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /var/www/nextcloud/3rdparty/symfony/console/Application.php(130): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /var/www/nextcloud/lib/private/Console/Application.php(173): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /var/www/nextcloud/console.php(90): OC\Console\Application->run()
#14 {main}
Starting scan for user 11 out of 12 (User10)
Starting scan for user 12 out of 12 (User11)

Server configuration

Operating system:
Ubuntu server 16.04.4 LTS

Web server:
Apache/2.4.18 (Ubuntu)

Database:
mysql Ver 15.1 Distrib 10.0.34-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

PHP version:

HP 7.0.28-0ubuntu0.16.04.1 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.28-0ubuntu0.16.04.1, Copyright (c) 1999-2017, by Zend Technologies

Nextcloud version:
Nextcloud 13.0.2

Updated from an older Nextcloud/ownCloud or fresh install:
Nextcloud 13.0.1

Where did you install Nextcloud from:

Signing status:

Signing status
No errors have been found.

List of activated apps:

App list
Enabled:
  - activity: 2.6.1
  - admin_audit: 1.3.0
  - admin_notifications: 1.0.1
  - bruteforcesettings: 1.0.3
  - checksum: 0.4.0
  - comments: 1.3.0
  - dav: 1.4.6
  - deck: 0.3.1
  - federatedfilesharing: 1.3.1
  - federation: 1.3.0
  - files: 1.8.0
  - files_external: 1.4.1
  - files_markdown: 2.0.4
  - files_pdfviewer: 1.2.1
  - files_rightclick: 0.8.4
  - files_sharing: 1.5.0
  - files_texteditor: 2.5.1
  - files_trashbin: 1.3.0
  - files_versions: 1.6.0
  - files_videoplayer: 1.2.0
  - firstrunwizard: 2.2.1
  - gallery: 18.0.0
  - logreader: 2.0.0
  - lookup_server_connector: 1.1.0
  - nextcloud_announcements: 1.2.0
  - notifications: 2.1.2
  - oauth2: 1.1.0
  - passman: 2.1.4
  - password_policy: 1.3.0
  - provisioning_api: 1.3.0
  - quota_warning: 1.2.0
  - serverinfo: 1.3.0
  - sharebymail: 1.3.0
  - spreed: 3.2.0
  - survey_client: 1.1.0
  - systemtags: 1.3.0
  - theming: 1.4.1
  - twofactor_backupcodes: 1.2.3
  - updatenotification: 1.3.0
  - workflowengine: 1.3.0
Disabled:
  - encryption
  - user_external
  - user_ldap

Nextcloud configuration:

Config report
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "cloud.g-lts.info"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/cloud.g-lts.info",
        "dbtype": "mysql",
        "version": "13.0.2.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "mail_smtpmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "ssl",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "maintenance": false,
        "theme": "",
        "loglevel": 2,
        "updater.secret": "***REMOVED SENSITIVE VALUE***"
    }
}

@MorrisJobke
Copy link
Member

We improved the lock handling in the upcoming 13.0.3:

#9566, #9391 and #9389

Please try again with this release and report if this still is a problem on 13.0.3

Thanks.

@benedikt-buchert
Copy link

benedikt-buchert commented Jun 8, 2018

Just updated to 13.0.3 and still running into this issue with an external smb mount: Exception during scan:

Exception during scan: "files/654f4a05ab41de4809b18ff209c83f17" is locked
#0 /usr/share/webapps/nextcloud/lib/private/Files/Storage/Common.php(709): OC\Lock\DBLockingProvider->acquireLock('files/654f4a05a...', 2)
#1 /usr/share/webapps/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(592): OC\Files\Storage\Common->acquireLock('scanner::', 2, Object(OC\Lock\DBLockingProvider))
#2 /usr/share/webapps/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(592): OC\Files\Storage\Wrapper\Wrapper->acquireLock('scanner::', 2, Object(OC\Lock\DBLockingProvider))
#3 /usr/share/webapps/nextcloud/lib/private/Files/Cache/Scanner.php(331): OC\Files\Storage\Wrapper\Wrapper->acquireLock('scanner::', 2, Object(OC\Lock\DBLockingProvider))
#4 /usr/share/webapps/nextcloud/lib/private/Files/Utils/Scanner.php(244): OC\Files\Cache\Scanner->scan('', true, 3)
#5 /usr/share/webapps/nextcloud/apps/files/lib/Command/Scan.php(161): OC\Files\Utils\Scanner->scan('/admin/files/Po...')
#6 /usr/share/webapps/nextcloud/apps/files/lib/Command/Scan.php(234): OCA\Files\Command\Scan->scanFiles('admin', '/admin/files/Po...', false, Object(Symfony\Component\Console\Output\ConsoleOutput), false)
#7 /usr/share/webapps/nextcloud/3rdparty/symfony/console/Command/Command.php(264): OCA\Files\Command\Scan->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /usr/share/webapps/nextcloud/core/Command/Base.php(161): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /usr/share/webapps/nextcloud/3rdparty/symfony/console/Application.php(874): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /usr/share/webapps/nextcloud/3rdparty/symfony/console/Application.php(228): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Files\Command\Scan), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /usr/share/webapps/nextcloud/3rdparty/symfony/console/Application.php(130): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /usr/share/webapps/nextcloud/lib/private/Console/Application.php(173): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /usr/share/webapps/nextcloud/console.php(90): OC\Console\Application->run()
#14 /usr/share/webapps/nextcloud/occ(11): require_once('/usr/share/weba...')
#15 {main}

@MorrisJobke MorrisJobke reopened this Jun 8, 2018
@MorrisJobke
Copy link
Member

@icewind1991 any idea?

@adamoell
Copy link

adamoell commented Jul 8, 2018

I experienced this after a power cut during a scan operation. What fixed it for me was clearing the memcache - as I am using redis, this involved running (as root):
redis-cli FLUSHALL
Worth a try...

@ChristophWurst
Copy link
Member

I'm closing this ticket because it hasn't received any updates in a long time. If this is still relevant, feel free to re-open or file a new ticket.

Thank you.

@fvenegaszeke
Copy link

fvenegaszeke commented Oct 2, 2019

I experienced this after a power cut during a scan operation. What fixed it for me was clearing the memcache - as I am using redis, this involved running (as root):
redis-cli FLUSHALL
Worth a try...

This worked
Pc shutdown in mid scan and the error showed up, doing redis-cli FLUSHALL fixed it

@dev-brothers-bg
Copy link

what helped me was disabling file locking temporary and running file scan again:
config/config.php>>
'filelocking.enabled' => false,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants