[go: nahoru, domu]

Page MenuHomePhabricator

Exception: Serialization of 'Closure' is not allowed
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   Exception: Serialization of 'Closure' is not allowed
exception.trace
from /srv/mediawiki/php-1.37.0-wmf.12/includes/libs/objectcache/MemcachedPeclBagOStuff.php(423)
#0 /srv/mediawiki/php-1.37.0-wmf.12/includes/libs/objectcache/MemcachedPeclBagOStuff.php(423): serialize(stdClass)
#1 /srv/mediawiki/php-1.37.0-wmf.12/includes/libs/objectcache/MediumSpecificBagOStuff.php(974): MemcachedPeclBagOStuff->serialize(stdClass)
#2 /srv/mediawiki/php-1.37.0-wmf.12/includes/libs/objectcache/MediumSpecificBagOStuff.php(790): MediumSpecificBagOStuff->getSerialized(stdClass, string)
#3 /srv/mediawiki/php-1.37.0-wmf.12/includes/libs/objectcache/MediumSpecificBagOStuff.php(173): MediumSpecificBagOStuff->makeValueOrSegmentList(string, stdClass, integer, integer)
#4 /srv/mediawiki/php-1.37.0-wmf.12/includes/Storage/PageEditStash.php(489): MediumSpecificBagOStuff->set(string, stdClass, integer, integer)
#5 /srv/mediawiki/php-1.37.0-wmf.12/includes/Storage/PageEditStash.php(172): MediaWiki\Storage\PageEditStash->storeStashValue(string, JsonSchemaContent, ParserOutput, string, User)
#6 /srv/mediawiki/php-1.37.0-wmf.12/includes/api/ApiStashEdit.php(198): MediaWiki\Storage\PageEditStash->parseAndCache(WikiPage, JsonSchemaContent, User, string)
#7 /srv/mediawiki/php-1.37.0-wmf.12/includes/api/ApiMain.php(1747): ApiStashEdit->execute()
#8 /srv/mediawiki/php-1.37.0-wmf.12/includes/api/ApiMain.php(726): ApiMain->executeAction()
#9 /srv/mediawiki/php-1.37.0-wmf.12/includes/api/ApiMain.php(697): ApiMain->executeActionWithErrorHandling()
#10 /srv/mediawiki/php-1.37.0-wmf.12/api.php(90): ApiMain->execute()
#11 /srv/mediawiki/php-1.37.0-wmf.12/api.php(45): wfApiMain()
#12 /srv/mediawiki/w/api.php(3): require(string)
#13 {main}
Impact
Notes

Details

Event Timeline

Krinkle subscribed.

It only happens currently on metawiki during edits for the Schema namespace with a JsonSchemaContent object. So my guess is something regressed in JsonSchemaContent that it is now adding closures to the ParserOutput object, which is invalid.

Retagging EventLogging as the issue is not in the BagOStuff library.

Retagging EventLogging as the issue is not in the BagOStuff library.

PageEditStash creates a stdClass instance that contains the (JsonSchema)Content object and the ParserOutput (coming from (JsonSchema)ContentHandler. One of these apparently contains a Closure for some reason.

Platform Team Workboards (MW Expedition) got tagged since PET has touched PageEditStash recently. But I don't see anything offhand that could have caused this issue.

I have only cursory knowledge of JsonSchemaContentHandler, but I can take a look if nobody else can. We should probably make that call explicitly and at the same time determine exactly who's supposed to be maintaining this. The maintainers page just lists Yuri, who's been gone for... a while: https://www.mediawiki.org/wiki/Developers/Maintainers#MediaWiki_extensions_deployed_at_Wikimedia_Foundation

Krinkle edited projects, added MediaWiki-extensions-EventLogging; removed JsonConfig.

Re-tagging EventLogging. The JsonSchemaContentHandler class is part of that extension.

AFAICT this regression was introduced in rEEVL3c4021e9be27: Replace deprecated usage of Linker::link.

PageEditStash creates a stdClass instance that contains the (JsonSchema)Content object and the ParserOutput (coming from (JsonSchema)ContentHandler. One of these apparently contains a Closure for some reason.

The patch added the JsonSchemaContent::$linkRenderer property, which is initialised to the LinkRenderer instance returned by MediaWikiServices::getLinkRenderer(). The LinkRenderer::$titleFormatter property is initialised to the TitleFormatter instance returned by MediaWikiServices::getTitleFormatter(), an instance of MediaWikiTitleCodec. Finally, the MediaWikiTitleCodec::$createMalformedTitleException property is initialised to a static closure.

Change 954251 had a related patch set uploaded (by Phuedx; author: Phuedx):

[mediawiki/extensions/EventLogging@master] JsonSchemaContent: Remove $revisionLookup and $linkRenderer props

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

Change 954251 merged by jenkins-bot:

[mediawiki/extensions/EventLogging@master] JsonSchemaContent: Remove $revisionLookup and $linkRenderer props

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

phuedx claimed this task.

Being bold.

It would be nice to resolve the underlying design flaw that caused this issue. I added a comment to the patch with some thoughts.