Last modified: 2013-09-30 21:53:21 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T54038, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 52038 - All Wikivoyage requests serve Fatal Error: "invalid magic word 'noexternallanglinks' from line 315 of common/php-1.22wmf11/includes/MagicWord.php"
All Wikivoyage requests serve Fatal Error: "invalid magic word 'noexternallan...
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
General/Unknown (Other open bugs)
wmf-deployment
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 52040 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-25 16:54 UTC by Tyler Romeo
Modified: 2013-09-30 21:53 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Tyler Romeo 2013-07-25 16:54:54 UTC
https://he.wikivoyage.org/wiki/Tarragona

Gives a MWException. Only occurs over HTTPS, and sometimes only occurs for certain languages.
Comment 1 Krinkle 2013-07-25 16:55:48 UTC
krinkle@fluorine:/a/mw-log$ ack-grep c6a790a7 exception.log  -A 20
2013-07-25 16:51:01 mw1177 enwikivoyage: [c6a790a7] /wiki/Tarragona   Exception from line 315 of /usr/local/apache/common-local/php-1.22wmf11/includes/MagicWord.php: Error: invalid magic word 'noexternallanglinks'
#0 /usr/local/apache/common-local/php-1.22wmf11/includes/MagicWord.php(238): MagicWord->load('noexternallangl...')
#1 /usr/local/apache/common-local/php-1.22wmf11/includes/parser/Parser.php(4904): MagicWord::get('noexternallangl...')
#2 /usr/local/apache/common-local/php-1.22wmf11/extensions/Wikibase/client/WikibaseClient.hooks.php(673): Parser->setFunctionHook('noexternallangl...', '\Wikibase\NoLan...', 1)
#3 [internal function]: Wikibase\ClientHooks::onParserFirstCallInit(Object(Parser))
#4 /usr/local/apache/common-local/php-1.22wmf11/includes/Hooks.php(199): call_user_func_array('\Wikibase\Clien...', Array)
#5 /usr/local/apache/common-local/php-1.22wmf11/includes/GlobalFunctions.php(3835): Hooks::run('ParserFirstCall...', Array)
#6 /usr/local/apache/common-local/php-1.22wmf11/includes/parser/Parser.php(270): wfRunHooks('ParserFirstCall...', Array)
#7 [internal function]: Parser->firstCallInit()
#8 /usr/local/apache/common-local/php-1.22wmf11/includes/StubObject.php(79): call_user_func_array(Array, Array)
#9 /usr/local/apache/common-local/php-1.22wmf11/includes/StubObject.php(99): StubObject->_call('firstCallInit', Array)
#10 /usr/local/apache/common-local/php-1.22wmf11/includes/cache/MessageCache.php(996): StubObject->__call('firstCallInit', Array)
#11 /usr/local/apache/common-local/php-1.22wmf11/includes/cache/MessageCache.php(996): StubObject->firstCallInit()
#12 /usr/local/apache/common-local/php-1.22wmf11/includes/cache/MessageCache.php(974): MessageCache->getParser()
#13 /usr/local/apache/common-local/php-1.22wmf11/includes/Message.php(696): MessageCache->transform('$1 ??? Travel g...', true, Object(Language), Object(Title))
#14 /usr/local/apache/common-local/php-1.22wmf11/includes/Message.php(496): Message->transformText('$1 ??? Travel g...')
#15 /usr/local/apache/common-local/php-1.22wmf11/includes/Message.php(553): Message->toString()
#16 /usr/local/apache/common-local/php-1.22wmf11/includes/OutputPage.php(846): Message->text()
#17 /usr/local/apache/common-local/php-1.22wmf11/includes/OutputPage.php(889): OutputPage->setHTMLTitle(Object(Message))
#18 /usr/local/apache/common-local/php-1.22wmf11/includes/Article.php(555): OutputPage->setPageTitle('Tarragona')
#19 /usr/local/apache/common-local/php-1.22wmf11/includes/actions/ViewAction.php(44): Article->view()
Comment 2 Krinkle 2013-07-25 17:01:21 UTC
Not limited to HTTPS. That url just happened to be cached on HTTP still and not over HTTPS. Any url that is not cached (or invalidated by purge/edit) will result in fatal error.

e.g.
- http://en.wikivoyage.org/wiki/Tarragona?action=history
- http://en.wikivoyage.org/wiki/Tarragona
Comment 3 Greg Grossmeier 2013-07-25 17:45:02 UTC
We're back up, but I'm leaving this bug open for now to document what happened (for Aude and Reedy).
Comment 4 Aude 2013-07-25 17:55:30 UTC
* the mergeMessageFiles script failed(?) due to wikibase bad initialization order
* we tried to define the i18n / namespace /magic word / alias fields explicitly in extension-list, to try and allow merge message files to work.  Somehow it does not work for magic words (?) and wikibase repo messages were missing.
* would have loved to try rebuild and check it is okay for wmf12 only (test2 and test wikidata); instead it apparently also rebuilded and scapped the cache for wmf11 (wikidata + wikivoyage)
* Wikibase Client (wikivoyage) was missing a magic word and that causes exception. (would be awesome if a missing magic word does not do that or fails more gracefully)
* I removed the enforcement of initialization order and reverted change to extension-list, which fixes the issue for now.

PS, would be great to have a backup copy of the cache, so we have to wait for everything to rebuild again.
Comment 5 Gerrit Notification Bot 2013-07-25 20:16:47 UTC
Change 75997 had a related patch set uploaded by Aude:
(bug 52038) catch exception when magic word not found and warn

https://gerrit.wikimedia.org/r/75997
Comment 6 Sam Reed (reedy) 2013-07-26 00:32:03 UTC
*** Bug 52040 has been marked as a duplicate of this bug. ***
Comment 7 Andre Klapper 2013-07-26 12:42:10 UTC
(In reply to comment #3)
> We're back up

I assume via reverting the change to extension-list?

Patch in comment 5 seems to require rework.
Comment 8 Sam Reed (reedy) 2013-07-26 12:48:27 UTC
Site is up and functioning. Nothing blocking of highest priority about this bug now
Comment 9 Greg Grossmeier 2013-07-26 16:06:02 UTC
Reedy: can you do a quick write up of this under https://wikitech.wikimedia.org/wiki/Incident_documentation ? Explaining what caused it and what to do/not to do next time would be great.
Comment 10 Aude 2013-07-26 16:28:25 UTC
@andre my patch would only help mitigate the situation in Wikibase.

our magic words are very important but imho not so essential to take the site down vs. having wikidata links appear where they shouldn't, etc.  

Not sure logging the warning is sufficient action though, and the problem with missing magic words will occur again with magic words outside of wikibase.  These sort of exceptions and outages have happened before and guarantee such incident *will* happen again with some other extension or magic word in core.

Open to other suggestions :)
Comment 11 Tyler Romeo 2013-07-26 16:29:17 UTC
I mentioned this on the patch, but why exactly would magic words not be found?
Comment 12 Gerrit Notification Bot 2013-07-26 16:32:49 UTC
Change 75997 abandoned by Aude:
(bug 52038) catch exception when magic word not found and warn

Reason:
nice try, but problems with missing magic words then appear in other places.

https://gerrit.wikimedia.org/r/75997
Comment 13 Aude 2013-07-26 16:35:53 UTC
note, when i try catching the exception, then errors occur elsewhere.

The better option would be to have a script or some sort of check that the mediawiki codebase is fine, not throwing such exceptions, etc. before scapping.

I'm not quite sure how we'd do that ....
Comment 14 Aude 2013-07-26 16:36:43 UTC
@Tyler it happens with localisation cache build is incomplete or something and then is scapped.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links