Page MenuHomePhabricator

Creating a Collaboration Hub on beta-enwiki leads to error
Closed, ResolvedPublic

Description

When trying to create a Collaboration Hub at https://en.wikipedia.beta.wmflabs.org/wiki/Special:CreateCollaborationHub, this happens:

[WNAl5gpEE4AAAFWGu8AAAAAK] [no req] BadMethodCallException from line 435 of /srv/mediawiki/php-master/extensions/CollaborationKit/includes/content/CollaborationHubContent.php: Call to a member function getContent() on a non-object (null)

Backtrace:

#0 /srv/mediawiki/php-master/extensions/CollaborationKit/includes/content/CollaborationHubContent.php(298): CollaborationHubContent->getMembersBlock(Title, ParserOptions, ParserOutput)
#1 /srv/mediawiki/php-master/includes/content/AbstractContent.php(497): CollaborationHubContent->fillParserOutput(Title, NULL, ParserOptions, boolean, ParserOutput)
#2 /srv/mediawiki/php-master/includes/page/WikiPage.php(2104): AbstractContent->getParserOutput(Title, NULL, ParserOptions)
#3 /srv/mediawiki/php-master/extensions/SpamBlacklist/SpamBlacklistHooks.php(37): WikiPage->prepareContentForEdit(CollaborationHubContent)
#4 /srv/mediawiki/php-master/includes/Hooks.php(186): SpamBlacklistHooks::filterMergedContent(RequestContext, CollaborationHubContent, Status, string, User, boolean)
#5 /srv/mediawiki/php-master/includes/EditPage.php(1629): Hooks::run(string, array)
#6 /srv/mediawiki/php-master/includes/EditPage.php(1921): EditPage->runPostMergeFilters(CollaborationHubContent, Status, User)
#7 /srv/mediawiki/php-master/includes/EditPage.php(1470): EditPage->internalAttemptSave(NULL, boolean)
#8 /srv/mediawiki/php-master/includes/api/ApiEditPage.php(396): EditPage->attemptSave(NULL)
#9 /srv/mediawiki/php-master/includes/api/ApiMain.php(1543): ApiEditPage->execute()
#10 /srv/mediawiki/php-master/includes/api/ApiMain.php(513): ApiMain->executeAction()
#11 /srv/mediawiki/php-master/extensions/CollaborationKit/includes/content/CollaborationHubContentHandler.php(185): ApiMain->execute()
#12 /srv/mediawiki/php-master/extensions/CollaborationKit/includes/SpecialCreateCollaborationHub.php(228): CollaborationHubContentHandler::edit(Title, string, string, string, string, string, array, string, RequestContext)
#13 /srv/mediawiki/php-master/includes/htmlform/HTMLForm.php(663): SpecialCreateCollaborationHub->onSubmit(array, OOUIHTMLForm)
#14 /srv/mediawiki/php-master/includes/htmlform/HTMLForm.php(555): HTMLForm->trySubmit()
#15 /srv/mediawiki/php-master/includes/htmlform/HTMLForm.php(570): HTMLForm->tryAuthorizedSubmit()
#16 /srv/mediawiki/php-master/includes/specialpage/FormSpecialPage.php(155): HTMLForm->show()
#17 /srv/mediawiki/php-master/extensions/CollaborationKit/includes/SpecialCreateCollaborationHub.php(34): FormSpecialPage->execute(NULL)
#18 /srv/mediawiki/php-master/includes/specialpage/SpecialPage.php(522): SpecialCreateCollaborationHub->execute(NULL)
#19 /srv/mediawiki/php-master/includes/specialpage/SpecialPageFactory.php(576): SpecialPage->run(NULL)
#20 /srv/mediawiki/php-master/includes/MediaWiki.php(285): SpecialPageFactory::executePath(Title, RequestContext)
#21 /srv/mediawiki/php-master/includes/MediaWiki.php(860): MediaWiki->performRequest()
#22 /srv/mediawiki/php-master/includes/MediaWiki.php(521): MediaWiki->main()
#23 /srv/mediawiki/php-master/index.php(43): MediaWiki->run()
#24 /srv/mediawiki/w/index.php(3): include(string)
#25 {main}

Event Timeline

Harej triaged this task as High priority.Mar 20 2017, 7:05 PM

I cannot reproduce this bug on my localhost wiki after updating it to the latest MediaWiki master, so I think this has to do with how the Beta Cluster works.

Change 343731 had a related patch set uploaded (by Reedy):
[mediawiki/extensions/CollaborationKit] Read Revision from DB_MASTER after creation

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

Change 343731 merged by jenkins-bot:
[mediawiki/extensions/CollaborationKit] Read Revision from DB_MASTER after creation

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

Still appears to be happening:

[WNBGuApEE4AAAAMypxQAAAAE] [no req] BadMethodCallException from line 453 of /srv/mediawiki/php-master/extensions/CollaborationKit/includes/content/CollaborationHubContent.php: Call to a member function convertToWikitext() on a non-object (null)

Backtrace:

#0 /srv/mediawiki/php-master/extensions/CollaborationKit/includes/content/CollaborationHubContent.php(298): CollaborationHubContent->getMembersBlock(Title, ParserOptions, ParserOutput)
#1 /srv/mediawiki/php-master/includes/content/AbstractContent.php(497): CollaborationHubContent->fillParserOutput(Title, NULL, ParserOptions, boolean, ParserOutput)
#2 /srv/mediawiki/php-master/includes/page/WikiPage.php(2104): AbstractContent->getParserOutput(Title, NULL, ParserOptions)
#3 /srv/mediawiki/php-master/extensions/SpamBlacklist/SpamBlacklistHooks.php(37): WikiPage->prepareContentForEdit(CollaborationHubContent)
#4 /srv/mediawiki/php-master/includes/Hooks.php(186): SpamBlacklistHooks::filterMergedContent(RequestContext, CollaborationHubContent, Status, string, User, boolean)
#5 /srv/mediawiki/php-master/includes/EditPage.php(1629): Hooks::run(string, array)
#6 /srv/mediawiki/php-master/includes/EditPage.php(1921): EditPage->runPostMergeFilters(CollaborationHubContent, Status, User)
#7 /srv/mediawiki/php-master/includes/EditPage.php(1470): EditPage->internalAttemptSave(NULL, boolean)
#8 /srv/mediawiki/php-master/includes/api/ApiEditPage.php(396): EditPage->attemptSave(NULL)
#9 /srv/mediawiki/php-master/includes/api/ApiMain.php(1543): ApiEditPage->execute()
#10 /srv/mediawiki/php-master/includes/api/ApiMain.php(513): ApiMain->executeAction()
#11 /srv/mediawiki/php-master/extensions/CollaborationKit/includes/content/CollaborationHubContentHandler.php(185): ApiMain->execute()
#12 /srv/mediawiki/php-master/extensions/CollaborationKit/includes/SpecialCreateCollaborationHub.php(228): CollaborationHubContentHandler::edit(Title, string, string, string, string, string, array, string, RequestContext)
#13 /srv/mediawiki/php-master/includes/htmlform/HTMLForm.php(663): SpecialCreateCollaborationHub->onSubmit(array, OOUIHTMLForm)
#14 /srv/mediawiki/php-master/includes/htmlform/HTMLForm.php(555): HTMLForm->trySubmit()
#15 /srv/mediawiki/php-master/includes/htmlform/HTMLForm.php(570): HTMLForm->tryAuthorizedSubmit()
#16 /srv/mediawiki/php-master/includes/specialpage/FormSpecialPage.php(155): HTMLForm->show()
#17 /srv/mediawiki/php-master/extensions/CollaborationKit/includes/SpecialCreateCollaborationHub.php(34): FormSpecialPage->execute(NULL)
#18 /srv/mediawiki/php-master/includes/specialpage/SpecialPage.php(522): SpecialCreateCollaborationHub->execute(NULL)
#19 /srv/mediawiki/php-master/includes/specialpage/SpecialPageFactory.php(576): SpecialPage->run(NULL)
#20 /srv/mediawiki/php-master/includes/MediaWiki.php(285): SpecialPageFactory::executePath(Title, RequestContext)
#21 /srv/mediawiki/php-master/includes/MediaWiki.php(860): MediaWiki->performRequest()
#22 /srv/mediawiki/php-master/includes/MediaWiki.php(521): MediaWiki->main()
#23 /srv/mediawiki/php-master/index.php(43): MediaWiki->run()
#24 /srv/mediawiki/w/index.php(3): include(string)
#25 {main}

So unless it was fluke, there is/was some race condition caused by replication lag

We've got a valid revision object now, but it's falling over after getting the content object, which is seemingly returning null

Which could be a permissions error, an unserialisation error...

Change 343977 had a related patch set uploaded (by Brian Wolff):
[mediawiki/extensions/CollaborationKit] Be more defensive about checking revision is present

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

The other suggestion is some uncommitted transaction...

Change 343977 merged by jenkins-bot:
[mediawiki/extensions/CollaborationKit@master] Be more defensive about checking revision is present

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

I think @Bawolff's patches fixed this, but now that we can actually get past the creation step, we have uncovered more bugs.