42wim/matterircd

SIGSEGV crash on /msg mattermost from some clients

Closed this issue · 3 comments

clients like mibbit crash matterircd, attaching stack trace
to reproduce connect to your server with mibbit
i.e. https://widget.mibbit.com/?server=irc.nix.co.il:+6697&nick=test&channel=%23test
type /msg matterircd hello
any other message will crash as well
observe the crash in the logs

│ time="2021-02-25T15:32:26Z" level=info msg="New connection: 64.62.228.82:37625" module=matterircd │
│ panic: runtime error: invalid memory address or nil pointer dereference │
│ [signal SIGSEGV: segmentation violation code=0x1 addr=0xd0 pc=0x85a019] │
│ goroutine 53 [running]: │
│ github.com/42wim/matterircd/mm-go-irckit.CmdPrivMsg(0xa4c6c0, 0xc00012c4e0, 0xc0000c6400, 0xc0000724b0, 0xc0000772d0, 0x7d1338a7dbea6701) │
│ /go/src/github.com/42wim/matterircd/mm-go-irckit/server_commands.go:412 +0x999 │
│ github.com/42wim/matterircd/mm-go-irckit.commands.Run(0xc0001d82d0, 0xa4c6c0, 0xc00012c4e0, 0xc0000c6400, 0xc0000724b0, 0x48, 0x0) │
│ /go/src/github.com/42wim/matterircd/mm-go-irckit/commands.go:55 +0x135 │
│ github.com/42wim/matterircd/mm-go-irckit.(*server).handle.func1(0xc00012c4e0, 0xc0000c6400, 0xc0000724b0) │
│ /go/src/github.com/42wim/matterircd/mm-go-irckit/server.go:362 +0x7a │
│ created by github.com/42wim/matterircd/mm-go-irckit.(*server).handle │
│ /go/src/github.com/42wim/matterircd/mm-go-irckit/server.go:361 +0xe5 │
│ stream closed │

42wim commented

what matterircd version?
can you run with --debug and paste the logs?

│ time="2021-02-25T16:33:03Z" level=info msg="Running version 0.20.2-dev 5b23c21" module=matterircd │
│ time="2021-02-25T16:33:03Z" level=info msg="WARNING: THIS IS A DEVELOPMENT VERSION. Things may break." module=matterircd │

i've only now noticed i'm running on pull policy - if not present, retested on
│ time="2021-02-26T07:16:41Z" level=info msg="Running version 0.23.0 ea485fb" module=matterircd

seems to not crash anymore

42wim commented

ok, going to close it, reopen if you can reproduce :)