Skip to content

OCA\DAV\Connector\Sabre\Exception\FileLocked - Redis race condition #9001

@asengineeringsupport

Description

@asengineeringsupport

Steps to reproduce

  1. Install and configure Redis
  2. Upload a bigger file for longer than 1 hour.

Expected behaviour

When the upload finishes (monitoring the last seconds) the file should appear on filesystem and in webinterface.

Actual behaviour

The last Bytes are transmitting and then appears the "locked" message in Webbrower. The message
OCA\DAV\Connector\Sabre\Exception\FileLocked will be logged in Adminpage. It happens when somebody uses a not so fast Internetconnection and is uploading for longer than one hour (f.e. 3GB, over 5 MBit/s, over 70-80 minutes), but somebody who is able to upload 4.5 GB in 12 minutes has success.

Server configuration

Operating system: Ubuntu 16.04.4 LTS

Web server: apache2 (2.4.18-2ubuntu3.5)

Database:

PHP version: php7.0 7.0.28-0ubuntu0.16.04.1 [1.290 B]

Nextcloud version: 12.0.3, 12.0.6 (actually), 13.0.0

Updated from an older Nextcloud/ownCloud or fresh install: First 12.0.3 than updated over Adminpage.

Where did you install Nextcloud from: Ubuntu repository

Signing status:

Signing status
Fatal webdav OCA\DAV\Connector\Sabre\Exception\FileLocked: "xxxx_GmbH/to_xxx_xxx/Autocad 2010.nrg" is locked0./var/www/html/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php - line 151:  OCA\DAV\Connector\Sabre\File->put(Resource id #20)
1./var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 1096:  OCA\DAV\Connector\Sabre\Directory->createFile('Autocad 2010.nr...', Resource id #20)
2./var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 525:  Sabre\DAV\Server->createFile('xxxx_GmbH/to_xx...', Resource id #20, NULL)
3.[internal function] Sabre\DAV\CorePlugin->httpPut(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
4./var/www/html/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105:  call_user_func_array(Array, Array)
5./var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 479:  Sabre\Event\EventEmitter->emit('method PUT', Array)
6./var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254:  Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
7./var/www/html/nextcloud/apps/dav/appinfo/v1/webdav.php - line 76:  Sabre\DAV\Server->exec()
8./var/www/html/nextcloud/remote.php - line 164:  require_once('/var/www/html/n...')
9.{main}
 

List of activated apps:

App list
Enabled:
  - activity: 2.5.2
  - admin_audit: 1.2.0
  - bruteforcesettings: 1.0.3
  - checksum: 0.3.5
  - comments: 1.2.0
  - dav: 1.3.1
  - federatedfilesharing: 1.2.0
  - federation: 1.2.0
  - files: 1.7.2
  - files_accesscontrol: 1.2.5
  - files_pdfviewer: 1.1.1
  - files_sharing: 1.4.0
  - files_texteditor: 2.4.1
  - files_trashbin: 1.2.0
  - files_versions: 1.5.0
  - files_videoplayer: 1.1.0
  - firstrunwizard: 2.1
  - gallery: 17.0.0
  - groupfolders: 1.2.0
  - logreader: 2.0.0
  - lookup_server_connector: 1.0.0
  - nextcloud_announcements: 1.1
  - notifications: 2.0.0
  - oauth2: 1.0.5
  - password_policy: 1.2.2
  - provisioning_api: 1.2.0
  - quota_warning: 1.1.1
  - serverinfo: 1.2.0
  - sharebymail: 1.2.0
  - survey_client: 1.0.0
  - systemtags: 1.2.0
  - theming: 1.3.0
  - twofactor_backupcodes: 1.1.1
  - updatenotification: 1.2.0
  - user_ldap: 1.2.1
  - workflowengine: 1.2.0
Disabled:
  - encryption
  - files_external
  - user_external

Nextcloud configuration:

Config report
<?php
$CONFIG = array (
  'instanceid' => 'xxxxxxxxxxxx',
  'passwordsalt' => 'xxxxxxxxxxxxxxx',
  'secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  'trusted_domains' =>
  array (
    0 => '192.168.10.33',
    1 => 'cloud.xxxxxx.de',
  ),
  'datadirectory' => '/store/nextcloud-data',
  'overwrite.cli.url' => 'http://192.168.10.33/nextcloud',
  'dbtype' => 'mysql',
  'version' => '12.0.6.1',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'xxxxxxxxxxx',
  'dbpassword' => 'xxxxxxxxxxx',
  'installed' => true,
  'filelocking.enabled' => true,
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => 'localhost',
    'port' => 6379,
  ),
  'mail_from_address' => 'xxxxxxx',
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_domain' => xxxxxxxxxxx.de',
  'mail_smtphost' => xxxxxxxxxx.xxx.local',
  'mail_smtpport' => '25',
  'updater.release.channel' => 'stable',
  'maintenance' => false,
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
  'updater.secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
  'theme' => '',
  'loglevel' => 2,
);

Are you using external storage, if yes which one: Yes, SMB.

Are you using encryption: No internal/build-in. Only encrypted filesystem on Ubuntu-erver himself and Bitlocker on Fileserver.

Are you using an external user-backend, if yes which one: No

Client configuration

Browser: Internet Explorer 11, Firefox 59.0.2

Operating system: Windows 7 Professional x64

Logs

Web server error log

Web server error log
[Mon Mar 26 06:25:02.314662 2018] [mpm_prefork:notice] [pid 21244] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Mar 26 06:25:02.314757 2018] [core:notice] [pid 21244] AH00094: Command line: '/usr/sbin/apache2'
[Mon Mar 26 14:01:03.162471 2018] [mpm_prefork:notice] [pid 21244] AH00171: Graceful restart requested, doing restart
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
[Mon Mar 26 14:01:03.218000 2018] [mpm_prefork:notice] [pid 21244] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Mar 26 14:01:03.218012 2018] [core:notice] [pid 21244] AH00094: Command line: '/usr/sbin/apache2'
[Mon Mar 26 21:25:11.241890 2018] [mpm_prefork:notice] [pid 21244] AH00169: caught SIGTERM, shutting down
[Mon Mar 26 21:25:12.308033 2018] [mpm_prefork:notice] [pid 46408] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Mar 26 21:25:12.308074 2018] [core:notice] [pid 46408] AH00094: Command line: '/usr/sbin/apache2'
[Mon Mar 26 21:25:53.944791 2018] [mpm_prefork:notice] [pid 46408] AH00169: caught SIGTERM, shutting down
[Mon Mar 26 21:26:27.243619 2018] [mpm_prefork:notice] [pid 1409] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Mar 26 21:26:27.245690 2018] [core:notice] [pid 1409] AH00094: Command line: '/usr/sbin/apache2'
[Mon Mar 26 21:33:40.697760 2018] [mpm_prefork:notice] [pid 1409] AH00169: caught SIGTERM, shutting down
[Mon Mar 26 21:33:41.764078 2018] [mpm_prefork:notice] [pid 2270] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Mar 26 21:33:41.764121 2018] [core:notice] [pid 2270] AH00094: Command line: '/usr/sbin/apache2'
[Mon Mar 26 23:00:18.538636 2018] [mpm_prefork:notice] [pid 2270] AH00169: caught SIGTERM, shutting down
[Mon Mar 26 23:00:19.857040 2018] [mpm_prefork:notice] [pid 2815] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Mar 26 23:00:19.857088 2018] [core:notice] [pid 2815] AH00094: Command line: '/usr/sbin/apache2'
[Tue Mar 27 02:01:03.232558 2018] [mpm_prefork:notice] [pid 2815] AH00171: Graceful restart requested, doing restart
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
[Tue Mar 27 02:01:03.297159 2018] [mpm_prefork:notice] [pid 2815] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Tue Mar 27 02:01:03.297171 2018] [core:notice] [pid 2815] AH00094: Command line: '/usr/sbin/apache2'
[Tue Mar 27 06:25:02.552259 2018] [mpm_prefork:notice] [pid 2815] AH00171: Graceful restart requested, doing restart
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
[Tue Mar 27 06:25:02.590111 2018] [mpm_prefork:notice] [pid 2815] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Tue Mar 27 06:25:02.590120 2018] [core:notice] [pid 2815] AH00094: Command line: '/usr/sbin/apache2'
[Tue Mar 27 06:25:02.827004 2018] [mpm_prefork:notice] [pid 2815] AH00171: Graceful restart requested, doing restart
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message

Nextcloud log (data/nextcloud.log)

Nextcloud log
Don't know where to fing the nextcloud.log. /var/www/html/nextcloud/data/nextcloud.log is empty.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions