Page MenuHomePhabricator

Problems with 'disallow' option
Closed, ResolvedPublic

Description

I created a filter (#67) on it.wiki with 'disallow' option enabled. Filter works on a specific page preventing all edits from a certain IPs' range on that page (source code: article_prefixedtext == "Wikipedia:Pagina delle prove" & ip_in_range(user_name, "151.40.128.0/17") ).

Its run time is less than 0.85 ms using less than 5 conditions, no actions reached the condition limit but often the filter allow edits which (verifying them in batch mode) match perfectily its conditions.

I'm not sure but I think that, in the past, I saw similar problems with other filters, but I'm sure about all these issues with #67.


See Also:
{T62481}

Details

Reference
bz28154

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:27 PM
bzimport added a project: AbuseFilter.
bzimport set Reference to bz28154.

(In reply to comment #0)

I created a filter (#67) on it.wiki with 'disallow' option enabled. Filter
works on a specific page preventing all edits from a certain IPs' range on that
page (source code: article_prefixedtext == "Wikipedia:Pagina delle prove" &
ip_in_range(user_name, "151.40.128.0/17") ).

Its run time is less than 0.85 ms using less than 5 conditions, no actions
reached the condition limit but often the filter allow edits which (verifying
them in batch mode) match perfectily its conditions.

I'm not sure but I think that, in the past, I saw similar problems with other
filters, but I'm sure about all these issues with #67.

Update: the problem is happening with several filters, making the whole abusefilter quite unuseful

Here's another example from w:de:

The last change on AF rule #94 was made at 2011-06-15.[1]
User:83.77.242.235 made an edit on [[w:de:NGC 415]] at 2011-06-16 22:23:40 (UTC), i.e., more than 24h after the last change of rule #94.[2]

Although the abusefilter test is positive on that edit[3], the edit unfortunately was not blocked. What could be the reason for that?

[1] http://de.wikipedia.org/wiki/special:abuseFilter/history/94
[2] http://de.wikipedia.org/w/index.php?title=NGC_415&action=historysubmit&diff=90130131&oldid=90129746
[3] http://de.wikipedia.org/wiki/special:abuseFilter/test/94 with

wpTestPeriodStart = 2011-06-16T22:00:00
wpTestPeriodEnd = 2011-06-16T23:00:00
wpTestPage = NGC 415‎

With bug 31656, anyone editing an article using an old version (?oldid=1234) would not pass through the AbuseFilter. The bug got fixed and applied live, that might solve this issue as well.

looks fixed now. hashar, can you confirm?

I have no idea honestly. I have just emitted the assumption that bug 31656 could have fixed it. To be honest, I am not entirely sure what this bug is about nor how to reproduce it. If anyone can find a simple test case, that would be great.

Before some later try I think it's related to condition limit, it seemed to work again before I made some deep filters cleanup

Hi!

Another example:

https://de.wikipedia.org/wiki/Special:AbuseFilter/test confirms that https://de.wikipedia.org/wiki/Special:AbuseFilter/181 matches edit https://de.wikipedia.org/w/index.php?title=Phineas_und_Ferb/Episodenliste&diff=130562966&oldid=130528342. But though that edit was not blocked.

The "statistics" part says: "On average, its run time is 1.13 ms, and it consumes 6 conditions of the condition limit."

What could be the reason for this? Same bug?

(In reply to seth from comment #8)

Hi!

Another example:

https://de.wikipedia.org/wiki/Special:AbuseFilter/test confirms that
https://de.wikipedia.org/wiki/Special:AbuseFilter/181 matches edit
https://de.wikipedia.org/w/index.php?title=Phineas_und_Ferb/
Episodenliste&diff=130562966&oldid=130528342. But though that edit was not
blocked.

The "statistics" part says: "On average, its run time is 1.13 ms, and it
consumes 6 conditions of the condition limit."

What could be the reason for this? Same bug?

That is almost certainly because dewiki's filters often hit the condition limit (more than 60% hit rate atm).

Is there any detailed explanation on the condition limit?
What does it mean exactly? How can we reduce the number of conditions. (I guess the condition limit is an upper limit.)

The same rule #181 that had consumed "6 conditions of the condition limit" two days ago on average, today "consumes 831 conditions of the condition limit" on average.

(In reply to seth from comment #10)

Is there any detailed explanation on the condition limit?

This is what we have so far:

https://www.mediawiki.org/wiki/Extension:AbuseFilter/RulesFormat#Conditions

Not very detailed, but can give you some hints.

ok, yes, indeed, it gives some hints. So I guess #181 in w:de counts around 7 conditions.

But still I don't have any clue what "consumes X conditions of the condition limit" means. As I said, for the same rule #181 the number X can be 6 or 831.

The consumed condition varies on each run. On every action (usually edit), each active filter is evaluated in order. As seen in the "Conditions" examples, some expressions may create shortcuts depending on the value of the variables for the particular action, resulting in a variable number of conditions being consumed on each run.

I'm not sure if that count is a cumulative of all the previous filters or just that particular one.

Also it may be a bug with that count, See bug 51294

Daimona claimed this task.
Daimona subscribed.

Summing up:

  • there hasn't been any other specific report
  • the commit mentioned by hashar may have fixed the problem
  • sounds like some times this was due to condition limit
  • and, above everything else, for any unpredictable malfunctioning we have T175933