client icon indicating copy to clipboard operation
client copied to clipboard

Files Unexpectedly Deleted when hosting on OS X

Open mkormendy opened this issue 13 years ago • 56 comments

My files are getting deleted with owncloud, and I'm not really sure why.

I have entire folders full of files that were synced fine yesterday .. and now, for some reason .. ownCloud client on Mac OS X is deleting what appears to be random folders. This happened last week as well, but I managed to restore them using Time Machine.

One thing that I haven't done in a while, was log into my owncloud with my iPhone app and perused some random files. Now, three hours later, whole droves of the same files and folders are missing again. I can't even begin to narrow it all down.

Expected behaviour

Files should not be removed in sync process if they were successfully synced previously and not removed on the cloud or connected systems with clients or connected mobile apps.

Actual behaviour

My files are being deleted.

Steps to reproduce

Don't have steps .. it just starts happening.

Server configuration

Operating system: OS X Lion

Web server: Apache 2.2.2

Database: MySQL 5

PHP version: 5.4.14

ownCloud version: 5.0.8

Client configuration

Client version: 1.3

Operating system: OS X Mountain Lion

OS language: English

Installation path of client: Generic applications folder.

Logs

output of owncloud --logwindow or owncloud --logfile log.txt

n/a

Web server error log

[Fri May 10 09:18:13 2013] [warn] (2)No such file or directory: Cannot reinit SSLMutex
[Fri May 10 09:18:14 2013] [warn] (2)No such file or directory: Cannot reinit SSLMutex
[Fri May 10 09:18:14 2013] [warn] (2)No such file or directory: Cannot reinit SSLMutex
[Fri May 10 09:18:15 2013] [warn] (2)No such file or directory: Cannot reinit SSLMutex
[Fri May 10 09:18:15 2013] [warn] (2)No such file or directory: Cannot reinit SSLMutex
[Fri May 10 09:18:15 2013] [warn] (2)No such file or directory: Cannot reinit SSLMutex
[Fri May 10 09:18:15 2013] [warn] (2)No such file or directory: Cannot reinit SSLMutex
[Fri May 10 09:19:06 2013] [warn] (2)No such file or directory: Cannot reinit SSLMutex
[Fri May 10 09:19:07 2013] [warn] (2)No such file or directory: Cannot reinit SSLMutex
[Fri May 10 09:19:07 2013] [warn] (2)No such file or directory: Cannot reinit SSLMutex
[Fri May 10 09:19:08 2013] [warn] (2)No such file or directory: Cannot reinit SSLMutex
[Fri May 10 09:19:08 2013] [warn] (2)No such file or directory: Cannot reinit SSLMutex
[Fri May 10 09:19:08 2013] [warn] (2)No such file or directory: Cannot reinit SSLMutex
[Fri May 10 09:19:08 2013] [warn] (2)No such file or directory: Cannot reinit SSLMutex
[Fri May 10 09:20:21 2013] [warn] (2)No such file or directory: Cannot reinit SSLMutex
[Fri May 10 09:20:22 2013] [warn] (2)No such file or directory: Cannot reinit SSLMutex
[Fri May 10 09:20:22 2013] [warn] (2)No such file or directory: Cannot reinit SSLMutex

ownCloud log (data/owncloud.log)

[Sun May 05 18:51:30 2013] [error] [client 192.168.1.1] File does not exist: /Library/WebServer/Documents/_cloud/favicon.ico
[Sun May 05 18:51:30 2013] [error] [client 192.168.1.1] PHP Fatal error:  include(): unable to obtain pthread lock (EDEADLK) in /Library/WebServer/Documents/_cloud/lib/config.php on line 138
[Mon May 06 15:31:09 2013] [error] [client 192.168.1.1] File does not exist: /Library/WebServer/Documents/_cloud/favicon.ico
[Wed May 08 14:27:55 2013] [error] [client 192.168.1.1] PHP Fatal error:  require_once(): unable to obtain pthread lock (EDEADLK) in /Library/WebServer/Documents/_cloud/lib/base.php on line 122
[Wed May 08 18:14:02 2013] [error] [client 161.38.221.193] File does not exist: /Library/WebServer/Documents/_cloud/favicon.ico
[Wed May 08 21:30:21 2013] [error] [client 161.38.221.193] File does not exist: /Library/WebServer/Documents/_cloud/favicon.ico
[Wed May 08 23:22:44 2013] [error] [client 161.38.221.193] File does not exist: /Library/WebServer/Documents/_cloud/favicon.ico
[Thu May 09 01:19:33 2013] [error] [client 192.168.1.1] PHP Fatal error:  require_once(): unable to obtain pthread lock (EDEADLK) in /Library/WebServer/Documents/_cloud/lib/base.php on line 122
[Thu May 09 13:12:02 2013] [error] [client 192.168.1.1] File does not exist: /Library/WebServer/Documents/_cloud/favicon.ico
[Thu May 09 14:48:34 2013] [error] [client 192.168.1.1] File does not exist: /Library/WebServer/Documents/_cloud/favicon.ico
[Fri May 10 09:19:06 2013] [error] [client 192.168.1.1] File does not exist: /Library/WebServer/Documents/_cloud/favicon.ico
[Fri May 10 09:19:19 2013] [error] [client 192.168.1.1] PHP Fatal error:  require_once(): unable to obtain pthread lock (EDEADLK) in /Library/WebServer/Documents/_cloud/lib/base.php on line 122, referer: http://cloud.somethinginteractive.com/index.php
[Fri May 10 09:19:44 2013] [error] [client 192.168.1.1] File does not exist: /Library/WebServer/Documents/_cloud/data

mkormendy avatar May 10 '13 13:05 mkormendy

Please use the issue template: https://github.com/owncloud/mirall/blob/master/issue_template.md

Complaining isn't going to encourage people to help you.

MTGap avatar May 10 '13 13:05 MTGap

@mkormendy sorry for that. But we need your help to nail this down. Please make sure to copy away your server access and error log quickly so that we can check it to see where teh problems come from.

Do I get it right that especially these files get deleted that you used with the iphone app before?

dragotin avatar May 10 '13 13:05 dragotin

Its the only thing that I can think that I did differently in the recent while .. I don't use the iphone app much .. but I did this morning .. then all of a sudden, the ownCloud client started growling that it deleted files for me .. and I looked and folders were gone .. (and not ones I was viewing on my iphone either).

mkormendy avatar May 10 '13 14:05 mkormendy

Are you using APC? Something might be wrong with the configuration.

See the bottom of this post: http://codedmemes.com/lib/php-performance-apc-os-x-server/

MTGap avatar May 10 '13 14:05 MTGap

@MTGap APC is installed ..

apc

APC Support enabled
Version 3.1.13
APC Debugging   Disabled
MMAP Support    Enabled
MMAP File Mask  no value
Locking type    pthread read/write Locks
Serialization Support   php
Revision    $Revision: 327136 $
Build Date  Apr 18 2013 00:41:07

Directive   Local Value Master Value
apc.cache_by_default    On  On
apc.canonicalize    On  On
apc.coredump_unmap  Off Off
apc.enable_cli  Off Off
apc.enabled On  On
apc.file_md5    Off Off
apc.file_update_protection  2   2
apc.filters no value    no value
apc.gc_ttl  3600    3600
apc.include_once_override   Off Off
apc.lazy_classes    Off Off
apc.lazy_functions  Off Off
apc.max_file_size   1M  1M
apc.mmap_file_mask  no value    no value
apc.num_files_hint  1000    1000
apc.preload_path    no value    no value
apc.report_autofilter   Off Off
apc.rfc1867 On  On
apc.rfc1867_freq    0   0
apc.rfc1867_name    APC_UPLOAD_PROGRESS APC_UPLOAD_PROGRESS
apc.rfc1867_prefix  upload_ upload_
apc.rfc1867_ttl 3600    3600
apc.serializer  default default
apc.shm_segments    1   1
apc.shm_size    32M 32M
apc.shm_strings_buffer  4M  4M
apc.slam_defense    On  On
apc.stat    On  On
apc.stat_ctime  Off Off
apc.ttl 0   0
apc.use_request_time    On  On
apc.user_entries_hint   4096    4096
apc.user_ttl    0   0
apc.write_lock  On  On

mkormendy avatar May 10 '13 14:05 mkormendy

@mkormendy Did the deleted directories or files therein contain non-ASCII Unicode characters?

danimo avatar May 10 '13 15:05 danimo

In the filenames or folder names? No. How do I determine this?

mkormendy avatar May 10 '13 15:05 mkormendy

I also lost several files without trace. I don't have an iphone, and my setup is Ubuntu 13.04 with sync client 1.2.5., owncloud 5.0.5.

I don't really know more details. Only that several files in a sync folder that were still there two days ago had gone completely this morning. They were not edited or changed (they were pdfs of some documents) and should simply not have been touched at all by the syncing.

31SFX4 avatar May 11 '13 14:05 31SFX4

I can add some salt maybe: I have the same Issue with Win7, OCClient 1.2.5. The Client deleted randomly PDF-Files and ODT-Files. But mine where freshly copied into the directory. The Sync starts -> Says finished -> some seconds later: "Successfully deleted file xy.pdf". ARGH....

jamfx avatar May 11 '13 15:05 jamfx

@danimo I tried this command to find which files have non-ASCII unicode characters:

LANG=C find . -regex '.*[^a-zA-Z./].*'

It returned a huge list of files that DO have non-ASCII unicode characters, however the owncloud client deleted some of the files and not specifically all of them.

I am trying something today as I wonder if this is an issue with the date-stamping:

  1. I am going to recursively unix-touch all of my files in the owncloud sync folder first.
  2. Then see if the ownCloud client walks over the entire file-structure.
  3. After that's done, I want to see if ownCloud deletes my files again.

mkormendy avatar May 11 '13 19:05 mkormendy

I've seen files seemingly randomly deleted too. Server 5.0.5 Clients Windows XP 1.2.5, Windows 7 1.2.5 and Ubuntu 1.2.5. I'm the only user on this server.

vkimball avatar May 12 '13 02:05 vkimball

Some further system responses when I ran the OwnCloud Client:

OwnCloud (run from terminal with log file output) crashed after almost two days worth of syncing all of my files to the OwnCloud server after I touched all of my files on my system sync folder, it appeared to be completing a check on all the files and syncing any last ones it was working on and then after crashing it said this:

executable path is /./Applications/owncloud.app/Contents/MacOS/owncloud
Bus error: 10

But that also crashed the log file output so I couldn't capture that in time before the crash.

mkormendy avatar May 13 '13 05:05 mkormendy

I have to wonder if OwnCloud works around and supports timezones correctly? My server is running an hour later than my computer system clock.

mkormendy avatar May 13 '13 05:05 mkormendy

This is really REALLY frustrating!!!! It just deleted my files again after a successful full sync session.

When the client was invoked from the Terminal command line, the logs seemed fine, and the client appeared to be doing what it was supposed to do. This is after I performed a full UNIX touch on all of the files and directories in the sync folder.

Then I closed down the Terminal invoked client. And executed it from it's normal app location.

The subsequent client sync sessions have gone in and deleted my files now again. Some of them are there and some of them are not. AND what's worse is they have deleted files I was actively working on.

As it is .. I have to stop all use of OwnCloud.

mkormendy avatar May 13 '13 18:05 mkormendy

@mkormendy it seems like you can reproduce that. Where (client or server) do you perform the touch? And why? I doubt that it has to do with file mtimes tough, they can cause conflicts, but not deletes.

Is it possible that you experience server request timeouts? Please check /etc/php5/apache2/php.ini and find the value of max_execution_time. I set it to 1200. Can you raise it to see if that changes something? Also, please check if you can snip out the time when it happens in your apaches access_log. Grep for csyncoC to get the clients access.

I can see this is very frustrating, and I am sorry. But see how frustrating it is if you have programmed on that and have no chance to nail that down. You can help me to get that fixed, so please don't give up! Thanks!

dragotin avatar May 14 '13 16:05 dragotin

I performed the touch on the client system with the origin files.

mkormendy avatar May 14 '13 18:05 mkormendy

Same story on Windows XP with newest client and owncloud server on debian: add new file to the folder and after a few moments owncloud writes - ... file deleted.

jaroslavas avatar May 29 '13 09:05 jaroslavas

We need the client log of this happening. In the current nightly builds, there is a --logdir option which logs each sync run to a separate file and a --logexpire option which allows to expire logs older than n hours, so your disk won't run full of logs. However, that requires nightly builds (http://download.owncloud.org/download/nightly/).

danimo avatar Jun 11 '13 13:06 danimo

Please check with 1.3.0.

danimo avatar Jun 25 '13 09:06 danimo

I have the same issues with 1.3.0 (Win7 64bit, QNAP/Linux NAS 5.0.7 Server, https://github.com/owncloud/mirall/issues/720)

maddhin avatar Jun 26 '13 18:06 maddhin