oC [7.0.2] Folder deleted after rename
Steps to reproduce
- Sync two folders (PES and PRO) with some files/folders inside via Owncloud client
- Go to web interface and rename both folders (in this example PES to OFFICE and PRO to ATARI)
- The Owncloud client will move the files to new folder and some errors will occur
- In the web, one of the renamed folders will vanish (in this example the folder OFFICE)
- 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
@schiesbn THX
@christianrj are you able to reproduce this consistently ? Are there many files and subdirectories inside these two folders ?
Someone else reported something similar here: https://github.com/owncloud/core/issues/9862 but I haven't been able to reproduce this locally.
Did you rename the folder while one sync client was downloading/uploading it ?
Yes. Maybe this has something to do with this #10743 ?
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.
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.
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: https://github.com/owncloud/mirall/issues/2170
@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.
@jnfrmarks, can you try to reproduce the original issue (renamed folder ends up in trash bin).
@PVince81 What do you think about the quota issue? There should be enough space for both, right?
@karlitschek @christianrj has already raised this in a separate issue, possibly a trashbin size update issue.
@craigpg I did not see the original problem testing from an ubuntu box.
@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.
@PVince81 No spinner and no sync occuring.
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.
Closing as duplicate of https://github.com/owncloud/core/issues/13391 where @MorrisJobke might be able to do further research on a local env where it happened, hopefully