mozilla-services / heka

DEPRECATED: Data collection and processing made easy.
http://hekad.readthedocs.org/
Other
3.39k stars 531 forks source link

IrcOutput panic: runtime error: index out of range #1128

Open whd opened 10 years ago

whd commented 10 years ago

With 0.7.2. This was probably due to an IRC channel key change, which coincided with the failure.

goroutine 94633 [running]:
runtime.panic(0x98ac20, 0xef5c5c)
        /usr/local/go/src/pkg/runtime/panic.c:279 +0xf5
github.com/mozilla-services/heka/plugins/irc.func·010(0xc209183a00)
        /home/ec2-user/heka/build/heka/src/github.com/mozilla-services/heka/plugins/irc/irc_output.go:499 +0x89
created by github.com/thoj/go-ircevent.(*Connection).RunCallbacks
        /home/ec2-user/heka/build/heka/src/github.com/thoj/go-ircevent/irc_callback.go:116 +0x451
jotes commented 9 years ago

@whd looks like it's caused by '/part' without channel parameter. It looks strange... Could you describe more or less how to reproduce this issue?

chancez commented 9 years ago

It isn't necessarily without the channel parameter, but rather, since the IRC response to parting is asynchronous, the IRC server just happened to not provide an IRC channel which was parted in response to the actual PART command.

IE: You can /part and eventually the IRC server acknowledges this, and responds with a message about you PARTing, in the normal case that response will include which server you parted from, but in this case it didn't...which is weird since you can't really just part from no channel as far as I'm aware.

jotes commented 9 years ago

which was parted in response to the actual PART command. Yes, you're right. That's what i meant in my fuzzy way.

which is weird since you can't really just part from no channel as far as I'm aware. Yeah, it violates RFC in my opinion. I can mock this but it would be good to test it against real scenario.

chancez commented 9 years ago

I'm curious if this happens when the bot can't join a channel after so many attempts, and then parts. But given it never successfully joined, it parts with no channel actually joined? I'm not really sure, just a thought.