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

File Locked, Cannot Delete #43

Open
abbasharoon opened this issue Apr 1, 2019 · 4 comments
Open

File Locked, Cannot Delete #43

abbasharoon opened this issue Apr 1, 2019 · 4 comments

Comments

@abbasharoon
Copy link

Hi,

Thanks for maintaining the plugin, recently I installed the app from the app store on NC 14 installation. Everything went smoothly but there is an issue when trying to delete a file. Either the request for deletion times out or xml is returned stating that file is locked and cannot be deleted. Same happens sometimes when trying to edit a gdrive file in NC.

Error logs only shows following two statements:
fread() expects parameter 1 to be resource, string given at /var/www/lib/private/legacy/helper.php#297

and

feof() expects parameter 1 to be resource, string given at /var/www/lib/private/legacy/helper.php#296

I am not sure where to start debugging it. If someone can guide me in the right direction, I will be more than happy to create a patch and send a pull request

Thanks

@Kaennorsing
Copy link

Kaennorsing commented Apr 2, 2019

same here, the issue also produces a loop that fills the nextcloud log file with super speed, 50 gigabyte until the the server runs out of space
here is the full error log:
gdrive_delete.txt

CentOS7, MariaDB 10, Apache, Firefox
Cache Redis (also happens with Redis disabled)
MariaDB setup according to Nextcloud instructions
Installation path /var/www/html/nextcloud

sudo -u apache php occ files:scan --all produces:

Exception during scan: "files/2c5799db1c6355ad41efbf0240cc7d9f" is locked
#0 /var/www/html/nextcloud/lib/private/Files/Storage/Common.php(714): OC\Lock\DBLockingProvider->acquireLock('files/2c5799db1...', 1)
#1 /var/www/html/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(593): OC\Files\Storage\Common->acquireLock('dfgds.txt', 1, Object(OC\Lock\DBLockingProvider))
#2 /var/www/html/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(593): OC\Files\Storage\Wrapper\Wrapper->acquireLock('dfgds.txt', 1, Object(OC\Lock\DBLockingProvider))
#3 /var/www/html/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(593): OC\Files\Storage\Wrapper\Wrapper->acquireLock('dfgds.txt', 1, Object(OC\Lock\DBLockingProvider))
#4 /var/www/html/nextcloud/lib/private/Files/Cache/Scanner.php(145): OC\Files\Storage\Wrapper\Wrapper->acquireLock('dfgds.txt', 1, Object(OC\Lock\DBLockingProvider))
#5 /var/www/html/nextcloud/lib/private/Files/Cache/Scanner.php(438): OC\Files\Cache\Scanner->scanFile('dfgds.txt', 3, '200', Object(OC\Files\Cache\CacheEntry), true)
#6 /var/www/html/nextcloud/lib/private/Files/Cache/Scanner.php(406): OC\Files\Cache\Scanner->handleChildren('', true, 3, '200', true, 5641570)
#7 /var/www/html/nextcloud/lib/private/Files/Cache/Scanner.php(338): OC\Files\Cache\Scanner->scanChildren('', true, 3, '200', true)
#8 /var/www/html/nextcloud/lib/private/Files/Utils/Scanner.php(245): OC\Files\Cache\Scanner->scan('', true, 3)
#9 /var/www/html/nextcloud/apps/files/lib/Command/Scan.php(145): OC\Files\Utils\Scanner->scan('/myusername', true, NULL)
#10 /var/www/html/nextcloud/apps/files/lib/Command/Scan.php(201): OCA\Files\Command\Scan->scanFiles('myusername', '/myusername', Object(Symfony\Component\Console\Output\ConsoleOutput), false, true, false)
#11 /var/www/html/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OCA\Files\Command\Scan->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /var/www/html/nextcloud/core/Command/Base.php(166): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(946): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(248): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Files\Command\Scan), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /var/www/html/nextcloud/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /var/www/html/nextcloud/console.php(96): OC\Console\Application->run()
#18 /var/www/html/nextcloud/occ(11): require_once('/var/www/html/n...')
#19 {main}

@abbasharoon
Copy link
Author

abbasharoon commented Apr 2, 2019 via email

@abbasharoon
Copy link
Author

Server Got crashed today. Removed the app folder and now it's back.
To make it more clear, I am using redis & apcu for file locking & caching as well

@pklapperich
Copy link

@Kaennorsing, can you edit your comment up above and put all the code in a code block? You can either surround it all with triple backticks (```) on the lines above and below the block, or highlight the whole code block and press the <> button above the github text edit box. Otherwise github reads the #16 etc and thinks you're linking to other github issues.

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

3 participants