Page MenuHomePhabricator

Bot crash when command is too long
Closed, ResolvedPublic

Description

2019-04-04 23:22:20,646 [10] DEBUG 
Stwalkerster.IrcClient.IrcClient.Freenode.NetworkClient.Inbound [(null)] 
- :moonrightnow![..SNIP..] PRIVMSG #wikipedia-en-help :!helper hello, i 
have been working on an article, still in draft mode, and it has been 
rejected a couple times now. and i'm not fully understanding why it 
keeps getting rejected. especially, because when i look at pages similar 
to this one, mine doesn't differ from those: 
https://en.wikipedia.org/wiki/Draft:SoulPancake

2019-04-04 23:22:20,646 [10] DEBUG 
Helpmebot.Legacy.LegacyCommandHandler.LegacyCommandParser [(null)] - 
Handling received message...

2019-04-04 23:22:20,664 [Thread Pool Worker] INFO  
Stwalkerster.Bot.CommandLib.Services.CommandParser [(null)] - Creating 
command object of type 
Helpmebot.Commands.CrossChannel.CrossChannelNotifyCommand

2019-04-04 23:22:20,666 [Thread Pool Worker] DEBUG 
Helpmebot.Services.CrossChannelService [(null)] - Rate limit not found, 
creating key.

2019-04-04 23:22:20,673 [Thread Pool Worker] DEBUG 
Helpmebot.Commands.CrossChannel.CrossChannelNotifyCommand [(null)] - 
Found method: Execute

2019-04-04 23:22:20,756 [Thread Pool Worker] DEBUG 
Helpmebot.Services.CrossChannelService [(null)] - Rate limit key found.

2019-04-04 23:22:20,757 [Thread Pool Worker] DEBUG 
Helpmebot.Services.CrossChannelService [(null)] - Rate limit key NOT 
expired.

2019-04-04 23:22:20,758 [Thread Pool Worker] DEBUG 
Helpmebot.Services.CrossChannelService [(null)] - Rate limit 
incremented.

2019-04-04 23:22:20,788 [Thread Pool Worker] ERROR 
NHibernate.AdoNet.AbstractBatcher [(null)] - Could not execute command: 
INSERT INTO flagaccesslog (Timestamp, Class, Invocation, Nickname, 
Username, Hostname, Account, Context, AvailableFlags, requiredmain, 
requiredsub, Result) VALUES (?p0, ?p1, ?p2, ?p3, ?p4, ?p5, ?p6, ?p7, 
?p8, ?p9, ?p10, ?p11)
MySql.Data.MySqlClient.MySqlException (0x80004005): Data too long for 
column 'invocation' at row 1
   at MySql.Data.MySqlClient.MySqlStream.ReadPacket () [0x00096] in 
<8051f3898298485d9e8510b51445dcd7>:0
   at MySql.Data.MySqlClient.NativeDriver.GetResult (System.Int32& 
affectedRow, System.Int64& insertedId) [0x00026] in 
<8051f3898298485d9e8510b51445dcd7>:0
   at MySql.Data.MySqlClient.Driver.GetResult (System.Int32 statementId, 
System.Int32& affectedRows, System.Int64& insertedId) [0x00000] in 
<8051f3898298485d9e8510b51445dcd7>:0
   at MySql.Data.MySqlClient.Driver.NextResult (System.Int32 statementId, 
System.Boolean force) [0x00023] in <8051f3898298485d9e8510b51445dcd7>:0
   at MySql.Data.MySqlClient.MySqlDataReader.NextResult () [0x00205] in 
<8051f3898298485d9e8510b51445dcd7>:0
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader 
(System.Data.CommandBehavior behavior) [0x00315] in 
<8051f3898298485d9e8510b51445dcd7>:0
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader () [0x00000] in 
<8051f3898298485d9e8510b51445dcd7>:0
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery () [0x00033] in 
<8051f3898298485d9e8510b51445dcd7>:0
   at NHibernate.AdoNet.AbstractBatcher.ExecuteNonQuery 
(System.Data.IDbCommand cmd) [0x00028] in 
<8210282bc4024c02ab1c8fa84c45a21e>:0

Event Timeline

stwalkerster created this task.
swalker shifted this object from the Restricted Space space to the S1 Default space.Apr 5 2019, 10:22 AM
swalker removed a project: Restricted Project.Apr 5 2019, 1:58 PM

I've bumped the invocation column to 512 chars, which is the IRC max line length I think. This should stop any issues from killing the bot.

ALTER TABLE flagaccesslog MODIFY invocation VARCHAR(512);