Page MenuHomePhabricator

Evaluator freeze/timeout on unclosed comment
Closed, ResolvedPublic

Description

Filter evaluator seems to freeze/timeout on filter snippet, inadvertently containing an indented unclosed comment

It can be reproduced by applying filter code as simple as the following (there has to be some whitespace preceding /*)

/* unclosed comment...

on some log entry, e.g.:
https://sk.wikipedia.org/wiki/%C5%A0peci%C3%A1lne:FilterZneu%C5%BEit%C3%AD/examine/log/15874

Event Timeline

Daimona triaged this task as Medium priority.Mar 25 2018, 2:22 PM
Daimona moved this task from Backlog to Internal bugs on the AbuseFilter board.

Change 425321 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] Properly detect unclosed comments

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

Daimona added a subscriber: Daimona.

A bit of explanation on gerrit. Basically we have a while loop which never ends while tokenizing the rules, thus causing the timeout.

Change 425321 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Properly detect unclosed comments

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

Huji removed a project: Patch-For-Review.