-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
423 Locked when upload a file after a disconnection #17254
Comments
same scenario as with owncloud-archive/files_locking#39 |
Is there a shutdown handler on php side missing? @icewind1991 |
Sorry @DeepDiver1975 @icewind1991 |
owncloud-archive/files_locking#39 is telling a different story - please keep in mind that encryption being enabled or disabled has an impact. |
@DeepDiver1975 encryption is disabled. If you want I can check it with encryption enabled |
Are you sure ? In the original post you said you disabled "Files_Locking" and it worked fine. The former would match owncloud-archive/files_locking#39 |
@PVince81 sorry for the confusion. We though that it could be related to the fact of having enable the files_locking, disable it, nothing changes, it still fails. |
Thanks. I cannot explain this issue. Because there are shutdown handlers that automatically unlock files at the end of a request. Now maybe that PHP request is also running into a timeout situation, in which case there is no wait to automatically unlock files, because the request is killed. No further code can be executed. The solution for this would be to have a TTL for locks: #16966 |
Hmm if the file list is not browseable then it's an additional issue. In general a lock shouldn't block that. |
@javiergonzper if I understand well the folder is still browseable here, is that correct ? (in the other ticket it isn't) |
@javiergonzper you're on Apache, right ? Do you use php-fpm ? |
@icewind1991 and I did some tests on Apache and nginx + php-fpm and saw that even if the connection is lost, the PHP request continues running. So for now the only explanation would be that the PHP request runs for so long that it reaches PHP timeout. |
I cannot reproduce this issue. I tried monitoring with redis-cli, type When the transfer starts, I see:
After I disconnect the VM's network, after a second or so I see:
And if I restart the transfer, it works. Could be a difference in setup/environment ? I have this:
|
According to the comments on https://secure.php.net/manual/en/function.register-shutdown-function.php the shutdown function should work correctly if we hit the max execution time |
Moving to 8.1.1, not enough information to stop RC |
@PVince81 our enviroment is: If you want I can provide you an account and also an access by ssh |
Is it the old RC1 from two weeks ago ? @icewind1991 and I tested on master which is more recent. If you still see this issue in RC2 we'll need ssh credentials. |
Ok, I will check it on RC2 👍 |
@PVince81 on RC2 it works... but I created this bug to simulate other bug that we have on the iOS App that still happening... funny. |
Happens again within 9.1.0.15 Current behavior:
4 . It is not possible to delete the folder |
Yes, if there is a disconnection it is likely that the PHP process got killed and could not clear the lock. This is a known issue. I hope we'll find a good solution one day... |
@rperezb why was this tagged as regression ? In which version did it work in the past ? (it might have worked in very old OC that had no locking) |
This PR might fix it #26775 as it will prevent the PHP request to be killed and let it do its cleanup. |
Please try again with 9.1.4 or 9.0.8 where the locks should be freed properly upon disconnection |
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. |
Server version:
Steps:
1- Upload a file with curl
curl -X PUT -v --progress-bar -u user:pass "http://SERVER/remote.php/webdav/file.MOV" -F myfile=@"/Users/Javi/file.MOV"
2- Remove the connection (disconnect ethernet cable) and wait untile time out of curl.
3- Connect again the computer
4- Upload the same file with curl
Current behavior:
Once the file finish the upload we receive a 423 response and the file not appear in the list of files:
< HTTP/1.1 423 Locked
Expected behavior:
File should be upload
It works fine with the Files_Locking App enable or disable. It does not work when the transactional File Locking is active.
Logs:
The text was updated successfully, but these errors were encountered: