Repository navigation
Closed
Labels
Type:Bugp1-urgentCritical issue, need to consider hotfix with just that issueregressionsev1-criticalstatus/STALE
Milestone
Description
Steps to reproduce
- Set up an external storage. For example SFTP.
- In oC files view create three or more folders and upload files inside them.
- Select three of the created folders and try to delete them.
Expected behaviour
All folders are removed.
Actual behaviour
There are errors. The first one is erased, but the next are locked.
Server configuration
Operating system:
Ubuntu 16.04
Web server:
Apache
Database:
MySQL
PHP version:
7.0
ownCloud version: (see ownCloud admin page)
(current master not stable10)
{"installed":"true","maintenance":"false","needsDbUpgrade":"false","version":"10.0.3.0","versionstring":"10.0.3 beta","edition":"Community","productname":"ownCloud"}
Updated from an older ownCloud or fresh install:
Fresh
The content of config/config.php:
Are you using external storage, if yes which one: local/smb/sftp/...
Yes. SFTP
Are you using encryption:
No.
Logs
{"reqId":"pUh0lrgWVTKkcFPHk2Y7","level":4,"time":"2017-08-23T11:00:34+00:00","remoteAddr":"HIDDEN_IP","user":"admin","app":"webdav","method":"DELETE","url":"\/remote.php\/dav\/files\/admin\/SFTP\/FOLDER3","message":"Exception: {\"Message\":\"HTTP\\\/1.1 423 \\\"SFTP\\\/FOLDER3\\\" is locked\",\"Exception\":\"OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Exception\\\\FileLocked\",\"Code\":0,\"Trace\":\"#0 \\\/opt\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Tree.php(179): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Directory->delete()\\n#1 \\\/opt\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(287): Sabre\\\\DAV\\\\Tree->delete('files\\\/admin\\\/SFT...')\\n#2 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpDelete(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#3 \\\/opt\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#4 \\\/opt\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(479): Sabre\\\\Event\\\\EventEmitter->emit('method:DELETE', Array)\\n#5 \\\/opt\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#6 \\\/opt\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Server.php(234): Sabre\\\\DAV\\\\Server->exec()\\n#7 \\\/opt\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(31): OCA\\\\DAV\\\\Server->exec()\\n#8 \\\/opt\\\/owncloud\\\/remote.php(175): require_once('\\\/opt\\\/owncloud\\\/a...')\\n#9 {main}\",\"File\":\"\\\/opt\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/Directory.php\",\"Line\":330,\"User\":\"admin\"}"}
{"reqId":"1VUz6STOPw52f35meTsC","level":4,"time":"2017-08-23T11:00:34+00:00","remoteAddr":"HIDDEN_IP","user":"admin","app":"webdav","method":"DELETE","url":"\/remote.php\/dav\/files\/admin\/SFTP\/FOLDER2","message":"Exception: {\"Message\":\"HTTP\\\/1.1 423 \\\"SFTP\\\/FOLDER2\\\" is locked\",\"Exception\":\"OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Exception\\\\FileLocked\",\"Code\":0,\"Trace\":\"#0 \\\/opt\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Tree.php(179): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Directory->delete()\\n#1 \\\/opt\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(287): Sabre\\\\DAV\\\\Tree->delete('files\\\/admin\\\/SFT...')\\n#2 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpDelete(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#3 \\\/opt\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#4 \\\/opt\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(479): Sabre\\\\Event\\\\EventEmitter->emit('method:DELETE', Array)\\n#5 \\\/opt\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#6 \\\/opt\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Server.php(234): Sabre\\\\DAV\\\\Server->exec()\\n#7 \\\/opt\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(31): OCA\\\\DAV\\\\Server->exec()\\n#8 \\\/opt\\\/owncloud\\\/remote.php(175): require_once('\\\/opt\\\/owncloud\\\/a...')\\n#9 {main}\",\"File\":\"\\\/opt\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/Directory.php\",\"Line\":330,\"User\":\"admin\"}"}
Client configuration
Browser
Chrome
Metadata
Metadata
Assignees
Labels
Type:Bugp1-urgentCritical issue, need to consider hotfix with just that issueregressionsev1-criticalstatus/STALE
Activity
PVince81 commentedon Aug 23, 2017
Does it happen on stable10 too ?
SergioBertolinSG commentedon Aug 23, 2017
The reference issue was tested in stable10, so it happens there as well.
PVince81 commentedon Aug 23, 2017
And likely doesn't happen on the home storage ? Does it happen with "local" as external storage ?
SergioBertolinSG commentedon Aug 23, 2017
Happens also using local external storage. (Using master)
PVince81 commentedon Aug 23, 2017
but does not happen for a home storage ?
PVince81 commentedon Aug 23, 2017
Reproduced locally with stable10 and SFTP
SergioBertolinSG commentedon Aug 24, 2017
Only happens using external storage.
PVince81 commentedon Aug 24, 2017
@SergioBertolinSG I've now tried with locking with redis and the problem did not appear.
I wonder if some deadlock or something is happening with DB based locking.
PVince81 commentedon Aug 24, 2017
With DB locking:
PVince81 commentedon Aug 24, 2017
There are scanner entries for the locks. I tried setting the ext storage mode to "Never" check for changes, still the locking errors appear. Well, now it's worse: I get 403 for all three calls:
26 remaining items
PVince81 commentedon Aug 30, 2017
Worst case we revert web UI to use the old DAV endpoint. However this doesn't exclude issues with parallel deletion initiated by newer desktop clients which use the new DAV endpoint...
PVince81 commentedon Aug 30, 2017
POC of alternative solution: limits the watcher to any subpaths of the currently requested path: #28855. So whenever any of the parents gets queried by the Sabre tree, the watcher/scanner doesn't kick in.
The part I dislike about this approach is that it doesn't solve the parent querying / filecache queries like #28853 does.
PVince81 commentedon Sep 5, 2017
Despite the fact that the desktop client 2.3.3 is using the new DAV endpoint and is doing the three DELETE operations in parallel, I didn't manage to run into the locking situation.
Maybe the browser doesn't do it exactly in parallel but with a slight microscopic delay ?
Anyway, this makes this bug less critical. I think we'll switch the web UI to old DAV in the meantime.
Because the fix itself #28853 is complex and requires more discussions regarding the DAV architecture.
PVince81 commentedon Sep 5, 2017
This PR reverts the web UI back to the old DAV endpoint as a workaround for the next release: #28914
SergioBertolinSG commentedon Sep 7, 2017
This works in current master, close?
PVince81 commentedon Sep 7, 2017
Ok, let's close. We'll need to redo the switch to new DAV, I'll put this on my PR #28853
PVince81 commentedon Sep 7, 2017
actually I've put the switch in a separate PR here: #28874 which also contains switching for single file uploads
lock commentedon Aug 1, 2019
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.