-
Notifications
You must be signed in to change notification settings - Fork 189
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
File suddenly became empty/corrupted #8239
Comments
@mcarbonne Escalated to P1. We will take a look tomorrow. |
@mcarbonne unfortunately I didn't succeed with reproducing the issue yet. Any chance you could provide more logs regarding the upload of one of the corrupted files? |
I'm using the latest version (4.1.1). I extracted the logs on the application side (android):
I'm not an expert but it seems the file was uplaoded twice, first time OK, second try failed. In the previsous logs I posted above (access logs from traefik), there are indeed 2 uploads:
First one => http OK (201) |
Thanks! It looks to me like there are two different issues involved. The android client seems to attempt a second upload which runs into a strange condition:
which then triggers the 499 Client Closed Request. That in return seems to cause the corrupted file in ocis, which of course should never happen. I'll look into that. @JuancaG05 any idea about the 2-uploads problem on Android? |
@JuancaG05 I'm also a bit confused about the |
Hey @aduffeck!
We'll try to take a look ASAP anyway (other priorities now). About the endpoint stuff, oCIS should always point to In any case, you can always open a issue in our repo (https://github.com/owncloud/android) to keep track of it easily and we'll prioritize 👍 |
Thanks for the links, I'll track the 2 already opened issues related to duplicated auto-uploads (no need to open a third issue I guess). Here are the log from another successful upload, the same day : Traefik access logs:
(one upload only) Android application log:
|
While commenting the other issue (owncloud/android#3983 (comment)), I add a look at all my uploaded photos, and I noticed that I have also partially corrupted files. It might be related to the corruption issue too. How is file upload handled in OCIS ? Is it transactional ? (is the file available even if upload did not succeed ?) EDIT : to reproduce the bug, maybe the scenario is the following:
|
Little update from my side: while uploads into ocis should be atomic (they either complete or they don't) I was able to trigger wrong behavior using |
Fixed with the merge of #8278 |
Describe the bug
Version: ocis 5.0.0 rc1
I don't know how exactly to reproduce the bug but it happened several times (also with previous 5.0.0 alpha/beta versions).
The file is listed in the web interface with a size >0 :
![bug ocis](https://private-user-images.githubusercontent.com/46689813/297520603-4053bbc7-d010-495c-8272-ef08c3fb4582.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5Njk4NDEsIm5iZiI6MTczODk2OTU0MSwicGF0aCI6Ii80NjY4OTgxMy8yOTc1MjA2MDMtNDA1M2JiYzctZDAxMC00OTVjLTgyNzItZWYwOGMzZmI0NTgyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDIzMDU0MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFlODM1Mzk4YWIyNmE5NjIwM2M3MWE3MzBmZjQ2YjljYzFlMzdiNWRkMjc3NDdkYjU3Zjc2MGEzNDFkZjQwYjEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.n9DTe3t_Lc_wCql5M34HbcMw1DnPOyd1TtdAnY-MwLY)
But If I download the file, the file is empty (size=0).
Also, I cannot get a preview of the file. In OCIS log, I have the following errors :
And if I try to open the file history in the web interface, it is loading forever.
The behavior is the same with all clients (web, android, linux/desktop).
A quick history of this file:
I noticed this file was in conflict. The version on my computer was the correct one (real picture), but the version re-synced from the server was empty. So the file content disappeared from the server.
Note : this isn't the first time I end up with empty files on my server. But this time, the picture was successfully synced to my computer before being "corrupted" (empty) so now I'm 100% sure that the file was correctly uploaded to my ocis server.
Here are the access logs (from traefik) during the picture upload (~ 3 days ago) :
The upload seems to have been very slow (~70s), which explain why access logs seems "out of order".
Also, I'm not 100% sure, but the log line "14/Jan/2024:17:32:54" might correspond to my computer downloading the file.
So there may be a race condition underlying this issue.
I have all the access logs from traefik, and also OCIS logs (at "info" log level) but I did not find anything relevant.
Currently, I have 13 photos with size=0 on my server (out of 406).
Setup
The text was updated successfully, but these errors were encountered: