42wim / matterbridge

bridge between mattermost, IRC, gitter, xmpp, slack, discord, telegram, rocketchat, twitch, ssh-chat, zulip, whatsapp, keybase, matrix, microsoft teams, nextcloud, mumble, vk and more with REST API (mattermost not required!)
Apache License 2.0
6.66k stars 618 forks source link

SIGSEGV while running (docker version) #2130

Closed Teeed closed 5 months ago

Teeed commented 7 months ago

Describe the bug SIGSEGV while running bridging IRC and telegram channels. It needs investigation if it is misconfiguration of library in matterbridge's code or bug in 3rd party library (lrstanley/girc).

To Reproduce Random. It happened rarely, but today it happened 19 times.

Expected behavior Well, do not SIGSEGV.

Screenshots/debug logs

time="2024-04-16T13:51:32Z" level=info msg="Running version 1.26.1-dev 56e7bd0" prefix=main
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0xb52fa6]

goroutine 13269432 [running]:
github.com/lrstanley/girc.(*Client).readLoop(0xc00068a700, {0x26a1d90, 0xc0000d6550})
        /go/src/matterbridge/vendor/github.com/lrstanley/girc/conn.go:440 +0x266
github.com/lrstanley/girc/internal/ctxgroup.(*Group).Go.func1()
        /go/src/matterbridge/vendor/github.com/lrstanley/girc/internal/ctxgroup/ctxgroup.go:58 +0x6e
created by github.com/lrstanley/girc/internal/ctxgroup.(*Group).Go
        /go/src/matterbridge/vendor/github.com/lrstanley/girc/internal/ctxgroup/ctxgroup.go:55 +0x8d
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0xb52fa6]

goroutine 8 [running]:
github.com/lrstanley/girc.(*Client).readLoop(0xc000254700, {0x26a1d90, 0xc0002e6140})
        /go/src/matterbridge/vendor/github.com/lrstanley/girc/conn.go:440 +0x266
github.com/lrstanley/girc/internal/ctxgroup.(*Group).Go.func1()
        /go/src/matterbridge/vendor/github.com/lrstanley/girc/internal/ctxgroup/ctxgroup.go:58 +0x6e
created by github.com/lrstanley/girc/internal/ctxgroup.(*Group).Go
        /go/src/matterbridge/vendor/github.com/lrstanley/girc/internal/ctxgroup/ctxgroup.go:55 +0x8d
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0xb52fa6]

goroutine 564 [running]:
github.com/lrstanley/girc.(*Client).readLoop(0xc0009381c0, {0x26a1d90, 0xc0000df270})
        /go/src/matterbridge/vendor/github.com/lrstanley/girc/conn.go:440 +0x266
github.com/lrstanley/girc/internal/ctxgroup.(*Group).Go.func1()
        /go/src/matterbridge/vendor/github.com/lrstanley/girc/internal/ctxgroup/ctxgroup.go:58 +0x6e
created by github.com/lrstanley/girc/internal/ctxgroup.(*Group).Go
        /go/src/matterbridge/vendor/github.com/lrstanley/girc/internal/ctxgroup/ctxgroup.go:55 +0x8d
time="2024-04-16T14:13:38Z" level=info msg="Running version 1.26.1-dev 56e7bd0" prefix=main

Environment (please complete the following information):

42wim commented 5 months ago

The girc library has been updated on master, try running lastest docker image