Closed Bug 555478 Opened 14 years ago Closed 14 years ago

[Infobot] Infobot can force mozbot into endless /msg'ed discussions with other mozbots that loop infinitely

Categories

(Webtools Graveyard :: Mozbot, defect)

defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mozilla.bugs, Assigned: mozilla.bugs)

Details

Attachments

(3 files)

In testing the behavior of the Karma module, I asked testbot to /msg firebot with a karma command, but the attached output occurred; it loops endlessly.  I have seen this in several situations before on my own servers that have two bots in the same channel.

I seem to remember there is some way to prevent this, but I'm not sure what it is, and I believe that if we have such a solution, it should be enabled by default.

If there isn't such a solution, we could should create a filter to check statements against the known default bot messages to prevent these cycles from happening at all.

I am setting this to major, because it happens silently and causes major performance problems.
Summary: Mozbots can go into endless /msg discussions that loop infinitely → Mozbots can go into endless /msg discussions with other mozbots that loop infinitely
This shows how quickly this occurs, since it is a log from only four minutes of bot uptime, this was started by aysbot authenticating with aysbot2.  From the past year I have 1.42GB of text logs from mozbots, and this is the majority of what they spend their time saying.

The problem is related to Infobot, which I can disable on one of my bots, perhaps both of them, but for cases like the #mozbot channel that have bot thebot and firebot installed, I can't disable Infobot in one or the other.  If this doesn't have a fix, we should note in the documentation warnings about multiple bots in a channel or having bots communicate with each other for authorization purpose, etc.
Disabling Infobot on both of the bots fixed the problem.  So this is a bug with Infobot request handling.

I wonder if infobot requests should be preceded by a command, which would isolate the module.  The only other solution would to create a system to ignore the special greeting/response phrases; however, they are customizable and therefore could be different across different bots and require a potentially process-intensive filtering expression to be created.  If we force infobot to only reply to commands, let's say "info" for the moment, then it would prevent this from happening at all in the future with this module.  In addition, if we assume that all commands are info requests, which the current implementation does that also potentially creates a lot of overhead; making this into a function that only responds on command could therefore increase performance.

I will get a patch together as soon as I can.
Assignee: nobody → mozilla.bugs
Status: NEW → ASSIGNED
Summary: Mozbots can go into endless /msg discussions with other mozbots that loop infinitely → [Infobot] Infobot can force mozbot into endless /msg'ed discussions with other mozbots that loop infinitely
Don't break infobot in this way. Turning infobot into a command only response design would break alot of the ways mozbot is customizes to be more personable.

This loop should be breakable by having mozbot not respond to the infobot reply: "Sorry, I've no idea what * might be"
(In reply to comment #3)
> Don't break infobot in this way. Turning infobot into a command only response
> design would break alot of the ways mozbot is customizes to be more personable.
> 
> This loop should be breakable by having mozbot not respond to the infobot
> reply: "Sorry, I've no idea what * might be"

I'll add that regular expression to the top of the list.
Attached patch Patch v. 1.0Splinter Review
This adds two regular expressions.  One to Infobot, so that the bot doesn't process "Sorry, I've no idea who/what * is" statements, to reduce overhead, and then not to accept the apology of "Sorry, I've no idea who/what * is" statement by the Greeting module, which prevents the loop.

This has been tested.

[10:35:02]	<tmyoung>	mozbot: Sorry
[10:35:04]	<mozbot>	Apology accepted.
[10:35:13]	<tmyoung>	mozbot: Sorry, I have no idea what ... is
[10:35:15]	<mozbot>	thanks
[10:35:22]	<tmyoung>	mozbot: Sorry, I've no idea what ... is
(No response from mozbot...)
Attachment #436870 - Flags: review?(bugtrap)
Attachment #436870 - Flags: review?(bugtrap) → review+
Keywords: checkin-needed
Checking in Greeting.bm;
/cvsroot/mozilla/webtools/mozbot/BotModules/Greeting.bm,v  <--  Greeting.bm
new revision: 2.24; previous revision: 2.23
done
Checking in Infobot.bm;
/cvsroot/mozilla/webtools/mozbot/BotModules/Infobot.bm,v  <--  Infobot.bm
new revision: 1.21; previous revision: 1.20
done
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Keywords: checkin-needed
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: