Page MenuHomePhabricator

[Bug] ArgumentCountError in MobileFrontend/includes/amc/Manager.php: Too few arguments to function MobileFrontend\AMC\Manager::__construct()
Closed, DeclinedPublicBUG REPORT

Description

There are approximately 700 occurrences of this AMC error reported in Logstash. There are about 600 possibly related errors.

Trace
{
  "_index": "logstash-syslog-2019.08.28",
  "_type": "syslog",
  "_id": "AWzZMU6DaTyU0YVHMdG1",
  "_version": 1,
  "_score": null,
  "_source": {
    "@timestamp": "2019-08-28T17:06:22.956Z",
    "level": "ERR",
    "host": "mw1322",
    "@version": "1",
    "program": "php7.2-fpm",
    "message": "PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function MobileFrontend\\AMC\\Manager::__construct(), 2 passed in /srv/mediawiki/php-1.34.0-wmf.19/extensions/MobileFrontend/includes/ServiceWiring.php on line 48 and exactly 3 expected in /srv/mediawiki/php-1.34.0-wmf.19/extensions/MobileFrontend/includes/amc/Manager.php:53\nStack trace:\n#0 /srv/mediawiki/php-1.34.0-wmf.19/extensions/MobileFrontend/includes/ServiceWiring.php(48): MobileFrontend\\AMC\\Manager->__construct(Object(GlobalVarConfig), Object(MobileContext))\n#1 /srv/mediawiki/php-1.34.0-wmf.19/includes/libs/services/ServiceContainer.php(458): Wikimedia\\Services\\ServiceContainer->{closure}(Object(MediaWiki\\MediaWikiServices))\n#2 /srv/mediawiki/php-1.34.0-wmf.19/includes/libs/services/ServiceContainer.php(427): Wikimedia\\Services\\ServiceContainer->createService('MobileFrontend....')\n#3 /srv/mediawiki/php-1.34.0-wmf.19/extensions/MobileFrontend/includes/ServiceWiring.php(52): Wikimedia\\Services\\ServiceContainer->getService('MobileFrontend....')\n#4 /srv/medi in /srv/mediawiki/php-1.34.0-wmf.19/extensions/MobileFrontend/includes/amc/Manager.php on line 53",
    "logsource": "mw1322",
    "type": "syslog",
    "facility": "daemon",
    "normalized_message": "PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function MobileFrontend\\AMC\\Manager::__construct(), 2 passed in /srv/mediawiki/php-1.34.0-wmf.19/extensions/MobileFrontend/includes/ServiceWiring.php on line 48 and exactly 3 expected in ",
    "timestamp": "2019-08-28T17:06:22.823862+00:00",
    "tags": [
      "input-kafka-rsyslog-shipper",
      "rsyslog-shipper",
      "kafka",
      "truncated_by_filter_truncate",
      "syslog",
      "es",
      "normalized_message_trimmed"
    ]
  },
  "fields": {
    "@timestamp": [
      1567011982956
    ]
  },
  "sort": [
    1567011982956
  ]
}

These errors go back about three weeks but recently spiked again.

Event Timeline

@pmiazga any update on this? They seem to have calmed down. Was this fixed by #/c/mediawiki/extensions/MobileFrontend/+/532389/ ?

@pmiazga it's possible T224491 is related, you might want to check with people active on that task.

Jdlrobson lowered the priority of this task from High to Medium.Sep 13 2019, 12:10 AM

Looks like there have been no errors of this sort since 18th Sept. Should this be resolved?

This issue happened twice and it's related to the deployment process. It happened exactly when a new branch was pushed to production and because of some reason PHP cached old AMCManager definition but used new ServiceWirings file, thus there was an inconsistency with the argument count. This did not happen again.

This happened only during the deployment for a very short time (a second? couple seconds? ) For now, I'm declining this task. If it happens I'll re-open this task.