Client sometimes deletes file after renaming and moving it #5216

Closed
NicolasGoeddel opened this Issue Sep 29, 2016 · 12 comments

Comments

Projects
None yet
5 participants

We have the Owncloud Server 9.0.3 (stable) running on an external Ubuntu Virtual Machine with redis-server as memcache. In our company we have an other Ubuntu Machine which serves as a Samba server and runs the Owncloud Client (Version 2.2.3). Up to 20 clients use the Samba share and the OC Client synchronizes every change to the OC Server and vice versa.
Some days we have a huge activity on the samba share and then it can happen that files disappear. I found out that somehow the OC client got the instruction to delete files and I think this is a bug. I tried to capture that behaviour with inotifywait to capture all changes on the samba share and using the .owncloudsync.log file as comparison.
In the attached LibreOffice Calc document there are four tables. "owncloudsync" is the log extracted from .owncloudsync.log. "inotify" is the log from inotifywait. "merged" contains the merged logs. And "simplified" is the smaller version of merged that only shows two files where one of them will be deleted by the OC client.
On the server side there is never a change of the mentioned files and directories.

Expected behaviour

The Owncloud Client should never delete files by its own.

Actual behaviour

Somehow the OC Client gets the instruction "INST_REMOVE" but there never was such an instruction given. So certain files get deleted without doing anything wrong.

Steps to reproduce

The problem is that the behaviour is not always reproducible. So I can only talk about the logs I got from the OC client and inotifywait.

  1. Create a directory foo/X with a Word file 103.docx in it.
  2. Move the directory to A/X. (Row 2-3)
  3. Copy an other Word file other.docx to A/X. (Row 4)
  4. Let OC Client Upload the changes. (Row 5-6)
  5. Open both files in Word. (Row 7-10)
  6. Save 103.docx and close Word. (Row 11-19)
  7. Close other.docx. (Row 20)
  8. Let OC Client synchronize changes. (Row21)
  9. Delete other.docx. (Row 22)
  10. Create directory B/X and copy 103.docx to it. (Row 23-26)
  11. Move directory A/X to A/erledigt/X. (Row 28-29)
  12. OC Client recognizes rename of directory but not the files inside. (Row 29-30)
  13. Wonder why OC Client removes A/erledigt/X/other.docx instead of A/X/other.docx. (Row 31)
  14. OC Clients creates B/X and its content. (Row 32-33)
  15. OC Clients deletes A/erledigt/X/103.docx. (Row 34)
    And this step should never happen.

Server configuration

Operating system: Ubuntu 14.04.5 LTS
Web server: Apache 2.4.7
Database: MySQL 14.14 Distrib 5.5.52
PHP version: 5.5.9-1ubuntu4.19
ownCloud version: 9.0.3 (stable)
Storage backend (external storage): None

Client configuration

Client version: 2.2.3
Operating system: Ubuntu 14.04.5 LTS
OS language: German de_DE
Installation path of client: /usr/bin/owncloud

Logs

No logs but a LibreOffice Calc document.

Owncloud-log.zip

@jturcotte jturcotte added this to the 2.3.0 milestone Sep 29, 2016

Contributor

ogoffart commented Sep 30, 2016

Might have been a duplicate of #5192 which is fixed in 2.2.4

Contributor

ogoffart commented Sep 30, 2016

Yeah, i'm pretty sure it's the same issue. Please try again with 2.2.4

I updated to version 2.2.4. I will test it within 24 hours.

Just got an other file deleted with the new version (GIT revision eaeed0). So this was not the solution. If you need more logs then I can create some now or in our next production phase on Oktober 17th.

Contributor

ogoffart commented Oct 12, 2016

please provide more logs.

I found three other wrong deletes in our old logs. I will send them to you via mail. Apart from that I can create new logs next week.

@guruz guruz removed the ReadyToTest label Oct 14, 2016

Contributor

guruz commented Oct 19, 2016

@ogoffart Got any good info from the logs?

Contributor

ogoffart commented Oct 21, 2016

Tahnks for the log.

But this only shows local delete because the file is not on the server. This is not showing any case of the client deleting files on the server.

When the file is both modified and renamed/moved, the client will delete the local file, and download the new file from the server.
That's the expected behavior.
In the end the resulting state is the same on both end and there is no loss of data.

The bug in 2.2.3 made that sometimes the client was deleting files and then they where gone. But when the moved-and-modified file is downloaded back, there is no bugs.

Contributor

jturcotte commented Oct 21, 2016

Is it possible that some clients are still on 2.2.3 and would work on that file which could cause the remove to then be propagated to the 2.2.4 clients even though they don't have the bug anymore?

Yesterday we got no problems what I heard. In the meantime I updated an other windows client to 2.2.4. The linux and windows clients are the only ones that are syncing with this owncloud. The rest of the users were using the web interface or WebDAV.
So it might be that the error is fixed in fact. I want to wait until tomorrows because today is an other production day and then I can reply to you.

Member

ckamm commented Oct 25, 2016

@NicolasGoeddel What were your experiences like in the last days?

@ckamm ckamm added the Needs info label Oct 25, 2016

Seems that I did not click the button to send my comment 7 days ago.
I guess I can close this issue because no files were missing in the last two weeks. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment