Page MenuHomePhabricator

[0.5day timebox] PHP Warning: Stats: got negative value for counter "tasktype_count"
Open, LowPublic0.5 Estimated Story PointsPRODUCTION ERROR

Description

Error
labels.normalized_message
[{reqId}] {exception_url}   PHP Warning: Stats: got negative value for counter "tasktype_count"
FrameLocationCall
from/srv/mediawiki/php-1.45.0-wmf.1/includes/libs/Stats/Metrics/CounterMetric.php(61)
#0[internal function]MediaWiki\Exception\MWExceptionHandler::handleError(int, string, string, int)
#1/srv/mediawiki/php-1.45.0-wmf.1/includes/libs/Stats/Metrics/CounterMetric.php(61)trigger_error(string, int)
#2/srv/mediawiki/php-1.45.0-wmf.1/extensions/GrowthExperiments/maintenance/listTaskCounts.php(169)Wikimedia\Stats\Metrics\CounterMetric->incrementBy(float)
#3/srv/mediawiki/php-1.45.0-wmf.1/extensions/GrowthExperiments/maintenance/listTaskCounts.php(69)GrowthExperiments\Maintenance\ListTaskCounts->reportTaskCounts(array, array)
#4/srv/mediawiki/php-1.45.0-wmf.1/maintenance/includes/MaintenanceRunner.php(694)GrowthExperiments\Maintenance\ListTaskCounts->execute()
#5/srv/mediawiki/php-1.45.0-wmf.1/maintenance/run.php(51)MediaWiki\Maintenance\MaintenanceRunner->run()
#6/srv/mediawiki/multiversion/MWScript.php(221)require_once(string)
#7{main}
Impact

Low. All occurrences around May 21, 2025 @ 16:02:xx on older 1.45.0-wmf.1 but filing as there have been no recent changes to https://phabricator.wikimedia.org/diffusion/EGRE/browse/master/maintenance/listTaskCounts.php

Notes

Event Timeline

The occurrences seem preceded by a transient CirrusSearch error Pool error on CirrusSearch-Search:_elasticsearch: pool-queuefull, and we use -1 as the task count when the task suggester fails to suggest tasks (see SuggestionsInfo.php#77). Still, we should not try t record negative numbers so let's fix it in case it happens again, recording a 0 or not recording should be fine.

Estimation: Also consider if maybe we could sleep a moment if the lock cannot be acquired right away.

Michael renamed this task from PHP Warning: Stats: got negative value for counter "tasktype_count" to [0.5day timebox] PHP Warning: Stats: got negative value for counter "tasktype_count".Jun 23 2025, 4:18 PM
KStoller-WMF set the point value for this task to 0.5.Jun 23 2025, 4:18 PM
Michael triaged this task as Medium priority.Jun 24 2025, 4:52 PM
KStoller-WMF lowered the priority of this task from Medium to Low.Nov 6 2025, 5:58 PM