Page MenuHomePhabricator

PHP Warning: Stats: Cannot associate label keys with label values: Not all initialized labels have an assigned value.
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
labels.normalized_message
[{reqId}] {exception_url}   PHP Warning: Stats: Cannot associate label keys with label values: Not all initialized labels have an assigned value.
error.stack_trace
from /srv/mediawiki/php-1.43.0-wmf.19/includes/libs/Stats/Metrics/CounterMetric.php(84)
#0 [internal function]: MWExceptionHandler::handleError(int, string, string, int, array)
#1 /srv/mediawiki/php-1.43.0-wmf.19/includes/libs/Stats/Metrics/CounterMetric.php(84): trigger_error(string, int)
#2 /srv/mediawiki/php-1.43.0-wmf.19/extensions/EventBus/includes/EventBus.php(221): Wikimedia\Stats\Metrics\CounterMetric->incrementBy(float)
#3 /srv/mediawiki/php-1.43.0-wmf.19/extensions/EventBus/includes/EventBus.php(507): MediaWiki\Extension\EventBus\EventBus->incrementMetricByValue(string, int, array, array)
#4 /srv/mediawiki/php-1.43.0-wmf.19/extensions/EventBus/includes/Adapters/RCFeed/EventBusRCFeedEngine.php(57): MediaWiki\Extension\EventBus\EventBus->send(array)
#5 /srv/mediawiki/php-1.43.0-wmf.19/includes/deferred/MWCallableUpdate.php(52): MediaWiki\Extension\EventBus\Adapters\RCFeed\EventBusRCFeedEngine::MediaWiki\Extension\EventBus\Adapters\RCFeed\{closure}(string)
#6 /srv/mediawiki/php-1.43.0-wmf.19/includes/deferred/DeferredUpdates.php(495): MediaWiki\Deferred\MWCallableUpdate->doUpdate()
#7 /srv/mediawiki/php-1.43.0-wmf.19/includes/deferred/DeferredUpdates.php(207): MediaWiki\Deferred\DeferredUpdates::attemptUpdate(MediaWiki\Deferred\MWCallableUpdate)
#8 /srv/mediawiki/php-1.43.0-wmf.19/includes/deferred/DeferredUpdates.php(305): MediaWiki\Deferred\DeferredUpdates::run(MediaWiki\Deferred\MWCallableUpdate)
#9 /srv/mediawiki/php-1.43.0-wmf.19/includes/deferred/DeferredUpdatesScope.php(269): MediaWiki\Deferred\DeferredUpdates::MediaWiki\Deferred\{closure}(MediaWiki\Deferred\MWCallableUpdate, int)
#10 /srv/mediawiki/php-1.43.0-wmf.19/includes/deferred/DeferredUpdatesScope.php(198): MediaWiki\Deferred\DeferredUpdatesScope->processStageQueue(int, int, Closure)
#11 /srv/mediawiki/php-1.43.0-wmf.19/includes/deferred/DeferredUpdates.php(308): MediaWiki\Deferred\DeferredUpdatesScope->processUpdates(int, Closure)
#12 /srv/mediawiki/php-1.43.0-wmf.19/includes/deferred/DeferredUpdatesScope.php(269): MediaWiki\Deferred\DeferredUpdates::MediaWiki\Deferred\{closure}(MediaWiki\Deferred\MWCallableUpdate, int)
#13 /srv/mediawiki/php-1.43.0-wmf.19/includes/deferred/DeferredUpdatesScope.php(198): MediaWiki\Deferred\DeferredUpdatesScope->processStageQueue(int, int, Closure)
#14 /srv/mediawiki/php-1.43.0-wmf.19/includes/deferred/DeferredUpdates.php(313): MediaWiki\Deferred\DeferredUpdatesScope->processUpdates(int, Closure)
#15 /srv/mediawiki/php-1.43.0-wmf.19/includes/MediaWikiEntryPoint.php(674): MediaWiki\Deferred\DeferredUpdates::doUpdates()
#16 /srv/mediawiki/php-1.43.0-wmf.19/includes/MediaWikiEntryPoint.php(496): MediaWiki\MediaWikiEntryPoint->restInPeace()
#17 /srv/mediawiki/php-1.43.0-wmf.19/includes/MediaWikiEntryPoint.php(454): MediaWiki\MediaWikiEntryPoint->doPostOutputShutdown()
#18 /srv/mediawiki/php-1.43.0-wmf.19/includes/MediaWikiEntryPoint.php(209): MediaWiki\MediaWikiEntryPoint->postOutputShutdown()
#19 /srv/mediawiki/php-1.43.0-wmf.19/index.php(58): MediaWiki\MediaWikiEntryPoint->run()
#20 /srv/mediawiki/w/index.php(3): require(string)
#21 {main}
Impact

Low; 11 occurrences, first one on Aug 2, 2024 @ 21:27:01.017 (with bogus values), first one with non-bogus values on hewiki being on 1.43.0-wmf.19 on Aug 21, 2024 @ 15:51:48.425.

Notes

Details

MediaWiki Version
1.43.0-wmf.16
Request URL
https://it.wikipedia.org/wiki/Speciale:Blocca/*?gbdisableUTEdit=*&gbexpiry=*&gbnamespaces=*&gbpages=*&gbpartial=*&gbreason=*

Event Timeline

Change #1067997 had a related patch set uploaded (by Gmodena; author: Gmodena):

[mediawiki/extensions/EventBus@master] metrics: provide a fallback value for emtpy labels

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

Change #1067997 merged by jenkins-bot:

[mediawiki/extensions/EventBus@master] metrics: provide a fallback value for emtpy labels

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

https://gerrit.wikimedia.org/r/1067997 was included in this week's train branch (wmf/1.43.0-wmf.21) but I still see many Stats: Cannot associate label keys with label values: Not all initialized labels have an assigned value and Stats: Cannot associate label keys with label values: Not all initialized labels have an assigned value warnings being logged for testwikidatawiki or test.wikidata.org today.

Coming from CirrusSearch extension:

from /srv/mediawiki/php-1.43.0-wmf.21/includes/libs/Stats/Metrics/CounterMetric.php(84)
#0 [internal function]: MWExceptionHandler::handleError(int, string, string, int, array)
#1 /srv/mediawiki/php-1.43.0-wmf.21/includes/libs/Stats/Metrics/CounterMetric.php(84): trigger_error(string, int)
#2 /srv/mediawiki/php-1.43.0-wmf.21/extensions/CirrusSearch/includes/Sanity/Checker.php(184): Wikimedia\Stats\Metrics\CounterMetric->incrementBy(float)
#3 /srv/mediawiki/php-1.43.0-wmf.21/extensions/CirrusSearch/includes/Api/CheckSanity.php(104): CirrusSearch\Sanity\Checker->check(array)
#4 /srv/mediawiki/php-1.43.0-wmf.21/extensions/CirrusSearch/includes/Api/CheckSanity.php(60): CirrusSearch\Api\CheckSanity->check(CirrusSearch\Sanity\Checker, int, int)
#5 /srv/mediawiki/php-1.43.0-wmf.21/includes/api/ApiMain.php(1948): CirrusSearch\Api\CheckSanity->execute()
#6 /srv/mediawiki/php-1.43.0-wmf.21/includes/api/ApiMain.php(926): ApiMain->executeAction()
#7 /srv/mediawiki/php-1.43.0-wmf.21/includes/api/ApiMain.php(897): ApiMain->executeActionWithErrorHandling()
#8 /srv/mediawiki/php-1.43.0-wmf.21/includes/api/ApiEntryPoint.php(153): ApiMain->execute()
#9 /srv/mediawiki/php-1.43.0-wmf.21/includes/MediaWikiEntryPoint.php(200): MediaWiki\Api\ApiEntryPoint->execute()
#10 /srv/mediawiki/php-1.43.0-wmf.21/api.php(44): MediaWiki\MediaWikiEntryPoint->run()
#11 /srv/mediawiki/w/api.php(3): require(string)
#12 {main}

Change #1070298 had a related patch set uploaded (by DCausse; author: DCausse):

[mediawiki/extensions/CirrusSearch@master] Checker: ensure all labels are set

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

dancy triaged this task as Unbreak Now! priority.Sep 3 2024, 6:15 PM

The warning rate ramped up a lot (~860/15 minutes) after rolling 1.43.0-wmf.21 to group0 today, so I'm making this task a train blocker.

Change #1070298 merged by jenkins-bot:

[mediawiki/extensions/CirrusSearch@master] Checker: ensure all labels are set

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

Change #1070531 had a related patch set uploaded (by DCausse; author: DCausse):

[mediawiki/extensions/CirrusSearch@wmf/1.43.0-wmf.21] Checker: ensure all labels are set

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

@dancy @dcausse

Ack. Investigating.
My original patch only addressed EventBus. I can't seem to find any new warn entry for that service in logstash.

Looks like the spike is only related to CirrusSearch?

Looks like the spike is only related to CirrusSearch?

yes this is my understanding as well, it is quite noisy so it might hide others, I'm shipping a fix so hopefully we'll get some more clarity soon.

Change #1070531 merged by jenkins-bot:

[mediawiki/extensions/CirrusSearch@wmf/1.43.0-wmf.21] Checker: ensure all labels are set

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

Mentioned in SAL (#wikimedia-operations) [2024-09-04T08:52:40Z] <dcausse@deploy1003> Started scap sync-world: Backport for [[gerrit:1070531|Checker: ensure all labels are set (T373086)]]

Mentioned in SAL (#wikimedia-operations) [2024-09-04T08:54:52Z] <dcausse@deploy1003> dcausse: Backport for [[gerrit:1070531|Checker: ensure all labels are set (T373086)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-09-04T08:59:29Z] <dcausse@deploy1003> Finished scap sync-world: Backport for [[gerrit:1070531|Checker: ensure all labels are set (T373086)]] (duration: 06m 48s)

dcausse reassigned this task from dcausse to gmodena.

Seems to be fixed, tentatively closing

Looks like the spike is only related to CirrusSearch?

yes this is my understanding as well, it is quite noisy so it might hide others, I'm shipping a fix so hopefully we'll get some more clarity soon.

Just an ack that I don't see any EventBus (or other extensions) entry in logstash.