Page MenuHomePhabricator

Notice: Uninitialized string offset: 0 in /srv/mediawiki/php-1.32.0-wmf.20/extensions/CentralAuth/includes/specials/SpecialGlobalGroupMembership.php on line 102
Closed, ResolvedPublicPRODUCTION ERROR

Description

Heading to https://meta.wikimedia.org/wiki/Special:GlobalUserRights and submitting the form without filling a username cause:

#0 /srv/mediawiki/php-1.32.0-wmf.20/extensions/CentralAuth/includes/specials/SpecialGlobalGroupMembership.php(102): MWExceptionHandler::handleError(integer, string, string, integer, array, array)
#1 /srv/mediawiki/php-1.32.0-wmf.20/includes/specials/SpecialUserrights.php(469): SpecialGlobalGroupMembership->fetchUser(string, boolean)
#2 /srv/mediawiki/php-1.32.0-wmf.20/includes/specials/SpecialUserrights.php(199): UserrightsPage->editUserGroupsForm(string)
#3 /srv/mediawiki/php-1.32.0-wmf.20/includes/specialpage/SpecialPage.php(569): UserrightsPage->execute(string)
#4 /srv/mediawiki/php-1.32.0-wmf.20/includes/specialpage/SpecialPageFactory.php(581): SpecialPage->run(string)
#5 /srv/mediawiki/php-1.32.0-wmf.20/includes/MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)
#6 /srv/mediawiki/php-1.32.0-wmf.20/includes/MediaWiki.php(868): MediaWiki->performRequest()
#7 /srv/mediawiki/php-1.32.0-wmf.20/includes/MediaWiki.php(525): MediaWiki->main()
#8 /srv/mediawiki/php-1.32.0-wmf.20/index.php(42): MediaWiki->run()
#9 /srv/mediawiki/w/index.php(3): include(string)
#10 {main}
includes/specials/SpecialGlobalGroupMembership.php
101     function fetchUser( $username, $writing = true ) {
102         if ( $username[0] == '#' ) {   // <----------------------------------------------- oops
103             $id = intval( substr( $username, 1 ) );
104             $user = CentralAuthGroupMembershipProxy::newFromId( $id );
105 
106             if ( !$user ) {
107                 return Status::newFatal( 'noname', $id );
108             }
109         } else {
110             $user = CentralAuthGroupMembershipProxy::newFromName( $username );
111 
112             if ( !$user ) {
113                 return Status::newFatal( 'nosuchusershort', $username );
114             }
115         }
116 
117         return Status::newGood( $user );
118     }

From Special:GlobalUserRights

Event Timeline

Dunno what causes it but WORKSFORME.

(Global rights log); 22:49 . . -revi (A/S) (talk | contribs | block) changed global group membership for User:Gisado from global-ipblock-exempt, oathauth-tester to oathauth-tester ‎(Done)
(Global rights log); 22:49 . . -revi (A/S) (talk | contribs | block) changed global group membership for User:Gisado from oathauth-tester to oathauth-tester, global-ipblock-exempt ‎(Testing (with not-so-harmful right))

WORKSFORME TOO

(change visibility) 14:09, 7 September 2018 علاء (talk | contribs | block) changed global group membership for User:Alaa from oathauth-tester to (none) (T203767 (Test - My account))
(change visibility) 14:09, 7 September 2018 علاء (talk | contribs | block) changed global group membership for User:Alaa from (none) to oathauth-tester (T203767 (Test - My account))
MarcoAurelio lowered the priority of this task from Unbreak Now! to Medium.Sep 7 2018, 3:10 PM

@hashar Where did you spotted this exactly? Which were the steps you followed to encounter this error? Thanks.

The message comes from the Wikimedia log, I have just copy pasted it with out much investigation. Looking at it again there have been only 10 occurrences over the last 24 hours.

That comes from 3ac7f4c5200d0c1d53fd2aaece5bc56406b01eb6

SpecialGlobalGroupMembership::fetchUser( $username, $writing = true ); would cause the notice when $username is an empty string?

I went to https://meta.wikimedia.org/wiki/Special:GlobalUserRights , clicked the button without filling a username and that triggers the notice :]

hashar lowered the priority of this task from Medium to Low.Sep 7 2018, 10:16 PM
hashar updated the task description. (Show Details)
Krinkle subscribed.

Unless limited to mwdebug or test wikis etc., this appears production. All noise there is actively harming our ability to detect regressions, and is clearly a sign of technical debt or application logic failure that needs to be addressed.

We have 100s of infrequent errors that together make it hard to detect problems. Infrequent errors are actually more harmful than frequent ones because the frequent ones you see immediately when starting to poll the logs and can exclude. It is the infrequent ones that show up only a few minutes after you begin polling and it is a full time job to exclude each one after you first see it. This needs to be fixed.

Change 464647 had a related patch set uploaded (by Melos; owner: Melos):
[mediawiki/extensions/CentralAuth@master] Fix error when no user is specified in Special:GlobalUserRights

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

Legoktm assigned this task to Melos.

Change 464647 merged by jenkins-bot:
[mediawiki/extensions/CentralAuth@master] Fix error when no user is specified in Special:GlobalUserRights

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

Change 467102 had a related patch set uploaded (by Krinkle; owner: Melos):
[mediawiki/extensions/CentralAuth@wmf/1.32.0-wmf.24] Fix error when no user is specified in Special:GlobalUserRights

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

Change 467102 merged by jenkins-bot:
[mediawiki/extensions/CentralAuth@wmf/1.32.0-wmf.24] Fix error when no user is specified in Special:GlobalUserRights

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

Mentioned in SAL (#wikimedia-operations) [2018-10-14T00:48:56Z] <krinkle@deploy1001> Synchronized php-1.32.0-wmf.24/extensions/CentralAuth/includes/specials/SpecialGlobalGroupMembership.php: T203767 - If2bfa092b (duration: 00m 50s)

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