Page MenuHomePhabricator

[Regression] Flow: Fatal exception "DatabaseBase::makeList: empty input for field rev_id" on Special:Contributions
Closed, ResolvedPublic

Description

[c35189b5] 2014-03-14 04:18:47: Fatal exception of type MWException

Steps to reproduce:

  1. Go to https://www.mediawiki.org/wiki/Special:Contributions/PiRSquared17
  2. See the big red box, etc.

Version: master
Severity: blocker

Details

Reference
bz62634

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:09 AM
bzimport set Reference to bz62634.
bzimport added a subscriber: Unknown Object (MLST).

Looks like an issue in Flow. Here's the full stack trace:

2014-03-14 04:21:39 mw1216 mediawikiwiki: [092abf1b] /wiki/Special:Contributions/PiRSquared17 Exception from line 2031 of /usr/local/apache/common-local/php-1.23wmf18/includes/db/Database.php: DatabaseBase::makeList: empty input for field rev_id
#0 /usr/local/apache/common-local/php-1.23wmf18/includes/db/Database.php(1641): DatabaseBase->makeList(Array, 1)
#1 /usr/local/apache/common-local/php-1.23wmf18/includes/db/Database.php(1589): DatabaseBase->selectSQLText(Array, '*', Array, 'Flow\Data\Revis...', Array, Array)
#2 /usr/local/apache/common-local/php-1.23wmf18/extensions/Flow/includes/Data/RevisionStorage.php(224): DatabaseBase->select(Array, '*', Array, 'Flow\Data\Revis...', Array, Array)
#3 /usr/local/apache/common-local/php-1.23wmf18/extensions/Flow/includes/Data/RevisionStorage.php(163): Flow\Data\RevisionStorage->findRevIdReal(Object(Flow\Data\ResultDuplicator), Array)
#4 /usr/local/apache/common-local/php-1.23wmf18/extensions/Flow/includes/Data/RevisionStorage.php(117): Flow\Data\RevisionStorage->findRevId(Array)
#5 /usr/local/apache/common-local/php-1.23wmf18/extensions/Flow/includes/Data/RevisionStorage.php(94): Flow\Data\RevisionStorage->findMultiInternal(Array, Array)
#6 /usr/local/apache/common-local/php-1.23wmf18/extensions/Flow/includes/Data/ObjectManager.php(1464): Flow\Data\RevisionStorage->findMulti(Array, Array)
#7 /usr/local/apache/common-local/php-1.23wmf18/extensions/Flow/includes/Data/ObjectManager.php(1320): Flow\Data\FeatureIndex->backingStoreFindMulti(Array, Array)
#8 /usr/local/apache/common-local/php-1.23wmf18/extensions/Flow/includes/Data/ObjectManager.php(319): Flow\Data\FeatureIndex->findMulti(Array, Array)
#9 /usr/local/apache/common-local/php-1.23wmf18/extensions/Flow/includes/Data/ObjectManager.php(409): Flow\Data\ObjectLocator->findMulti(Array)
#10 [internal function]: Flow\Data\ObjectLocator->getMulti(Array)
#11 /usr/local/apache/common-local/php-1.23wmf18/extensions/Flow/includes/Data/ObjectManager.php(223): call_user_func_array(Array, Array)
#12 /usr/local/apache/common-local/php-1.23wmf18/extensions/Flow/includes/Data/ObjectManager.php(231): Flow\Data\ManagerGroup->call('getMulti', Array)
#13 /usr/local/apache/common-local/php-1.23wmf18/extensions/Flow/includes/Formatter/ContributionsQuery.php(168): Flow\Data\ManagerGroup->getMulti('Flow\Model\Post...', Array)
#14 /usr/local/apache/common-local/php-1.23wmf18/extensions/Flow/includes/Formatter/ContributionsQuery.php(98): Flow\Formatter\ContributionsQuery->loadMetadataBatch(Array)
#15 /usr/local/apache/common-local/php-1.23wmf18/extensions/Flow/Hooks.php(386): Flow\Formatter\ContributionsQuery->getResults(Object(ContribsPager), '', 51, false)
#16 [internal function]: FlowHooks::onContributionsQuery(Array, Object(ContribsPager), '', 51, false)
#17 /usr/local/apache/common-local/php-1.23wmf18/includes/Hooks.php(206): call_user_func_array('FlowHooks::onCo...', Array)
#18 /usr/local/apache/common-local/php-1.23wmf18/includes/GlobalFunctions.php(4011): Hooks::run('ContribsPager::...', Array, NULL)
#19 /usr/local/apache/common-local/php-1.23wmf18/includes/specials/SpecialContributions.php(737): wfRunHooks('ContribsPager::...', Array)
#20 /usr/local/apache/common-local/php-1.23wmf18/includes/Pager.php(226): ContribsPager->reallyDoQuery('', 51, false)
#21 /usr/local/apache/common-local/php-1.23wmf18/includes/Pager.php(552): IndexPager->doQuery()
#22 /usr/local/apache/common-local/php-1.23wmf18/includes/specials/SpecialContributions.php(197): IndexPager->getNumRows()
#23 /usr/local/apache/common-local/php-1.23wmf18/includes/specialpage/SpecialPage.php(374): SpecialContributions->execute('PiRSquared17')
#24 /usr/local/apache/common-local/php-1.23wmf18/includes/specialpage/SpecialPageFactory.php(489): SpecialPage->run('PiRSquared17')
#25 /usr/local/apache/common-local/php-1.23wmf18/includes/Wiki.php(285): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#26 /usr/local/apache/common-local/php-1.23wmf18/includes/Wiki.php(588): MediaWiki->performRequest()
#27 /usr/local/apache/common-local/php-1.23wmf18/includes/Wiki.php(447): MediaWiki->main()
#28 /usr/local/apache/common-local/php-1.23wmf18/index.php(49): MediaWiki->run()
#29 /usr/local/apache/common-local/w/index.php(3): require('/usr/local/apac...')
#30 {main}

setting the severity/importance etc flags as this is a bad regression.

Seems to work now, but it might break again.

Change 118694 had a related patch set uploaded by Matthias Mullie:
(bug 62634) Fatal exception "DatabaseBase::makeList: empty input for field rev_id" on Special:Contributions

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

Fix is in Gerrit.

The reason it happens inconsistently is because:

  • this bad code path was only executed when fetching previous revisions of the Flow entries in your contributions list (e.g. for edit/moderate entries - new additions don't have previous revisions)
  • and only executed when there are >3 such entries (otherwise, another query is done)

Anyway, above patch should fix this.

Thanks Matthias!

Can you get this reviewed/merged this weekend (so it goes to Beta Cluster) then prepare a backport for wmf18 to go out on Monday? There are two "SWAT deploy team" slots, 8am and 4pm Pacific. It's the first week of it, so let's have you test it out ;)

https://wikitech.wikimedia.org/wiki/SWAT_deploys and https://wikitech.wikimedia.org/wiki/Deployments#Week_of_March_17th

Change 118694 merged by jenkins-bot:
(bug 62634) Fatal exception "DatabaseBase::makeList: empty input for field rev_id" on Special:Contributions

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

Setting to blocker since this needs to be fixed before more Flow deployments.

A fix for this is scheduled to be deployed on Monday.

Change 118741 had a related patch set uploaded by Spage:
(bug 62634) Fatal exception "DatabaseBase::makeList: empty input for field rev_id" on Special:Contributions

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

Change 118741 merged by jenkins-bot:
(bug 62634) Fatal exception "DatabaseBase::makeList: empty input for field rev_id" on Special:Contributions

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