Page MenuHomePhabricator

list=allusers with auprop=group throws a MWException at user:%95
Closed, ResolvedPublic

Description

Author: lolol0l0l

Description:
This bug was seen on Wikipedia English. Special:Version states the version in use is r107965.

For a few pages of list=allusers in the API, the iteration is fine, returning the next 500 users correctly.

At the user $champange$, however, processing one of the 500 users to be returned causes the following error:

CODE: internal_api_error_MWException
INFO: Exception Caught: Internal error in ApiResult::setIndexedTagName: Bad parameter

#0 /usr/local/apache/common-local/php-1.18/includes/api/ApiBase.php(1255): wfDebugDieBacktrace('Internal error ...')
#1 /usr/local/apache/common-local/php-1.18/includes/api/ApiResult.php(202): ApiBase::dieDebug('ApiResult::setI...', 'Bad parameter')
#2 /usr/local/apache/common-local/php-1.18/includes/api/ApiQueryAllUsers.php(249): ApiResult->setIndexedTagName(NULL, 'g')
#3 /usr/local/apache/common-local/php-1.18/includes/api/ApiQuery.php(270): ApiQueryAllUsers->execute()
#4 /usr/local/apache/common-local/php-1.18/includes/api/ApiMain.php(692): ApiQuery->execute()
#5 /usr/local/apache/common-local/php-1.18/includes/api/ApiMain.php(358): ApiMain->executeAction()
#6 /usr/local/apache/common-local/php-1.18/includes/api/ApiMain.php(342): ApiMain->executeActionWithErrorHandling()
#7 /usr/local/apache/common-local/php-1.18/api.php(115): ApiMain->execute()
#8 /usr/local/apache/common-local/live-1.5/api.php(3): require('/usr/local/apac...')
#9 {main}


Version: 1.18.x
Severity: normal
URL: http://en.wikipedia.org/w/api.php?action=query&aufrom=%24champange%24&aulimit=max&auprop=editcount|groups&format=xml&list=allusers

Details

Reference
bz33602

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 12:03 AM
bzimport added a project: MediaWiki-API.
bzimport set Reference to bz33602.
bzimport added a subscriber: Unknown Object (MLST).

It seems to be related to [[user:%95]] - which is an invalid title.

More concise example queries:
http://en.wikipedia.org/w/api.php?action=query&aufrom=%258&aulimit=1&list=allusers&format=xml is fine, but upping the limit to 2 gives auinvalidtitle - http://en.wikipedia.org/w/api.php?action=query&aufrom=%258&aulimit=2&list=allusers&format=xml (Upping the limit past 2 for that query makes it ok - so error trying to make query-continue for user:%95 presumably)

If setting auprop=groups, the exception is generated if user:%95 is in the result set. For example: http://en.wikipedia.org/w/api.php?action=query&aufrom=%258&aulimit=3&list=allusers&format=xml&auprop=groups (Presumably some title normalization is done when querying the other table)

Setting "High" so that we don't lose track things that result in backtraces.

beau wrote:

I have submitted a change https://gerrit.wikimedia.org/r/#q,I7d115e734cb8c93dcf6dc3b98bdbc81975951273,n,z for review. It does not solve all issues yet.

beau wrote:

*** Bug 35898 has been marked as a duplicate of this bug. ***