Nothing Special   »   [go: up one dir, main page]

Page MenuHomePhabricator

PHP Notice: Undefined index: Alsjdakjsdh
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error

MediaWiki version: 1.36.0-wmf.26

message
PHP Notice: Undefined index: Alsjdakjsdh

Impact

Only on testwiki so far. But train hasn't gone further than that yet, not even to group0.

Notes

"Alsjdakjsdh" seems like a very weird index name.

Likely caused by 21d6f1c https://gerrit.wikimedia.org/r/c/mediawiki/core/+/649736 (ref T268834).

Details

Request ID
X-2QEApAMMoAAYEFLk0AAAAU
Request URL
https://test.wikipedia.org/w/api.php
Stack Trace
exception.trace
#0 /srv/mediawiki/php-1.36.0-wmf.26/includes/api/ApiQueryInfo.php(504): MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/mediawiki/php-1.36.0-wmf.26/includes/api/ApiQueryInfo.php(426): ApiQueryInfo->extractPageInfo(integer, Title)
#2 /srv/mediawiki/php-1.36.0-wmf.26/includes/api/ApiQuery.php(269): ApiQueryInfo->execute()
#3 /srv/mediawiki/php-1.36.0-wmf.26/includes/api/ApiMain.php(1612): ApiQuery->execute()
#4 /srv/mediawiki/php-1.36.0-wmf.26/includes/api/ApiMain.php(592): ApiMain->executeAction()
#5 /srv/mediawiki/php-1.36.0-wmf.26/includes/api/ApiMain.php(563): ApiMain->executeActionWithErrorHandling()
#6 /srv/mediawiki/php-1.36.0-wmf.26/api.php(90): ApiMain->execute()
#7 /srv/mediawiki/php-1.36.0-wmf.26/api.php(45): wfApiMain()
#8 /srv/mediawiki/w/api.php(3): require(string)
#9 {main}

Event Timeline

LarsWirzenius triaged this task as Unbreak Now! priority.Jan 12 2021, 12:09 PM

Marking Unbreak now, since this to me this feels like something that's likely to explode big time if train reaches somewhere with significant real traffic.

I note that a little later this happened. Still on testwiki. Req-Id X-2QEApAMMoAAYEFLk0AAAAU

PHP Notice: Undefined index: Page4243

Stack trace:

#0 /srv/mediawiki/php-1.36.0-wmf.26/includes/api/ApiQueryInfo.php(504): MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/mediawiki/php-1.36.0-wmf.26/includes/api/ApiQueryInfo.php(426): ApiQueryInfo->extractPageInfo(integer, Title)
#2 /srv/mediawiki/php-1.36.0-wmf.26/includes/api/ApiQuery.php(269): ApiQueryInfo->execute()
#3 /srv/mediawiki/php-1.36.0-wmf.26/includes/api/ApiMain.php(1612): ApiQuery->execute()
#4 /srv/mediawiki/php-1.36.0-wmf.26/includes/api/ApiMain.php(592): ApiMain->executeAction()
#5 /srv/mediawiki/php-1.36.0-wmf.26/includes/api/ApiMain.php(563): ApiMain->executeActionWithErrorHandling()
#6 /srv/mediawiki/php-1.36.0-wmf.26/api.php(90): ApiMain->execute()
#7 /srv/mediawiki/php-1.36.0-wmf.26/api.php(45): wfApiMain()
#8 /srv/mediawiki/w/api.php(3): require(string)
#9 {main}

From the original error:

URL: /w/api.php
Server: test.wikipedia.org
referrer: https://test.wikipedia.org/wiki/Special:ApiSandbox
message:
[X-2QEApAMMoAAYEFLk0AAAAU] /w/api.php ErrorException from line 504 of /srv/mediawiki/php-1.36.0-wmf.26/includes/api/ApiQueryInfo.php: PHP Notice: Undefined index: Alsjdakjsdh
reqId: X-2QEApAMMoAAYEFLk0AAAAU

To clarify, it's a POST request. There are no URL parameters, and logstash doesn't log the request body.

Yes. This conditional is missing an isset() call:

$this->fld_watched && $this->watched && $this->watched[$ns][$dbkey]

should be

$this->fld_watched && isset( $this->watched[$ns][$dbkey] )

Change 655665 had a related patch set uploaded (by Daniel Kinzler; owner: Daniel Kinzler):
[mediawiki/core@master] Fix undefined index error in ApiQueryInfo

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

Triggered by requesting page info of non-existing pages. Should be fixed by the patch I just uploaded.

Triggered by requesting page info of non-existing pages. Should be fixed by the patch I just uploaded.

Yes, exactly right. This was me testing/comparing T268834#6739312, and keyboard mashing to get a page that I knew didn't exist (and thus wouldn't be watched and would be missing).

Change 655665 merged by jenkins-bot:
[mediawiki/core@master] Fix undefined index error in ApiQueryInfo

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

Change 655671 had a related patch set uploaded (by ArielGlenn; owner: Daniel Kinzler):
[mediawiki/core@wmf/1.36.0-wmf.26] Fix undefined index error in ApiQueryInfo

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

In T271804#6739408, RhinosF1 wrote:

Yes. This conditional is missing an isset() call:

$this->fld_watched && $this->watched && $this->watched[$ns][$dbkey]

should be

$this->fld_watched && isset( $this->watched[$ns][$dbkey] )

Sorry about that, and thanks for the quick fix!

Change 655671 merged by jenkins-bot:
[mediawiki/core@wmf/1.36.0-wmf.26] Fix undefined index error in ApiQueryInfo

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

The above patch was deployed and seems to fix the issue; would the reporter like to test?

ArielGlenn claimed this task.

Being bold.