Page MenuHomePhabricator

Notice: Undefined index: dsr in /extensions/Linter/includes/ApiRecordLint.php on line 65
Closed, ResolvedPublic

Description

Undefined index notices are Wikimedia-production-error

Full error message:

Notice: Undefined index: dsr in /srv/mediawiki/php-1.30.0-wmf.6/extensions/Linter/includes/ApiRecordLint.php on line 65

Details

Related Gerrit Patches:
mediawiki/extensions/Linter : masterDrop lints w/o dsr info
mediawiki/extensions/Linter : wmf/1.30.0-wmf.6Add debug logging for missing 'dsr'
mediawiki/extensions/Linter : masterAdd debug logging for missing 'dsr'

Event Timeline

mmodell created this task.Jun 26 2017, 6:02 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 26 2017, 6:02 PM
mmodell triaged this task as High priority.Jun 26 2017, 6:02 PM

Change 361587 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[mediawiki/extensions/Linter@master] Add debug logging for missing 'dsr'

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

Change 361588 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[mediawiki/extensions/Linter@wmf/1.30.0-wmf.6] Add debug logging for missing 'dsr'

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

Change 361587 merged by jenkins-bot:
[mediawiki/extensions/Linter@master] Add debug logging for missing 'dsr'

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

Change 361588 merged by jenkins-bot:
[mediawiki/extensions/Linter@wmf/1.30.0-wmf.6] Add debug logging for missing 'dsr'

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

Mentioned in SAL (#wikimedia-operations) [2017-06-26T22:34:35Z] <legoktm@tin> Synchronized php-1.30.0-wmf.6/extensions/Linter/includes/ApiRecordLint.php: Add debug logging for missing 'dsr' - T168900 (duration: 00m 43s)

Now we are getting this:

Warning: Invalid operand type was used: array_slice expects an array or collection as argument 1 in /srv/mediawiki/php-1.30.0-wmf.6/extensions/Linter/includes/ApiRecordLint.php on line 76

But no sign of the debug message.

The debug message is in a different log file. But yeah, that is to be expected.

ok I found one:

dsr for Проект:Переводы/Запросы_на_перевод @ rev 86208206, for lint: obsolete-tag is missing

Why is this be a deployment blocker? These messages should really be rare (can happen on pages with some kinds of broken tables in templates). But, in any case, we can suppress these in Parsoid by not sending them to Linter in the first place.

After discussion in #mediawiki-parsoid I'm going to remove this as a deployment blocker since log entries make it seem like this has been happening basically ever since Linter was deployed.

Change 361591 had a related patch set uploaded (by Legoktm; owner: Subramanya Sastry):
[mediawiki/services/parsoid@master] T168900: Linter: Log error when DSR is missing

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

@ssastry: The reason it was marked as a deployment blocker is because of the new policy of halting deployments for anything which increases log spam ( Wikimedia-production-error ). Sometimes a log message appears more often after deploying a new branch. Sometimes it's coincidence rather than causation, as may be the case here.

mmodell added a comment.EditedJun 27 2017, 4:04 PM

In this instance, the reason it was treated as a bug is because all undefined index notices are considered buggy code as they add noise to the logs: the code should always use isset() before accessing an index that isn't guaranteed to exist.

see https://wikitech.wikimedia.org/wiki/Deployments/Holding_the_train#Logspam

Arlolra closed this task as Resolved.Jun 29 2017, 5:32 PM
Arlolra claimed this task.
Arlolra added a subscriber: Arlolra.

Parsoid won't be sending lints w/o dsr anymore. Please reopen if that's found not to be the case.

demon added a comment.Jun 29 2017, 5:37 PM

That's great, but Linter should protect against bogus input in a way that doesn't send errors to logstash either.

Change 362258 had a related patch set uploaded (by Arlolra; owner: Arlolra):
[mediawiki/extensions/Linter@master] T168900: Drop lints w/o dsr info

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

That's great, but Linter should protect against bogus input in a way that doesn't send errors to logstash either.

Ok, see the above.

Change 362258 had a related patch set uploaded (by Legoktm; owner: Arlolra):
[mediawiki/extensions/Linter@master] Drop lints w/o dsr info

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

Change 362258 merged by jenkins-bot:
[mediawiki/extensions/Linter@master] Drop lints w/o dsr info

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

mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:10 PM