nextcloud / desktop

💻 Desktop sync client for Nextcloud
https://nextcloud.com/install/#install-clients
GNU General Public License v2.0
2.97k stars 784 forks source link

client removes file on server if it could not create VFS placeholder file #3444

Open isdnfan opened 3 years ago

isdnfan commented 3 years ago

How to use GitHub

I found some other issues where the client deleted files (like #1433) but my issue looks like specific VFS problem.

Expected behaviour

client should not remove server file if creation of local placeholder file fails (maybe mark local file as "dirty" or fallback to full file download)

image

#=#=#=#=# Propagation starts 2021-06-14T13:01:05Z (last step: 368 msec, total: 368 msec)
||InstantUpload/Camera/20200306_234227.jpg|64|2|1583530946|638ef5870efff25b01a8063e9cfc17b7|4046796|00748461occ5uwmhix0f|2|Couldn't create placeholder info|0|4046796|1583530946||
||InstantUpload/Camera/20200314_120134.jpg|64|2|1584180094|9e934f897c5641ba2c4bc21139f7e5ee|9056787|00748459occ5uwmhix0f|2|Couldn't create placeholder 

Actual behaviour

For some reason client could not create placeholder files. I have no idea why it even tried to create placeholder files - majority of affected files existed and successfully synced months before (at least client reported successful sync).. as a result a client folder had no files anymore and subsequent sync removed all the files on the server side. Fortunately this happened to few hundreds of files and I could recover the files from server trashbin.

image

but the problem still existed and the client complained it could not create placeholder file, and removed the files again!

at the same time access to existing placeholder files (with blue cloud icon) was not possible - the error was "0x8007016A The cloud file provider is not running." The error is often reported for OneDrive - and computer restart is recommended as solution. After client restart I can access placeholder files again. I have no clue how to find out if some process or service crashed - eventlogs don't say anything

image

Steps to reproduce

no idea.

maybe this is related: short time before I added huge folder with my photo archive (600GB,>50k files) but from my feeling it was synced successfully (with VFS) but might introduced some performance issues problems with the client. The client feels totally overloaded - click on settings or properties of every folder results in minutes of unresponsive UI and client using lot of CPU

image

the file was initially removed by the client and I recovered it from server trashbin. removed files didn't reside in this huge folder but on the other one InstantUpload and 2-3 others (completely random in my eyes). After this happened 2 times I switched the specific folders to "Always available locally" and the client successfully downloaded all the files.

Client configuration

Client version: Version 3.2.2stable-Win64 (build 20210527) Operating system: Win 10 1909 OS language: EN Installation path of client:

Server configuration

Nextcloud version: 21.0.2 (docker/apache) Storage backend (external storage): mysql

Logs

I have debug archive and Nextcloud_sync.log from the problematic period, but I'm not willing to upload complete file due to privacy reasons (debug archives are up to 25MB file with extracted log of 300MB). Please advice how to find and extract and

  1. Client logfile: Since 3.1: Under the "General" settings, you can click on "Create Debug Archive ..." to pick the location of where the desktop client will export the logs and the database to a zip file. On previous releases: Via the command line: nextcloud --logdebug --logwindow or nextcloud --logdebug --logfile log.txt (See also https://docs.nextcloud.com/desktop/3.0/troubleshooting.html#log-files)

  2. Web server error log:

  3. Server logfile: nextcloud log (data/nextcloud.log):

ImanuelBertrand commented 5 months ago

This sounds like the same issue to me, or at least a similar one. Do you have VFS enabled? In my case the log contained the message "Couldn't create placeholder info", which might be a consequence of denied file or folder access.