-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Shared files get locked for no obvious reason #5824
Comments
Does the file stay locked? Or does this just show up from time to time? Because if a lot of people have access to a file. And 1 of them is writing and other try to read => 💥 That is expected and exactly why locking is in place. |
From time to time. My own theory is that it happens when the sync client is running a new sync check and at the exact same time someone tries to download the VM. I just wanted to get an answer on why it happens. Could that be it? |
This specifically happens with the Nextcloud VMs which I share from my own server. It gets downloaded about 100-200 times per day so it's likely that the sync client is messing things up. But, at the same time these folders are "stale" and isn't changed except when a new release is out, so no one tries to write to that folder afaik. |
Well we do do atomic operations there... so if you are unlucky and they happen simultaneously one of them will fail. that is the best awnser I have then. @icewind1991 any other suggestions? |
We can close this, but would be nice if @icewind1991 had any suggestions. Thanks @rullzer |
Using the issue template app, there are more info but it doesn't show in the output. Please edit this issue to see it.
Steps to reproduce
Expected behaviour
Files shouldn't be locked
Actual behaviour
Files get locked and can't be accessed.
I truncated
oc_file_locks
according to owncloud/core#20380 and checked that Redis applied the TTL of 3600 which it did. But even after truncating theoc_file_locks
table I get these locks for no obvious reason.I use
cron
every 15 mintues.Server configuration
Operating system: Linux cloud.techandme.se 4.4.0-83-generic #106-Ubuntu SMP Mon Jun 26 17:54:43 UTC 2017 x86_64
Web server: Apache/2.4.18 (Ubuntu) (apache2handler)
Database: mysql 5.7.19
PHP version: 7.0.18-0ubuntu0.16.04.1
Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, session, standard, apache2handler, mysqlnd, PDO, xml, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, iconv, imap, intl, json, ldap, exif, mcrypt, mysqli, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, readline, redis, shmop, SimpleXML, smbclient, sockets, sqlite3, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlwriter, xsl, zip, libsmbclient, Zend OPcache
Nextcloud version: 12.0.0 - 12.0.0.29
Updated from an older Nextcloud/ownCloud or fresh install:
Where did you install Nextcloud from:
Signing status:
Signing status
List of activated apps:
App list
The content of config/config.php:
Config report
Are you using external storage, if yes which one: Array
(
[0] => \OC\Files\Storage\Local
[1] => \OCA\Files_External\Lib\Storage\FTP
[2] => \OC\Files\Storage\DAV
[3] => \OCA\Files_External\Lib\Storage\OwnCloud
[4] => \OCA\Files_External\Lib\Storage\SFTP
[5] => \OCA\Files_External\Lib\Storage\AmazonS3
[6] => \OCA\Files_External\Lib\Storage\Dropbox
[7] => \OCA\Files_External\Lib\Storage\Google
[8] => \OCA\Files_External\Lib\Storage\Swift
[9] => \OCA\Files_External\Lib\Storage\SFTP
[10] => \OCA\Files_External\Lib\Storage\SMB
[11] => \OCA\Files_External\Lib\Storage\SMB
)
Are you using encryption: no
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
Client configuration
Browser: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/59.0.3071.109 Chrome/59.0.3071.109 Safari/537.36
Operating system:
Logs
Web server error log
Web server error log
``` Nothing but normal logging ```Nextcloud log (data/nextcloud.log)
Nextcloud log
``` OCP\Lock\LockedException: "_VMs/Nextcloud VMs/Nextcloud Community VM" is locked /var/www/nextcloud/lib/private/Files/View.php - line 2011: OC\Files\View->lockPath('/_VMs/Nextcloud...', 1) /var/www/nextcloud/lib/private/Files/View.php - line 1118: OC\Files\View->lockFile('/_VMs/Nextcloud...', 1) /var/www/nextcloud/lib/private/Files/View.php - line 971: OC\Files\View->basicOperation('fopen', '/_VMs/Nextcloud...', Array, 'r') /var/www/nextcloud/lib/private/Files/Filesystem.php - line 737: OC\Files\View->fopen('/_VMs/Nextcloud...', 'r') /var/www/nextcloud/lib/private/Streamer.php - line 80: OC\Files\Filesystem fopen('/_VMs/Nextcloud...', 'r') /var/www/nextcloud/lib/private/legacy/files.php - line 169: OC\Streamer->addDirRecursive('/_VMs/Nextcloud...') /var/www/nextcloud/apps/files_sharing/lib/Controller/ShareController.php - line 535: OC_Files get('/_VMs/Nextcloud...', 'Nextcloud Commu...', Array) [internal function] OCA\Files_Sharing\Controller\ShareController->downloadShare('lTjoMr5smSYHIiM', NULL, '/', '') /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 160: call_user_func_array(Array, Array) /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 90: OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\Files_Sharing\Controller\ShareController), 'downloadShare') /var/www/nextcloud/lib/private/AppFramework/App.php - line 114: OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Files_Sharing\Controller\ShareController), 'downloadShare') /var/www/nextcloud/lib/public/AppFramework/App.php - line 136: OC\AppFramework\App main('ShareController', 'downloadShare', Object(OC\AppFramework\DependencyInjection\DIContainer)) /var/www/nextcloud/core/routes.php - line 129: OCP\AppFramework\App->dispatch('ShareController', 'downloadShare') [internal function] OC\Route\Router->{closure}(Array) /var/www/nextcloud/lib/private/Route/Router.php - line 299: call_user_func(Object(Closure), Array) /var/www/nextcloud/lib/base.php - line 1000: OC\Route\Router->match('/s/lTjoMr5smSYH...') /var/www/nextcloud/index.php - line 40: OC handleRequest() {main} ```Browser log
Browser log
``` Insert your browser log here, this could for example include:The text was updated successfully, but these errors were encountered: