Page MenuHomePhabricator

ircbot-plugin emits SEVERE java.lang.IndexOutOfBoundsException when parsing AWAY IRCv3 notifications
Closed, ResolvedPublic

Description

There is still a SEVERE log though:

May 17, 2021 11:44:04 AM INFO org.pircbotx.InputParser handleLine
:fdans!sid24243@gateway/web/irccloud.com/x-aafdwgspagunlghw AWAY

May 17, 2021 11:38:05 AM SEVERE org.pircbotx.PircBotX startLineProcessing
Exception encountered when parsing line
java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
	at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
	at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
	at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
	at java.base/java.util.Objects.checkIndex(Objects.java:372)
	at java.base/java.util.ArrayList.get(ArrayList.java:459)
	at org.pircbotx.InputParser.processCommand(InputParser.java:576)
	at org.pircbotx.InputParser.handleLine(InputParser.java:350)
	at org.pircbotx.PircBotX.startLineProcessing(PircBotX.java:275)
	at org.pircbotx.PircBotX.connect(PircBotX.java:236)
	at org.pircbotx.PircBotX.startBot(PircBotX.java:151)
	at hudson.plugins.ircbot.v2.IRCConnection$2.run(IRCConnection.java:221

Which is from

src/main/java/org/pircbotx/InputParser.java
574         } else if (command.equals("AWAY"))
575             //IRCv3 AWAY notify
576             source.setAwayMessage(parsedLine.get(0));

Apparently when processing AWAY commands. Probably https://github.com/pircbotx/pircbotx/issues/390 Issue with string parsing in various places.

The ircbot plugin uses Pircbotx 2.0.1. The issue got addressed by https://github.com/pircbotx/pircbotx/commit/a3a81f92a39e835582e1d30f2c4b1604225b8976 which got released in 2.1.

Event Timeline

In the ideal world we would get the Jenkins IRC plugin to upgrade Pircbotx, but it does not seem to be actively maintained. So it is merely logspam.

We currently run 2.36

Pircbotx got bumped from 2.0.1 to 2.1-g479835f-165 with https://github.com/jenkinsci/ircbot-plugin/pull/60/files
And further bumped to v2.3-gb1b48bf-9 with https://github.com/jenkinsci/ircbot-plugin/pull/137/files

So I guess if we upgrade the Jenkins plugin we might finally get rid of those notices :)

Mentioned in SAL (#wikimedia-releng) [2023-05-16T15:04:19Z] <hashar> CI Jenkins: updating IRC plugin from 2.42 to 3.829.v12d4b_d1f7650 and instant-messaging plugin from 1.48 to 2.666.va_6c1e97cc252 # T283009

hashar claimed this task.

Following the plugin update, the SEVERE logs no more show up in the systemd log for the CI Jenkins!