Page MenuHomePhabricator

maintenance/cleanupUploadStash.php is broken (throws exception)
Closed, ResolvedPublic

Description

I discovered today that the cleanupUploadStash.php job on terbium has been failing for a while and we've accumulated 5T of data in temp containers.

There was a "missing /a" issue that was breaking foreachwiki, which I worked around. However, when I run cleanupUploadStash.php now, I get the following exception for all wikis:

bswikibooks: Getting list of files to clean up...
bswikibooks: Removing 2 file(s)...
bswikibooks: UploadStash::getFile No user is logged in, files must belong to users
bswikibooks: Backtrace:
bswikibooks: #0 /usr/local/apache/common-local/php-1.23wmf1/includes/upload/UploadStash.php(361): UploadStash->getFile('11jhstz7psnc.tykg19.954.jpg')
bswikibooks: #1 /usr/local/apache/common-local/php-1.23wmf1/maintenance/cleanupUploadStash.php(83): UploadStash->removeFileNoAuth('11jhstz7psnc.tykg19.954.jpg')
bswikibooks: #2 /usr/local/apache/common-local/php-1.23wmf1/maintenance/doMaintenance.php(113): UploadStashCleanup->execute()
bswikibooks: #3 /usr/local/apache/common-local/php-1.23wmf1/maintenance/cleanupUploadStash.php(143): require_once('/usr/local/apache/common-local/php-1.23wmf1/maintenance/doMaintenance.php')
bswikibooks: #4 /usr/local/apache/common-local/multiversion/MWScript.php(97): require_once('/usr/local/apache/common-local/php-1.23wmf1/maintenance/cleanupUploadStash.php')
bswikibooks: #5 {main}


Version: unspecified
Severity: normal

Details

Reference
bz56298

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:16 AM
bzimport set Reference to bz56298.
bzimport added a subscriber: Unknown Object (MLST).

This might have been broken by 8049aa338451, which added the $this->getFile( $key ) call without the "janky" $noAuth = true argument.

Change 92542 had a related patch set uploaded by Anomie:
UploadStash::removeFileNoAuth shouldn't need auth

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

Change 92543 had a related patch set uploaded by Reedy:
UploadStash::removeFileNoAuth shouldn't need auth

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

Change 92544 had a related patch set uploaded by Reedy:
UploadStash::removeFileNoAuth shouldn't need auth

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

Change 92545 had a related patch set uploaded by Reedy:
UploadStash::removeFileNoAuth shouldn't need auth

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

Change 92542 merged by jenkins-bot:
UploadStash::removeFileNoAuth shouldn't need auth

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

Change 92544 merged by Reedy:
UploadStash::removeFileNoAuth shouldn't need auth

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

Change 92543 merged by Reedy:
UploadStash::removeFileNoAuth shouldn't need auth

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

Change 92545 merged by MarkAHershberger:
UploadStash::removeFileNoAuth shouldn't need auth

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

I guess this bug is fixed now?

Gilles raised the priority of this task from High to Unbreak Now!.Dec 4 2014, 10:21 AM
Gilles moved this task from Untriaged to Done on the Multimedia board.
Gilles lowered the priority of this task from Unbreak Now! to High.Dec 4 2014, 11:22 AM