Page MenuHomePhabricator

VisualEditorDataModule triggers "Sessions are disabled for this entry point"
Closed, ResolvedPublic0 Story Points

Description

Starting this morning (May 24, 2016) I get the following error when I load any page on my local setup (mw-vagrant):

/w/load.php?debug=true&lang=en&modules=startup&only=scripts&skin=vector BadMethodCallException from line 1025 of /vagrant/mediawiki/includes/session/SessionManager.php: Sessions are disabled for this entry point

This is the backtrace:

<ul>
<li>SessionManager.php line 1025 calls wfBacktrace()</li>
<li>SessionManager.php line 187 calls MediaWiki\Session\SessionManager->getSessionFromInfo()</li>
<li>WebRequest.php line 703 calls MediaWiki\Session\SessionManager->getSessionForRequest()</li>
<li>User.php line 1247 calls WebRequest->getSession()</li>
<li>User.php line 409 calls User->loadFromSession()</li>
<li>User.php line 5325 calls User->load()</li>
<li>User.php line 2897 calls User->loadOptions()</li>
<li>User.php line 2967 calls User->getOption()</li>
<li>User.php line 3258 calls User->getIntOption()</li>
<li>Linker.php line 221 calls User->getStubThreshold()</li>
<li>LinkHolderArray.php line 406 calls Linker::link()</li>
<li>LinkHolderArray.php line 271 calls LinkHolderArray->replaceInternal()</li>
<li>Parser.php line 4808 calls LinkHolderArray->replace()</li>
<li>Parser.php line 1300 calls Parser->replaceLinkHolders()</li>
<li>Parser.php line 435 calls Parser->internalParseHalfParsed()</li>
<li>MessageCache.php line 1103 calls Parser->parse()</li>
<li>Message.php line 1135 calls MessageCache->parse()</li>
<li>Message.php line 817 calls Message->parseText()</li>
<li>Message.php line 873 calls Message->toString()</li>
<li>VisualEditorDataModule.php line 25 calls Message->parse()</li>
<li>ResourceLoaderModule.php line 578 calls VisualEditorDataModule->getScript()</li>
<li>ResourceLoaderModule.php line 546 calls ResourceLoaderModule->buildContent()</li>
<li>ResourceLoaderModule.php line 694 calls ResourceLoaderModule->getModuleContent()</li>
<li>ResourceLoader.php line 622 calls ResourceLoaderModule->getVersionHash()</li>
<li>- line - calls ResourceLoader->{closure}()</li>
<li>ResourceLoader.php line 623 calls array_map()</li>
<li>ResourceLoaderStartUpModule.php line 406 calls ResourceLoader->getCombinedVersion()</li>
<li>ResourceLoaderStartUpModule.php line 379 calls ResourceLoaderStartUpModule->getAllModuleHashes()</li>
<li>ResourceLoaderModule.php line 697 calls ResourceLoaderStartUpModule->getDefinitionSummary()</li>
<li>ResourceLoader.php line 622 calls ResourceLoaderModule->getVersionHash()</li>
<li>- line - calls ResourceLoader->{closure}()</li>
<li>ResourceLoader.php line 623 calls array_map()</li>
<li>ResourceLoader.php line 675 calls ResourceLoader->getCombinedVersion()</li>
<li>load.php line 46 calls ResourceLoader->respond()</li>
<li>load.php line 5 calls require()</li>
</ul>

Event Timeline

SBisson created this task.May 24 2016, 7:44 PM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptMay 24 2016, 7:44 PM
Anomie added a subscriber: Legoktm.

Caused by https://gerrit.wikimedia.org/r/#/c/284750/, paging @Legoktm.

What's going on here is that Linker::link() did not try to access $wgUser if the options contained 'noclasses' or 'broken'. Now it accesses $wgUser unconditionally, which means that calls like LinkHolderArray.php line 405 would now have to pass the 'stubThreshold' option to avoid blowing up when called from load.php. You'll probably want to audit other calls to Linker::link() for the same behavior change, or else figure out a way to restore the conditionality.

I also see this on mediawiki.org, for example V0VGZwpAMEcAAHNfnrMAAAHO in logstash.

mmodell triaged this task as Unbreak Now! priority.May 25 2016, 7:40 PM
Restricted Application added subscribers: Luke081515, TerraCodes, Urbanecm. · View Herald TranscriptMay 25 2016, 7:40 PM

Change 290743 had a related patch set uploaded (by Gergő Tisza):
Do not use $wgUser in Linker/LinkRenderer when sessions are disabled

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

Change 290743 merged by jenkins-bot:
Do not use $wgUser in Linker/LinkRenderer when sessions are disabled

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

Change 290799 had a related patch set uploaded (by 20after4):
Do not use $wgUser in Linker/LinkRenderer when sessions are disabled

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

Change 290799 merged by jenkins-bot:
Do not use $wgUser in Linker/LinkRenderer when sessions are disabled

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

mmodell closed this task as Resolved.May 25 2016, 10:07 PM
mmodell claimed this task.
mmodell added a subscriber: mmodell.

seems like the error rate has come back down to normal levels.

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