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

oC [7.0.2] Folder deleted after rename #10711

Closed
christianrj opened this issue Aug 28, 2014 · 15 comments
Closed

oC [7.0.2] Folder deleted after rename #10711

christianrj opened this issue Aug 28, 2014 · 15 comments

Comments

@christianrj
Copy link

Steps to reproduce

  1. Sync two folders (PES and PRO) with some files/folders inside via Owncloud client
  2. Go to web interface and rename both folders (in this example PES to OFFICE and PRO to ATARI)
  3. The Owncloud client will move the files to new folder and some errors will occur
  4. In the web, one of the renamed folders will vanish (in this example the folder OFFICE)
  5. Go to the trash bin. The renamed folder will be there

Expected behaviour

The folder will be renamed and synced with the client

Actual behaviour

The renamed folder is deleted and moved to the trash bin

Server configuration

Operating system: CentOS 6.5 64 bit

Web server: Apache 2.2.27

Database: MySQL 5.5.39

PHP version: 5.5.16

ownCloud version: 7.0.2

ownCloud client version: 1.6.2 build 3463

Updated from an older ownCloud or fresh install: fresh

List of activated apps: Activity, Deleted files, Pictures, Share Files, Versions, Video Viewer, Disable Remember Login

The content of config/config.php:

$CONFIG = array (
  'instanceid' => '',
  'passwordsalt' => '',
  'trusted_domains' => 
  array (
    0 => '',
    1 => '',
    2 => '',
  ),
  'datadirectory' => '/oc/data',
  'dbtype' => 'mysql',
  'version' => '7.0.2.1',
  'dbname' => '',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => '',
  'dbpassword' => '',
  'installed' => true,
  'loglevel' => '1',
  'logdateformat' => 'd-m-Y - H:i:s',
  'logtimezone' => 'America/Sao_Paulo',
  'log_rotate_size' => 5242880,
  'mail_smtpmode' => '',
  'mail_smtphost' => '',
  'mail_smtpauth' => true,
  'mail_smtpname' => '',
  'mail_smtppassword' => '',
  'knowledgebaseenabled' => false,
  'maintenance' => false,
  'forcessl' => false,
  'updatechecker' => false,
  'default_language' => 'pt_BR',
  'theme' => '',
  'appstoreenabled' => false,
  'memcached_servers' => 
  array (
    0 => 
    array (
      0 => 'localhost',
      1 => ,
    ),
  ),
);

Are you using external storage, if yes which one: no (dedicated hdd for data directory)

Are you using encryption: no

Client configuration

Browser: Chrome 37

Operating system: Windows 8.1 PRO 64 bit

Logs

Web server error log

No relevant log to show

ownCloud log (data/owncloud.log)

{"app":"core","message":"PDFDelegateFailed `[ghostscript library] -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 \"-sDEVICE=pngalpha\" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 \"-r72x72\" -dFirstPage=1 -dLastPage=1 \"-sOutputFile=\/tmp\/magick-237030m7AAonA4U4v%d\" \"-f\/tmp\/magick-23703hzfzG94TPdtn\" \"-f\/tmp\/magick-23703HZpLRyRM7ARe\"': -dname= must be followed by a valid token\n @ error\/pdf.c\/InvokePDFDelegate\/256","level":3,"time":"2014-08-28T13:47:51+00:00"}
{"reqId":"53ff366f4dd38","app":"core","message":"XCache opcode cache will not be cleared because \"xcache.admin.enable_auth\" is enabled.","level":2,"time":"28-08-2014 - 11:02:23","method":"POST","url":"\/index.php\/settings\/ajax\/setloglevel.php"}
{"reqId":"53ff36bc6fd97","app":"webdav","message":"Sabre\\DAV\\Exception\\NotAuthenticated: No basic authentication headers were found","level":0,"time":"28-08-2014 - 11:03:40","method":"PROPFIND","url":"\/remote.php\/webdav\/"}
{"reqId":"53ff36df752a7","app":"webdav","message":"Sabre\\DAV\\Exception\\NotAuthenticated: No basic authentication headers were found","level":0,"time":"28-08-2014 - 11:04:15","method":"PROPFIND","url":"\/remote.php\/webdav\/"}
{"app":"OCP\\Share","message":"Sharing backend OCA\\Gallery\\Share\\Picture not registered, OCA\\Gallery\\Share\\Picture is already registered for picture","level":2,"time":"28-08-2014 - 11:05:31"}
{"app":"OCP\\Share","message":"Sharing backend OCA\\Gallery\\Share\\Gallery not registered, OCA\\Gallery\\Share\\Gallery is already registered for gallery","level":2,"time":"28-08-2014 - 11:05:31"}
{"app":"core","message":"PDFDelegateFailed `[ghostscript library] -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 \"-sDEVICE=pngalpha\" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 \"-r72x72\" -dFirstPage=1 -dLastPage=1 \"-sOutputFile=\/tmp\/magick-283811Y_AcoKCokNj%d\" \"-f\/tmp\/magick-28381krFdgUhOIbLU\" \"-f\/tmp\/magick-28381_rqw5hirr8Iv\"': -dname= must be followed by a valid token\n @ error\/pdf.c\/InvokePDFDelegate\/256","level":3,"time":"28-08-2014 - 17:19:27"}
{"app":"files_trashbin","message":"Couldn't move \/Shared\/PRO to the trash bin","level":3,"time":"28-08-2014 - 17:47:04"}

Browser log

No relevant log to show

Owncloud Client Activity log

18:21     Shared/PES                                                      ownCloud       Directory C:\DATA\oC\Shared\PES can't be removed        
18:21     Shared/OFFICE                                                   ownCloud       Deleted    
18:20     Shared/PES                                                      ownCloud       Unknown error    
@DeepDiver1975
Copy link
Member

@schiesbn THX

@PVince81 PVince81 added the Bug label Aug 29, 2014
@PVince81
Copy link
Contributor

@christianrj are you able to reproduce this consistently ?
Are there many files and subdirectories inside these two folders ?

Someone else reported something similar here: #9862
but I haven't been able to reproduce this locally.

Did you rename the folder while one sync client was downloading/uploading it ?

@christianrj
Copy link
Author

Yes. Maybe this has something to do with this #10743 ?

@craigpg craigpg added this to the 2014-sprint-03-current milestone Sep 5, 2014
@PVince81
Copy link
Contributor

PVince81 commented Sep 5, 2014

Just noticed that these folders you are renaming are folders shared with you, is that correct ?
I don't think it's related to #10743 and the trashbin.

Are you able to reproduce this consistently or does it randomly happen ?

Note that the rename code path is different for shared folders.

@PVince81
Copy link
Contributor

PVince81 commented Sep 5, 2014

Haven't managed to reproduce this yet with shared folders, now trying to rename folders while having the sync client syncing. It is possible that for some reason the sync client decided to delete the folder due to concurrent action.

@christianrj assuming that you couldn't reproduce the issue consistently and might be a race condition of some sorts.

@PVince81
Copy link
Contributor

PVince81 commented Sep 5, 2014

I haven't been able to reproduce the issue with folder deletion that lands in the trashbin, but I managed to make the sync client sometimes delete files if you rename folders while it is syncing:
owncloud/client#2170

@christianrj
Copy link
Author

@PVince81 Another problem I found (oC 6.0.5):

1 - Created an account with 20 GB quota
2 - Synced two folders: one with 6.9 GB and another with 3.5 GB
3 - Deleted the 6.9 GB folder. It was INSTANTLY DELETED, without been moved to trash
4 - Deleted the 3.5 GB folder. Again, instantly deleted. No traces in trash

All of this was done via web interface.

@craigpg craigpg modified the milestones: 2014-sprint-04-current, 2014-sprint-03 Sep 15, 2014
@craigpg
Copy link

craigpg commented Sep 17, 2014

@jnfrmarks, can you try to reproduce the original issue (renamed folder ends up in trash bin).

@karlitschek
Copy link
Contributor

@PVince81 What do you think about the quota issue? There should be enough space for both, right?

@PVince81
Copy link
Contributor

@karlitschek @christianrj has already raised this in a separate issue, possibly a trashbin size update issue.

@jnfrmarks
Copy link

@craigpg I did not see the original problem testing from an ubuntu box.

@craigpg craigpg modified the milestones: 2014-sprint-05-current, 2014-sprint-04 Sep 29, 2014
@PVince81
Copy link
Contributor

PVince81 commented Oct 7, 2014

@christianrj when you renamed both folders, do you remember whether "PES" and "PRO" both had a spinner while the renaming was in progress or did the first one finish first and only then you renamed the second one ? Just to rule out concurrency.

If this cannot be reproduced consistently, then it's likely to be a race condition of some sorts. Maybe someone else tried to access or rename that folder at the same time, or a weird side effect of concurrency somehow caused the folder to be deleted. I can't think of any code path that would make the code decide to delete the folder instead of renaming.

@christianrj
Copy link
Author

@PVince81 No spinner and no sync occuring.

@craigpg craigpg modified the milestones: 2014-sprint-06-current, 2014-sprint-05 Oct 12, 2014
@craigpg craigpg modified the milestones: 2014-sprint-07-current, 2014-sprint-06 Oct 27, 2014
@craigpg craigpg modified the milestones: 2014-sprint-08-current, 2014-sprint-07 Nov 10, 2014
@DeepDiver1975 DeepDiver1975 removed this from the 8.0-current milestone Jan 7, 2015
@laurivosandi
Copy link

Hello, I'm running here 7.0.4. I just renamed a folder in web interface and the contents dissapeared without a trace under deleted files. The sync client also happily deleted the files and I had to resort to using backups from yesterday. This is a serious issue I would say if the files randomly disappear like this. I was unable to reproduce the bug though.

@PVince81
Copy link
Contributor

PVince81 commented Feb 6, 2015

Closing as duplicate of #13391 where @MorrisJobke might be able to do further research on a local env where it happened, hopefully

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants