Page MenuHomePhabricator

PHP Warning: unserialize(): Error at offset 0 of 13 bytes (in CentralAuth)
Closed, ResolvedPublicPRODUCTION ERROR

Description

Seeing a short spike of ~250 errors in the logs on old 1.47.0-wmf.1 on dewiki and hrwiki around 2026-05-12, 09:20UTC to 09:45UTC:

Error
  • service.version: 1.47.0-wmf.1
  • timestamp: 2026-05-12T09:43:41.817Z
  • labels.phpversion: 8.3.30
  • trace.id: 631bc788-b29c-426f-9afd-e1b2fffda844
  • Find trace.id in Logstash
labels.normalized_message
[{reqId}] {exception_url}   PHP Warning: unserialize(): Error at offset 0 of 13 bytes
FrameLocationCall
from/srv/mediawiki/php-1.47.0-wmf.1/includes/Logging/LogEntryBase.php(55)
#0[internal function]MediaWiki\Exception\MWExceptionHandler::handleError(int, string, string, int)
#1/srv/mediawiki/php-1.47.0-wmf.1/includes/Logging/LogEntryBase.php(55)unserialize(string)
#2/srv/mediawiki/php-1.47.0-wmf.1/extensions/CentralAuth/includes/Api/ApiQueryGlobalUsers.php(419)MediaWiki\Logging\LogEntryBase::extractParams(string)
#3/srv/mediawiki/php-1.47.0-wmf.1/extensions/CentralAuth/includes/Api/ApiQueryGlobalUsers.php(181)MediaWiki\Extension\CentralAuth\Api\ApiQueryGlobalUsers->loadLockLogids(array)
#4/srv/mediawiki/php-1.47.0-wmf.1/includes/Api/ApiQuery.php(735)MediaWiki\Extension\CentralAuth\Api\ApiQueryGlobalUsers->execute()
#5/srv/mediawiki/php-1.47.0-wmf.1/includes/Api/ApiMain.php(2045)MediaWiki\Api\ApiQuery->execute()
#6/srv/mediawiki/php-1.47.0-wmf.1/includes/Api/ApiMain.php(949)MediaWiki\Api\ApiMain->executeAction()
#7/srv/mediawiki/php-1.47.0-wmf.1/includes/Api/ApiMain.php(920)MediaWiki\Api\ApiMain->executeActionWithErrorHandling()
#8/srv/mediawiki/php-1.47.0-wmf.1/includes/Api/ApiEntryPoint.php(138)MediaWiki\Api\ApiMain->execute()
#9/srv/mediawiki/php-1.47.0-wmf.1/includes/MediaWikiEntryPoint.php(180)MediaWiki\Api\ApiEntryPoint->execute()
#10/srv/mediawiki/php-1.47.0-wmf.1/api.php(30)MediaWiki\MediaWikiEntryPoint->run()
#11/srv/mediawiki/w/api.php(3)require(string)
#12{main}
Impact
Notes

Event Timeline

Thanks for reporting. The warning is harmless; it will happen when the API query accesses legacy log entries, and we should suppress it, like here.

There is a patch fixing a related issue in this code at https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CentralAuth/+/1286370, maybe we can solve this at the same time. I'll comment there.

Change #1286370 had a related patch set uploaded (by Dragoniez; author: Dragoniez):

[mediawiki/extensions/CentralAuth@master] ApiQueryGlobalUsers: Fix parsing logic for legacy log_params entries

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

Change #1286370 merged by jenkins-bot:

[mediawiki/extensions/CentralAuth@master] ApiQueryGlobalUsers: Fix parsing logic for legacy log_params entries

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

Change #1286890 had a related patch set uploaded (by Dragoniez; author: Dragoniez):

[mediawiki/extensions/CentralAuth@wmf/1.47.0-wmf.2] ApiQueryGlobalUsers: Fix parsing logic for legacy log_params entries

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

Change #1286897 had a related patch set uploaded (by Bartosz Dziewoński; author: Dragoniez):

[mediawiki/extensions/CentralAuth@wmf/1.47.0-wmf.1] ApiQueryGlobalUsers: Fix parsing logic for legacy log_params entries

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

I added a backport for wmf.1, since that version is still live (see https://versions.toolforge.org/).

I added a backport for wmf.1, since that version is still live (see https://versions.toolforge.org/).

Oops. Thanks for this. I should then abandon my backport for wmf.2, is that correct?

Change #1286890 merged by jenkins-bot:

[mediawiki/extensions/CentralAuth@wmf/1.47.0-wmf.2] ApiQueryGlobalUsers: Fix parsing logic for legacy log_params entries

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

Change #1286897 merged by jenkins-bot:

[mediawiki/extensions/CentralAuth@wmf/1.47.0-wmf.1] ApiQueryGlobalUsers: Fix parsing logic for legacy log_params entries

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

Mentioned in SAL (#wikimedia-operations) [2026-05-13T13:59:07Z] <lucaswerkmeister-wmde@deploy1003> Started scap sync-world: Backport for [[gerrit:1286890|ApiQueryGlobalUsers: Fix parsing logic for legacy log_params entries (T426033)]], [[gerrit:1286897|ApiQueryGlobalUsers: Fix parsing logic for legacy log_params entries (T426033)]], [[gerrit:1286891|Add 'Promise-Non-Write-API-Action' to $wgAllowedCorsHeaders (T425972)]], [[gerrit:1286892|Add 'Promise-Non-Write-API-Action' to $wgAll

Mentioned in SAL (#wikimedia-operations) [2026-05-13T14:01:10Z] <lucaswerkmeister-wmde@deploy1003> dragoniez, matmarex, lucaswerkmeister-wmde: Backport for [[gerrit:1286890|ApiQueryGlobalUsers: Fix parsing logic for legacy log_params entries (T426033)]], [[gerrit:1286897|ApiQueryGlobalUsers: Fix parsing logic for legacy log_params entries (T426033)]], [[gerrit:1286891|Add 'Promise-Non-Write-API-Action' to $wgAllowedCorsHeaders (T425972)]], [[gerrit:1286892|Add 'Promise-Non-Write-AP

Mentioned in SAL (#wikimedia-operations) [2026-05-13T14:07:52Z] <lucaswerkmeister-wmde@deploy1003> Finished scap sync-world: Backport for [[gerrit:1286890|ApiQueryGlobalUsers: Fix parsing logic for legacy log_params entries (T426033)]], [[gerrit:1286897|ApiQueryGlobalUsers: Fix parsing logic for legacy log_params entries (T426033)]], [[gerrit:1286891|Add 'Promise-Non-Write-API-Action' to $wgAllowedCorsHeaders (T425972)]], [[gerrit:1286892|Add 'Promise-Non-Write-API-Action' to $wgAl

Dragoniez claimed this task.