Closed wapsi closed 1 year ago
Actually it seems that every time when I try to start the bridge, it invites me to one new room and then immediately crashes.
Some debug log just before the crash:
[Oct 4, 2022 15:32:37] [Matrix/Bot/DEBUG] req #22: PUT http://localhost:8008/_matrix/client/v3/rooms/%21xxxx:foo.bar.com/state/m.room.member/@foouser:foo.bar.com?user_id=%40slackbot%3Afoo.bar.com {"membership":"invite"}
[Oct 4, 2022 15:32:37] [Matrix/DEBUG] Starting handling of transaction 8018971 (1 PDUs)
[Oct 4, 2022 15:32:37] [Matrix/Bot/DEBUG] req #22 (/v3/rooms/!xxx:foo.bar.com/state/m.room.member/@foouser:foo.bar.com) completed in 36.48196ms with status 200 and 59 bytes of application/json body
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0xaa63a5]
goroutine 62 [running]:
main.(*User).updateChatMute(0xc000432140, 0xc000438a80, 0x1)
/opt/mautrix-slack/current/user.go:747 +0x45
main.(*Portal).CreateMatrixRoom(0xc000438a80, 0xc000432140, 0xc0003140a0, 0xc0004951a6?, 0x0)
/opt/mautrix-slack/current/portal.go:370 +0xf7d
main.(*Portal).HandleSlackMessage(0xc000438a80, 0xc00036d950?, 0xc0003140a0, 0xc000496b00)
/opt/mautrix-slack/current/portal.go:1354 +0x35e
main.(*User).slackMessageHandler(0xc000432140, 0xc0003140a0)
/opt/mautrix-slack/current/user.go:415 +0x8c7
created by main.(*User).connectTeam
/opt/mautrix-slack/current/user.go:467 +0x46b
Should be fixed in 19422dd
Hmm, I compiled the fixed version from the git now, but I was able to re-produce the issue, two times within 5 minutes:
[Oct 4, 2022 18:09:09] [Portal/T03BQ3NU9-C040N0SQY/INFO] Matrix room created: !xxx:foobar.com
[Oct 4, 2022 18:09:09] [Matrix/Bot/DEBUG] req #16: PUT http://localhost:8008/_matrix/client/v3/rooms/%21xxx:foobar.com/state/m.room.member/@foouser:foobar.com?user_id=%40slackbot%3Afoobar.com {"membership":"invite"}
[Oct 4, 2022 18:09:09] [Matrix/Bot/DEBUG] req #16 (/v3/rooms/!xxx:foobar.com/state/m.room.member/@foouser:foobar.com) completed in 185.805367ms with status 200 and 59 bytes of application/json body
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0xaa63a5]
goroutine 45 [running]:
main.(*User).updateChatMute(0xc000432080, 0xc000073380, 0x1)
/opt/mautrix-slack/20221004_2/user.go:747 +0x45
main.(*Portal).CreateMatrixRoom(0xc000073380, 0xc000432080, 0xc00043d400, 0xc0002f9827?, 0x0)
/opt/mautrix-slack/20221004_2/portal.go:370 +0xf7d
main.(*Portal).HandleSlackMessage(0xc000073380, 0xc000029b90?, 0xc00043d400, 0xc0003f3600)
/opt/mautrix-slack/20221004_2/portal.go:1354 +0x35e
main.(*User).slackMessageHandler(0xc000432080, 0xc00043d400)
/opt/mautrix-slack/20221004_2/user.go:415 +0x8c7
created by main.(*User).connectTeam
/opt/mautrix-slack/20221004_2/user.go:467 +0x46b
[Oct 4, 2022 18:24:18] [Matrix/Bot/DEBUG] req #48 (/v3/createRoom) completed in 437.839018ms with status 200 and 43 bytes of application/json body
[Oct 4, 2022 18:24:18] [Portal/T03BQ3NU9-C66UM4J82/INFO] Matrix room created: !xxx:foobar.com
[Oct 4, 2022 18:24:18] [Matrix/Bot/DEBUG] req #49: PUT http://localhost:8008/_matrix/client/v3/rooms/%21xxx:foobar.com/state/m.room.member/@foouser:foobar.com?user_id=%40slackbot%3Afoobar.com {"membership":"invite"}
[Oct 4, 2022 18:24:18] [Matrix/DEBUG] Starting handling of transaction 8020574 (1 PDUs)
[Oct 4, 2022 18:24:18] [Matrix/Bot/DEBUG] req #49 (/v3/rooms/!xxx:foobar.com/state/m.room.member/@foouser:foobar.com) completed in 40.57135ms with status 200 and 59 bytes of application/json body
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0xaa63a5]
goroutine 50 [running]:
main.(*User).updateChatMute(0xc0004300c0, 0xc0000b6cc0, 0x1)
/opt/mautrix-slack/20221004_2/user.go:747 +0x45
main.(*Portal).CreateMatrixRoom(0xc0000b6cc0, 0xc0004300c0, 0xc000444460, 0xc0002a9470?, 0x0)
/opt/mautrix-slack/20221004_2/portal.go:370 +0xf7d
main.(*Portal).HandleSlackMessage(0xc0000b6cc0, 0xc00042aee0?, 0xc000444460, 0xc000494dc0)
/opt/mautrix-slack/20221004_2/portal.go:1354 +0x35e
main.(*User).slackMessageHandler(0xc0004300c0, 0xc000444460)
/opt/mautrix-slack/20221004_2/user.go:415 +0x8c7
created by main.(*User).connectTeam
/opt/mautrix-slack/20221004_2/user.go:467 +0x46b
Yes, I see I made a mistake in the last fix. Try again now and see if it crashes with the latest commit now?
So far, so good! :)
I was setupping the bridge (compiled the git version from 2022-10-04 and tried to use pre-compiled binary as well (from here: https://mau.dev/mautrix/slack/-/pipelines?scope=branches&page=1), and right after the login the bridge crashes and throws the following error in the console where I'm running the mautrix-slack binary (Go version: go1.19.1 linux/amd64):
I think the login was successful, because the bridge created couple of rooms already, but then it keeps crashing.
Is this problem with the bridge itself, or is it maybe problem with my environment (I'm using Synapse on Debian, version: 1.68.0+buster1)?