files_external_gdrive icon indicating copy to clipboard operation
files_external_gdrive copied to clipboard

File Locked, Cannot Delete

Open abbasharoon opened this issue 5 years ago • 4 comments

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

abbasharoon avatar Apr 01 '19 17:04 abbasharoon

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}

Kaennorsing avatar Apr 02 '19 17:04 Kaennorsing

Same is the case for server crashing. I installed the plugin yesterday and getting frequently timeouts today. Note that server is having more than 40gb ram so a timeout event is very rare on my end in normal circumstances

On Tue, Apr 2, 2019, 10:46 PM Kaennorsing [email protected] wrote:

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 https://github.com/NastuzziSamy/files_external_gdrive/files/3035255/gdrive_delete.txt

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/NastuzziSamy/files_external_gdrive/issues/43#issuecomment-479116181, or mute the thread https://github.com/notifications/unsubscribe-auth/AGFFw84na1egagKSeHchqNPsrtwW4Rw-ks5vc5eIgaJpZM4cWQqg .

abbasharoon avatar Apr 02 '19 18:04 abbasharoon

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

abbasharoon avatar Apr 03 '19 10:04 abbasharoon

@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.

pklapperich avatar Sep 18 '19 18:09 pklapperich