Page MenuHomePhabricator

PHP Warning: Undefined array key "DEFAULT"
Open, Needs TriagePublicPRODUCTION ERROR

Description

Error
  • mwversion: 1.45.0-wmf.10
  • timestamp: 2025-07-21T12:58:00.067Z
  • phpversion: 8.1.31
  • reqId: f0db6344ae3fa57de81e7fdd
  • Find reqId in Logstash
normalized_message
[{reqId}] {exception_url}   PHP Warning: Undefined array key "DEFAULT"
FrameLocationCall
from/srv/mediawiki/src/DBRecordCache.php(83)
#0/srv/mediawiki/src/DBRecordCache.php(83)MediaWiki\Exception\MWExceptionHandler::handleError(int, string, string, int)
#1/srv/mediawiki/wmf-config/CommonSettings.php(232)Wikimedia\MWConfig\DBRecordCache->repopulateDbConf(array)
#2/srv/mediawiki/php-1.45.0-wmf.10/includes/libs/rdbms/lbfactory/LBFactory.php(189){closure}()
#3/srv/mediawiki/php-1.45.0-wmf.10/includes/export/WikiExporter.php(624)Wikimedia\Rdbms\LBFactory->autoReconfigure()
#4/srv/mediawiki/php-1.45.0-wmf.10/includes/export/WikiExporter.php(491)WikiExporter->reloadDBConfig()
#5/srv/mediawiki/php-1.45.0-wmf.10/includes/export/WikiExporter.php(314)WikiExporter->dumpPages(string, bool)
#6/srv/mediawiki/php-1.45.0-wmf.10/includes/export/WikiExporter.php(212)WikiExporter->dumpFrom(string, bool)
#7/srv/mediawiki/php-1.45.0-wmf.10/maintenance/includes/BackupDumper.php(349)WikiExporter->pagesByRange(int, int, bool)
#8/srv/mediawiki/php-1.45.0-wmf.10/maintenance/dumpBackup.php(86)MediaWiki\Maintenance\BackupDumper->dump(int, int)
#9/srv/mediawiki/php-1.45.0-wmf.10/maintenance/includes/MaintenanceRunner.php(691)DumpBackup->execute()
#10/srv/mediawiki/php-1.45.0-wmf.10/maintenance/run.php(51)MediaWiki\Maintenance\MaintenanceRunner->run()
#11/srv/mediawiki/multiversion/MWScript.php(221)require_once(string)
#12{main}
Impact

Unknown so far.

Notes

Details

Request URL
N/A (dumpBackup.php maintenance script)

Event Timeline

The following error is presumably for the exact same reason and from the same code:

normalized_message
[{reqId}] {exception_url}   PHP Warning: foreach() argument must be of type array|object, null given
FrameLocationCall
from/srv/mediawiki/src/DBRecordCache.php(83)
#0/srv/mediawiki/src/DBRecordCache.php(83)MediaWiki\Exception\MWExceptionHandler::handleError(int, string, string, int)
#1/srv/mediawiki/wmf-config/CommonSettings.php(232)Wikimedia\MWConfig\DBRecordCache->repopulateDbConf(array)
#2/srv/mediawiki/php-1.45.0-wmf.10/includes/libs/rdbms/lbfactory/LBFactory.php(189){closure}()
#3/srv/mediawiki/php-1.45.0-wmf.10/includes/export/WikiExporter.php(624)Wikimedia\Rdbms\LBFactory->autoReconfigure()
#4/srv/mediawiki/php-1.45.0-wmf.10/includes/export/WikiExporter.php(491)WikiExporter->reloadDBConfig()
#5/srv/mediawiki/php-1.45.0-wmf.10/includes/export/WikiExporter.php(314)WikiExporter->dumpPages(string, bool)
#6/srv/mediawiki/php-1.45.0-wmf.10/includes/export/WikiExporter.php(212)WikiExporter->dumpFrom(string, bool)
#7/srv/mediawiki/php-1.45.0-wmf.10/maintenance/includes/BackupDumper.php(349)WikiExporter->pagesByRange(int, int, bool)
#8/srv/mediawiki/php-1.45.0-wmf.10/maintenance/dumpBackup.php(86)MediaWiki\Maintenance\BackupDumper->dump(int, int)
#9/srv/mediawiki/php-1.45.0-wmf.10/maintenance/includes/MaintenanceRunner.php(691)DumpBackup->execute()
#10/srv/mediawiki/php-1.45.0-wmf.10/maintenance/run.php(51)MediaWiki\Maintenance\MaintenanceRunner->run()
#11/srv/mediawiki/multiversion/MWScript.php(221)require_once(string)
#12{main}

First seen on Jul 21, 2025 @ 12:17:59.330 UTC. In the SAL, two @Marostegui messages (repooling db1157 and depooling db1166) are suspiciously close to that, and the stack trace says “DB config” – any chance this could be related?

So far it’s mainly happening on wikidatawiki, but also a handful of times on commonswiki and enwiki. (Might not actually be wiki-specific at all – perhaps that’s just where dumpBackup.php runs at the moment.)

First seen on Jul 21, 2025 @ 12:17:59.330 UTC. In the SAL, two @Marostegui messages (repooling db1157 and depooling db1166) are suspiciously close to that, and the stack trace says “DB config” – any chance this could be related?

We depool and repool databases on a continous basis as we have lots of schema changes / maintenances doing automatic depools/repools, so probably not related?

Well, for now it seems to have gone away again – last seen Jul 21, 2025 @ 13:38:00.096 UTC, which was a few minutes before repooling db1166.

My suspicion at the moment is that dbctl had some kind of rare error condition which caused the DEFAULT key to be missing, but fixed itself on the next run.

Well, for now it seems to have gone away again – last seen Jul 21, 2025 @ 13:38:00.096 UTC, which was a few minutes before repooling db1166.

My suspicion at the moment is that dbctl had some kind of rare error condition which caused the DEFAULT key to be missing, but fixed itself on the next run.

I'd be very surprised with this, we repool and depool databases pretty much all the time: https://wikitech.wikimedia.org/wiki/Server_Admin_Log so we should see it more often if that was the case.