Page MenuHomePhabricator

Fatal exception of type "Flow\Exception\InvalidDataException" when disable structured discussions board on zhwiki
Closed, ResolvedPublicPRODUCTION ERROR

Description

Yesterday user 鱼头炮 on zhwiki wanted to disable the structured discussions board on his talk page, so he clicked the corresponding button in beta feature on the preference page and saved changes. However, after he saved, he found his talk page unable for access, and returned

[W3uqQwpAME8AAGZAc@QAAAAS] 2018-08-21 05:59:31: Fatal exception of type "Flow\Exception\InvalidDataException"

Please help to fix this problem, thanks.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Aklapper renamed this task from Failed when disable structured discussions board on zhwiki to Fatal exception of type "Flow\Exception\InvalidDataException" when disable structured discussions board on zhwiki.Aug 21 2018, 6:54 AM
kostajh claimed this task.
kostajh added subscribers: SBisson, kostajh.

@SBisson ran the mediawiki/extensions/Flow/maintenance/FlowFixInconsistentBoards.php script today to fix this user's talk page; we're investigating the root cause in T70526: Flow: InvalidDataException "Flow workflow is for different page" from WorkflowLoaderFactory.php.

Sorry to bother...but the same problem occurred again. 鱼头炮 said he clicked the "disable structured discussions board" button and saved changes in "preference", and 'Fatal exception of type "Flow\Exception\InvalidDataException" ' error appeared again.

Sorry to bother...but the same problem occurred again.

No problem, thank you for re-opening and letting us know about the issue, I'm sorry it's not sorted out yet. We want to get it fixed! :)

鱼头炮 said he clicked the "disable structured discussions board" button and saved changes in "preference", and 'Fatal exception of type "Flow\Exception\InvalidDataException" ' error appeared again.

My suspicion (noted in T70526#4531691) was that the Flow talk manager bot failed to move flow boards for users whose talk pages were protected. However as far as I can tell, 鱼头炮's talk page is not protected, so it's unclear to me what's happening here.

In the logs, I see that an exception is thrown by Flow's OptInController and the message in the log contains the text:

'''You can't currently edit Wikipedia'''
'''You can browse the page ''' but can't edit, move or create a page

This shouldn't be a problem, though, because it's supposed to be Flow talk manager bot that archives the flow board and moves the old talk page back into place. And in theory, if a failure like this occurs, Flow is supposed to roll the Flow and Mediawiki DB back to a known good state but that doesn't appear to be working properly.

I'll keep looking into it and let you know what I can figure out.

Note that the log message you're talking about begins with {| id="mw-blocked-text" . It looks like this is https://zh.wikipedia.org/w/index.php?title=MediaWiki:Blockedtext&action=edit . So there's definitely a failure related to a user being blocked.

The backtrace is:

#0 /srv/mediawiki/php-1.32.0-wmf.18/extensions/Flow/includes/Import/OptInController.php(550): Flow\Import\OptInController->fatal(Message)
#1 /srv/mediawiki/php-1.32.0-wmf.18/extensions/Flow/includes/Import/OptInController.php(680): Flow\Import\OptInController->editBoardDescription(Title, Closure$Flow\Import\OptInController::archiveFlowBoard;4169, string)
#2 /srv/mediawiki/php-1.32.0-wmf.18/extensions/Flow/includes/Import/OptInController.php(183): Flow\Import\OptInController->archiveFlowBoard(Title)
#3 /srv/mediawiki/php-1.32.0-wmf.18/extensions/Flow/includes/Import/OptInController.php(119): Flow\Import\OptInController->disable(Title)
#4 /srv/mediawiki/php-1.32.0-wmf.18/includes/deferred/MWCallableUpdate.php(34): Closure$Flow\Import\OptInController::initiateChange()
#5 /srv/mediawiki/php-1.32.0-wmf.18/includes/deferred/DeferredUpdates.php(268): MWCallableUpdate->doUpdate()
#6 /srv/mediawiki/php-1.32.0-wmf.18/includes/deferred/DeferredUpdates.php(214): DeferredUpdates::runUpdate(MWCallableUpdate, Wikimedia\Rdbms\LBFactoryMulti, string, integer)
#7 /srv/mediawiki/php-1.32.0-wmf.18/includes/deferred/DeferredUpdates.php(134): DeferredUpdates::execute(array, string, integer)
#8 /srv/mediawiki/php-1.32.0-wmf.18/includes/MediaWiki.php(914): DeferredUpdates::doUpdates(string)
#9 /srv/mediawiki/php-1.32.0-wmf.18/includes/MediaWiki.php(734): MediaWiki->restInPeace(string, boolean)
#10 [internal function]: Closure$MediaWiki::doPostOutputShutdown()
#11 {main}

I'm not sure why this happens though, because editBoardDescription() passes in a RequestContext that has been modified (by the OptInController constructor) to have the user set to the Flow talk page manager user rather than the talk page's owner, and as far as I can tell this seems to be propagated correctly by the rest of the code. The source of the blocked message appears to be line 88 of SubmissionHandler.php, which is not at all deep in the call stack from editBoardDescription.

@Cosine02 sorry for the slow progress on this one. It has been quite difficult to track down, as we cannot reproduce it in our development environments. I've added some logging statements, so the next time 鱼头炮 tries to disable structured discussions we should have some more information to help debug.

@Cosine02 Flow is disabled for this user's talk page: https://zh.wikipedia.org/wiki/User_talk:鱼头炮 Please let us know if this issue occurs again either for this user or for another user on zhwiki -- you can re-open this task or file a new one. I'm marking this task as resolved for now.

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