Abuse filter error (Exception caught: Unknown variable compute type subtract)
Closed, ResolvedPublic

Description

[WsjJWgpAMFsAALHeuyIAAAAJ] 2018-04-07 13:36:26: Fatal exception of type "AFPException"

Getting an error any time I try to access these edit filter hits:
https://en.wikipedia.org/wiki/Special:AbuseLog?wpSearchUser=&wpSearchTitle=Gitali+Mukhopadhyay&wpSearchImpact=0&wpSearchActionTaken=&wpSearchFilter=

I also had another editor check to see if they could replicate it and same issue. I clicked a few random hits unrelated to this and they seem to work.

Error is reproducible at https://en.wikipedia.org/wiki/Special:AbuseLog/3162069

Restricted Application added subscribers: Scoopfinder, Aklapper. · View Herald TranscriptApr 7 2018, 1:38 PM
MarcoAurelio triaged this task as High priority.Apr 7 2018, 1:42 PM
MarcoAurelio removed a subscriber: AbuseFilter.
Paladox updated the task description. (Show Details)Apr 7 2018, 1:43 PM
Paladox raised the priority of this task from High to Unbreak Now!.
Restricted Application added subscribers: Liuxinyu970226, TerraCodes. · View Herald TranscriptApr 7 2018, 1:43 PM
MarcoAurelio updated the task description. (Show Details)Apr 7 2018, 1:45 PM
Daimona moved this task from Backlog to Internal bugs on the AbuseFilter board.Apr 7 2018, 2:00 PM
Daimona lowered the priority of this task from Unbreak Now! to High.
Daimona added a subscriber: Daimona.

This reminds me of some error we had already reported, but let's wait for error traces. Anyway, this only breaks old filters, and AFAICS only a tiny part of them, nor it's a regession, so not UBN.

More precisely, reminds me of T187153: different error but really similar dynamic.

MER-C added a subscriber: MER-C.Apr 7 2018, 2:32 PM

Can reproduce with the API:

https://en.wikipedia.org/w/api.php?action=query&list=abuselog&afltitle=API&aflprop=details

"error": {
    "code": "internal_api_error_AFPException",
    "info": "[WsjVcApAAEkAAEx8UX4AAABB] Exception caught: Unknown variable compute type subtract"
},
"servedby": "mw1278"
Daimona claimed this task.Apr 7 2018, 3:10 PM

Alright, found the issue: https://gerrit.wikimedia.org/r/#/c/421796/ a fallthrough option should be enough. I'll send the patch in a moment.

Looks UBN to me as per @MER-C.

Change 424766 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] Restore 'subtract' method for backward compatibility

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

Daimona raised the priority of this task from High to Unbreak Now!.Apr 7 2018, 3:18 PM

It's the same, the patch is here. However I noticed that this affects all entries of any filter that uses edit_delta.

Thanks @Daimona - Hopefully some mediawiki/* people is around today to +2 and backport to fix this :-)

@MarcoAurelio I hope so :-) Anyway this is not terribly urgent, since it still affects only a part of old filters' logs. Also, this bug came out with wmf.27 and gets reported just today, which means that we may wait a couple of days more.

Change 424767 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@wmf/1.31.0-wmf.28] Restore 'subtract' method for backward compatibility

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

MarcoAurelio renamed this task from Abuse filter error to Abuse filter error (Exception caught: Unknown variable compute type subtract).Apr 7 2018, 8:08 PM

Change 424766 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Restore 'subtract' method for backward compatibility

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

Bucky199191 lowered the priority of this task from Unbreak Now! to Needs Triage.Apr 10 2018, 5:02 AM
JJMC89 triaged this task as Unbreak Now! priority.Apr 10 2018, 5:13 AM

Change 424767 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@wmf/1.31.0-wmf.28] Restore 'subtract' method for backward compatibility

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

Mentioned in SAL (#wikimedia-operations) [2018-04-10T13:47:28Z] <zfilipin@tin> Synchronized php-1.31.0-wmf.28/extensions/AbuseFilter/: SWAT: [[gerrit:424767|Restore subtract method for backward compatibility (T191696)]] (duration: 01m 01s)

Daimona closed this task as Resolved.Apr 10 2018, 1:47 PM