Page MenuHomePhabricator

MWMultiVersion can fatal for bad Host headers
Closed, ResolvedPublicPRODUCTION ERROR

Description

Saw the following in the fatal logs:

[2014-08-12 00:36:07] Fatal error: Invalid host name (wikipedia).
 at /usr/local/apache/common-local/multiversion/MWMultiVersion.php on line 360
Server: mw1091
Method: GET
URL: http://wikipedia/
Backtrace:
#0 /usr/local/apache/common-local/multiversion/MWMultiVersion.php(360): trigger_error('Invalid host na...', 256)
#1 /usr/local/apache/common-local/multiversion/MWMultiVersion.php(184): MWMultiVersion::error('Invalid host na...')
#2 /usr/local/apache/common-local/multiversion/MWMultiVersion.php(70): MWMultiVersion->setSiteInfoForWiki('wikipedia')
#3 /usr/local/apache/common-local/multiversion/MWVersion.php(31): MWMultiVersion::initializeForWiki('wikipedia')
#4 /usr/local/apache/common-local/w/index.php(3): getMediaWiki('index.php')
#5 {main}

Details

Reference
bz69419

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:39 AM
bzimport added a project: Deployments.
bzimport set Reference to bz69419.
bzimport added a subscriber: Unknown Object (MLST).

Change 153593 had a related patch set uploaded by Hashar:
multiversion: test we emit Invalid host name

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

That is the expected behavior and has been around for a while. The patch https://gerrit.wikimedia.org/r/#/c/153593/ adds a PHPUnit test for it.

Change 153593 merged by jenkins-bot:
multiversion: test we emit Invalid host name

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

The test that got merge above, just assert the current behavior. We might want to throw / output something else for non-existing hostnames.

greg lowered the priority of this task from Medium to Low.Dec 8 2014, 9:20 PM
greg moved this task from To Triage to Backlog (Tech) on the Deployments board.
hashar raised the priority of this task from Low to Medium.Jun 11 2015, 4:22 PM
hashar lowered the priority of this task from Medium to Low.
hashar moved this task from Untriaged to Dec2019/1.35.wmf.10+ on the Wikimedia-production-error board.
hashar updated the task description. (Show Details)
hashar set Security to None.

Still happens, that is an issue in MWMultiVersion. We should handle the error more gracefully so as to not generate a bunch of stack traces that ends up polluting our logs.

demon claimed this task.

I fixed this a month ago

mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:12 PM