Page MenuHomePhabricator

Recently more broken files (premature end of file at 5MB size) that were cross-wiki uploaded to Commons
Closed, ResolvedPublic

Description

The previous ticket T190988 was closed as resolved, but in the last days, I noticed several new cases of 5MB incomplete files, cross-wiki uploaded.
The last two I found are:

But in the last days, i meet also some from another uploader (I cannot find it now).

Commons project is irretrievably losing many valuable contributions due to this long-standing unresolved issue.

Event Timeline

This bug report is urgent! I find a lot of damaged files among the new uploads!

Draceane raised the priority of this task from High to Unbreak Now!.Nov 2 2020, 9:52 PM

Searching the DB for all files with size 5242880 clearly shows the beginning of a new issue on 2020-10-15, corresponding with the deployment of 1.36.0-wmf.13. Since that date, there have been 431 affected files, compared to 76 for the 9 months 2020-01-01 to 2020-10-14. I think that was the first deployment of https://gerrit.wikimedia.org/r/c/mediawiki/core/+/631506/ to commonswiki since the .12 deployment was cancelled.

Change 639469 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/core@master] Pass along ignorewarnings param to all individual chunks being uploaded

https://gerrit.wikimedia.org/r/639469

@matthiasmullie might understand what's going on here.

You'd be surprised how easily I forget about things I haven't touched in awhile :)

AFAICT, it looks like https://gerrit.wikimedia.org/r/c/mediawiki/core/+/631506/ indeed caused this issue:
Chunked uploads (without ignorewarnings param) will simply output 'Warning' (rather than 'Success' or 'Continue') if there are warnings, so it shouldn't allow finalizing a upload based on that status as it could still be an incomplete file.

That said, the code before that patch had another issue (it prevented upload of files with warnings that are safe to ignore - see T264333), but I think the solution could be different (thorough scrutiny of the patch is welcome)

As this is a curent UBN, can we get someone to either review and backport https://gerrit.wikimedia.org/r/c/mediawiki/core/+/639469 quickly, or revert https://gerrit.wikimedia.org/r/c/mediawiki/core/+/631506/ and backport the revert to restore the previous functionality?

I was able to reproduce this bug by uploading a large file to my local test wiki, then uploading it again with the WikiEditor tool. The second upload generated a duplicate filename warning on the first chunk, causing the dialog to proceed to prompt me for final upload details, despite the progress bar being half-filled. I entered a description and a new name and clicked the button, and it published the first 5M of the file.

Change 639469 merged by jenkins-bot:
[mediawiki/core@master] Pass along ignorewarnings param to all individual chunks being uploaded

https://gerrit.wikimedia.org/r/639469

Change 639953 had a related patch set uploaded (by Tim Starling; owner: Matthias Mullie):
[mediawiki/core@wmf/1.36.0-wmf.16] Pass along ignorewarnings param to all individual chunks being uploaded

https://gerrit.wikimedia.org/r/639953

Change 639955 had a related patch set uploaded (by Tim Starling; owner: Matthias Mullie):
[mediawiki/core@wmf/1.36.0-wmf.14] Pass along ignorewarnings param to all individual chunks being uploaded

https://gerrit.wikimedia.org/r/639955

Change 639953 merged by jenkins-bot:
[mediawiki/core@wmf/1.36.0-wmf.16] Pass along ignorewarnings param to all individual chunks being uploaded

https://gerrit.wikimedia.org/r/639953

Mentioned in SAL (#wikimedia-operations) [2020-11-08T23:06:20Z] <tstarling@deploy1001> Synchronized php-1.36.0-wmf.16/resources/src/mediawiki.Upload.js: fixing UBN T266903 (duration: 01m 35s)

Mentioned in SAL (#wikimedia-operations) [2020-11-08T23:08:02Z] <tstarling@deploy1001> Synchronized php-1.36.0-wmf.16/resources/src/mediawiki.api/upload.js: fixing UBN T266903 (duration: 01m 06s)

Change 639955 merged by Tim Starling:
[mediawiki/core@wmf/1.36.0-wmf.14] Pass along ignorewarnings param to all individual chunks being uploaded

https://gerrit.wikimedia.org/r/639955

Mentioned in SAL (#wikimedia-operations) [2020-11-09T01:29:15Z] <tstarling@deploy1001> sync-file aborted: fixing UBN T266903 (duration: 00m 01s)

Mentioned in SAL (#wikimedia-operations) [2020-11-09T01:30:32Z] <tstarling@deploy1001> Synchronized php-1.36.0-wmf.14/resources/src/mediawiki.Upload.js: fixing UBN T266903 (duration: 01m 07s)

Mentioned in SAL (#wikimedia-operations) [2020-11-09T01:32:54Z] <tstarling@deploy1001> Synchronized php-1.36.0-wmf.14/resources/src/mediawiki.api/upload.js: fixing UBN T266903 (duration: 01m 06s)

tstarling claimed this task.

Should be fixed. Please reopen if the problem is continuing. Please file a new task if there is a regression after more than a few months have passed.

Change 639961 had a related patch set uploaded (by Reedy; owner: Matthias Mullie):
[mediawiki/core@REL1_35] Pass along ignorewarnings param to all individual chunks being uploaded

https://gerrit.wikimedia.org/r/639961

Change 639961 merged by jenkins-bot:
[mediawiki/core@REL1_35] Pass along ignorewarnings param to all individual chunks being uploaded

https://gerrit.wikimedia.org/r/639961