Page MenuHomePhabricator

PHP Notice: Undefined index: content-disposition
Closed, ResolvedPublic

Description

Error

MediaWiki version: 1.36.0-wmf.2

message
PHP Notice: Undefined index: content-disposition

Impact

A dozen of these occurred after promoting to group0. Might be a fluke, but just in case it's something bad that needs fixing, flagging as UBN so someone who understands the code takes a look.

Notes

Details

Request ID
0beba759-a4c0-41e4-bccf-51858d006a7b
Request URL
https://www.mediawiki.org/w/index.php?title=Special:CreateAccount&returnto=Help%3AImages
Stack Trace
exception.trace
#0 /srv/mediawiki/php-1.36.0-wmf.2/includes/libs/filebackend/SwiftFileBackend.php(212): MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/mediawiki/php-1.36.0-wmf.2/includes/libs/filebackend/SwiftFileBackend.php(1707): SwiftFileBackend->extractMutableContentHeaders(array)
#2 /srv/mediawiki/php-1.36.0-wmf.2/includes/libs/filebackend/SwiftFileBackend.php(1683): SwiftFileBackend->getStatFromHeaders(array)
#3 /srv/mediawiki/php-1.36.0-wmf.2/includes/libs/filebackend/SwiftFileBackend.php(727): SwiftFileBackend->doGetFileStatMulti(array)
#4 /srv/mediawiki/php-1.36.0-wmf.2/includes/libs/filebackend/FileBackendStore.php(728): SwiftFileBackend->doGetFileStat(array)
#5 /srv/mediawiki/php-1.36.0-wmf.2/includes/libs/filebackend/FileBackendStore.php(648): FileBackendStore->getFileStat(array)
#6 /srv/mediawiki/php-1.36.0-wmf.2/includes/libs/filebackend/FileBackendMultiWrite.php(640): FileBackendStore->fileExists(array)
#7 /srv/mediawiki/php-1.36.0-wmf.2/extensions/ConfirmEdit/FancyCaptcha/includes/FancyCaptcha.php(345): FileBackendMultiWrite->fileExists(array)
#8 /srv/mediawiki/php-1.36.0-wmf.2/extensions/ConfirmEdit/FancyCaptcha/includes/FancyCaptcha.php(297): FancyCaptcha->pickImageFromList(string, array, integer)
#9 /srv/mediawiki/php-1.36.0-wmf.2/extensions/ConfirmEdit/FancyCaptcha/includes/FancyCaptcha.php(200): FancyCaptcha->pickImageFromDir(string, integer)
#10 /srv/mediawiki/php-1.36.0-wmf.2/extensions/ConfirmEdit/FancyCaptcha/includes/FancyCaptcha.php(242): FancyCaptcha->pickImageDir(string, integer, integer)
#11 /srv/mediawiki/php-1.36.0-wmf.2/extensions/ConfirmEdit/FancyCaptcha/includes/FancyCaptcha.php(242): FancyCaptcha->pickImageDir(string, integer, integer)
#12 /srv/mediawiki/php-1.36.0-wmf.2/extensions/ConfirmEdit/FancyCaptcha/includes/FancyCaptcha.php(242): FancyCaptcha->pickImageDir(string, integer, integer)
#13 /srv/mediawiki/php-1.36.0-wmf.2/extensions/ConfirmEdit/FancyCaptcha/includes/FancyCaptcha.php(188): FancyCaptcha->pickImageDir(string, integer, integer)
#14 /srv/mediawiki/php-1.36.0-wmf.2/extensions/ConfirmEdit/FancyCaptcha/includes/FancyCaptcha.php(451): FancyCaptcha->pickImage()
#15 /srv/mediawiki/php-1.36.0-wmf.2/extensions/ConfirmEdit/SimpleCaptcha/SimpleCaptcha.php(1154): FancyCaptcha->getCaptcha()
#16 /srv/mediawiki/php-1.36.0-wmf.2/extensions/ConfirmEdit/includes/auth/CaptchaPreAuthenticationProvider.php(70): SimpleCaptcha->createAuthenticationRequest()
#17 /srv/mediawiki/php-1.36.0-wmf.2/includes/auth/AuthManager.php(2127): CaptchaPreAuthenticationProvider->getAuthenticationRequests(string, array)
#18 /srv/mediawiki/php-1.36.0-wmf.2/includes/auth/AuthManager.php(2105): MediaWiki\Auth\AuthManager->getAuthenticationRequestsInternal(string, array, array, User)
#19 /srv/mediawiki/php-1.36.0-wmf.2/includes/specialpage/AuthManagerSpecialPage.php(275): MediaWiki\Auth\AuthManager->getAuthenticationRequests(string, User)
#20 /srv/mediawiki/php-1.36.0-wmf.2/includes/specialpage/LoginSignupSpecialPage.php(143): AuthManagerSpecialPage->loadAuth(NULL)
#21 /srv/mediawiki/php-1.36.0-wmf.2/includes/specialpage/LoginSignupSpecialPage.php(235): LoginSignupSpecialPage->load(NULL)
#22 /srv/mediawiki/php-1.36.0-wmf.2/includes/specialpage/SpecialPage.php(600): LoginSignupSpecialPage->execute(NULL)
#23 /srv/mediawiki/php-1.36.0-wmf.2/includes/specialpage/SpecialPageFactory.php(635): SpecialPage->run(NULL)
#24 /srv/mediawiki/php-1.36.0-wmf.2/includes/MediaWiki.php(307): MediaWiki\SpecialPage\SpecialPageFactory->executePath(Title, RequestContext)
#25 /srv/mediawiki/php-1.36.0-wmf.2/includes/MediaWiki.php(940): MediaWiki->performRequest()
#26 /srv/mediawiki/php-1.36.0-wmf.2/includes/MediaWiki.php(543): MediaWiki->main()
#27 /srv/mediawiki/php-1.36.0-wmf.2/index.php(53): MediaWiki->run()
#28 /srv/mediawiki/php-1.36.0-wmf.2/index.php(46): wfIndexMain()
#29 /srv/mediawiki/w/index.php(3): require(string)
#30 {main}

Event Timeline

Restricted Application added a project: Commons. · View Herald TranscriptTue, Jul 28, 1:14 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
LarsWirzenius triaged this task as Unbreak Now! priority.Tue, Jul 28, 1:14 PM

They're still happening: a dozen more while I filed the task.

cc @thiemowmde as author of 9c6473dc1dca which I believe is causing this.

Uh, indeed. I'm somewhat speechless and can't explain how this happened. Sorry. I uploaded a fix.

Change 616808 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/core@master] filebackend: Fix index error in SwiftFileBackend

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

Additional information: I don't think this deserves an "Unbreak Now!". I just tested it again, and the code still does exactly what it is expected to do, even with the bug in place.

LarsWirzenius lowered the priority of this task from Unbreak Now! to Needs Triage.Tue, Jul 28, 1:38 PM

OK, then I'll lower priority and remove as blocker for train. Sorry about the needless alarmism.

This is still happening on group0 wikis, and it's happening enough that I fear it's going to be a train blocker by tomorrow, before train can go to group1. I hope the change above in Gerrit is a fix, and can be deployed in a backport window before tomorrow's European train window. Is there something that can be done to help that happen?

  • Yes, I'm sure the patch gets rid of this error.
  • Yes, feel free to backport it. The patch is perfect for a backport, even if it doesn't do much but silencing a notice.
  • No, I'm sorry, but I don't have the capacity to assist such a backport.

Change 616842 had a related patch set uploaded (by Brennen Bearnes; owner: Thiemo Kreuz (WMDE)):
[mediawiki/core@wmf/1.36.0-wmf.2] filebackend: Fix index error in SwiftFileBackend

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

Lowering the priority gives this task less visibility. It should have been left as UBN at least since it seems the impact is not really negligible.

thcipriani triaged this task as Unbreak Now! priority.Tue, Jul 28, 4:47 PM
thcipriani added a subscriber: thcipriani.

This task is creating logspam, which is a valid reason to hold the train at the deployer's discretion https://wikitech.wikimedia.org/wiki/Deployments/Holding_the_train#Logspam

Leaving as UBN! until a backport is verified in production. Backport looks trivial and seem like it will fix the issue.

Change 616842 merged by jenkins-bot:
[mediawiki/core@wmf/1.36.0-wmf.2] filebackend: Fix index error in SwiftFileBackend

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

Mentioned in SAL (#wikimedia-operations) [2020-07-28T18:05:31Z] <catrope@deploy1001> Synchronized php-1.36.0-wmf.2/includes/libs/filebackend/SwiftFileBackend.php: Fix index error in SwiftFileBackend (T259023) (duration: 01m 07s)

brennen added a subscriber: brennen.

This is backported and deployed for 1.36.0-wmf.2; moving to wmf.3 blockers until merged on master.

Change 616808 merged by jenkins-bot:
[mediawiki/core@master] filebackend: Fix index error in SwiftFileBackend

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

Jdforrester-WMF closed this task as Resolved.Tue, Jul 28, 6:57 PM
Jdforrester-WMF added a subscriber: Jdforrester-WMF.

Let's say this is Resolved for now.