Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reconnecting to PubSub crashes the bot #648

Open
zneix opened this issue Dec 15, 2021 · 1 comment
Open

Reconnecting to PubSub crashes the bot #648

zneix opened this issue Dec 15, 2021 · 1 comment
Labels
bug Issues relating to bugs

Comments

@zneix
Copy link
Contributor

zneix commented Dec 15, 2021

Running (4e61221@master go1.17.4 built 2021-12-06T16:30:41+01:00)

Dec 15 17:46:17 shungite pajbot2[287959]: 2021/12/15 17:46:17 Channel zneixbot initialized successfully
Dec 15 17:46:17 shungite pajbot2[287959]: 2021/12/15 17:46:17 Channel zneix initialized successfully
Dec 15 17:48:06 shungite pajbot2[287959]: [go-twitch-pubsub] Lost connection, will try to reconnect
Dec 15 18:13:37 shungite pajbot2[287959]: panic: concurrent write to websocket connection
Dec 15 18:13:37 shungite pajbot2[287959]: goroutine 1028817 [running]:
Dec 15 18:13:38 shungite pajbot2[287959]: github.com/gorilla/websocket.(*messageWriter).flushFrame(0xc000ffb2c0, 0x1, {0x0, 0x7f4981dcb5b8, 0x0})
Dec 15 18:13:38 shungite pajbot2[287959]:         /opt/pajbot/go/pkg/mod/github.com/gorilla/[email protected]/conn.go:610 +0x52b
Dec 15 18:13:38 shungite pajbot2[287959]: github.com/gorilla/websocket.(*messageWriter).Close(0x0)
Dec 15 18:13:38 shungite pajbot2[287959]:         /opt/pajbot/go/pkg/mod/github.com/gorilla/[email protected]/conn.go:724 +0x45
Dec 15 18:13:38 shungite pajbot2[287959]: github.com/gorilla/websocket.(*Conn).beginMessage(0xc000e4b340, 0xc003b6c270, 0x1)
Dec 15 18:13:38 shungite pajbot2[287959]:         /opt/pajbot/go/pkg/mod/github.com/gorilla/[email protected]/conn.go:473 +0x42
Dec 15 18:13:38 shungite pajbot2[287959]: github.com/gorilla/websocket.(*Conn).NextWriter(0xc000e4b340, 0x1)
Dec 15 18:13:38 shungite pajbot2[287959]:         /opt/pajbot/go/pkg/mod/github.com/gorilla/[email protected]/conn.go:513 +0x45
Dec 15 18:13:38 shungite pajbot2[287959]: github.com/gorilla/websocket.(*Conn).WriteMessage(0xc00004bf98, 0xc00004bf78, {0xc002696810, 0x0, 0x9d3d01})
Dec 15 18:13:38 shungite pajbot2[287959]:         /opt/pajbot/go/pkg/mod/github.com/gorilla/[email protected]/conn.go:766 +0x165
Dec 15 18:13:38 shungite pajbot2[287959]: github.com/pajlada/go-twitch-pubsub.(*connection).startWriter(0xc000e6f290)
Dec 15 18:13:38 shungite pajbot2[287959]:         /opt/pajbot/go/pkg/mod/github.com/pajlada/[email protected]/connection.go:220 +0x47
Dec 15 18:13:38 shungite pajbot2[287959]: created by github.com/pajlada/go-twitch-pubsub.(*connection).connect
Dec 15 18:13:38 shungite pajbot2[287959]:         /opt/pajbot/go/pkg/mod/github.com/pajlada/[email protected]/connection.go:190 +0xfd
Dec 15 18:13:38 shungite systemd[1]: pajbot2.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Dec 15 18:13:38 shungite systemd[1]: pajbot2.service: Failed with result 'exit-code'.
Dec 15 18:13:38 shungite systemd[1]: pajbot2.service: Consumed 13min 22.885s CPU time.
Dec 15 18:13:40 shungite systemd[1]: pajbot2.service: Scheduled restart job, restart counter is at 2.
Dec 15 18:13:40 shungite systemd[1]: Stopped pajbot2.
Dec 15 18:13:40 shungite systemd[1]: pajbot2.service: Consumed 13min 22.885s CPU time.
@ALazyMeme
Copy link
Member

Same issue:

Dec 16 13:08:51 hendrix start.sh[1211]: [go-twitch-pubsub] Lost connection, will try to reconnect
Dec 16 13:09:34 hendrix start.sh[1211]: panic: concurrent write to websocket connection
Dec 16 13:09:34 hendrix start.sh[1211]: goroutine 2418802 [running]:
Dec 16 13:09:34 hendrix start.sh[1211]: github.com/gorilla/websocket.(*messageWriter).flushFrame(0xc001cb7dd0, 0x44fe01, 0x0, 0x0, 0x0, 0x7feb66bcca68, 0x30)
Dec 16 13:09:34 hendrix start.sh[1211]:         /home/pajbot/go/pkg/mod/github.com/gorilla/[email protected]/conn.go:610 +0x62e
Dec 16 13:09:34 hendrix start.sh[1211]: github.com/gorilla/websocket.(*messageWriter).Close(0xc001cb7dd0, 0x0, 0xc001cbfe60)
Dec 16 13:09:34 hendrix start.sh[1211]:         /home/pajbot/go/pkg/mod/github.com/gorilla/[email protected]/conn.go:724 +0x65
Dec 16 13:09:34 hendrix start.sh[1211]: github.com/gorilla/websocket.(*Conn).beginMessage(0xc000828840, 0xc001662840, 0x1, 0x2, 0x2)
Dec 16 13:09:34 hendrix start.sh[1211]:         /home/pajbot/go/pkg/mod/github.com/gorilla/[email protected]/conn.go:473 +0x262
Dec 16 13:09:34 hendrix start.sh[1211]: github.com/gorilla/websocket.(*Conn).NextWriter(0xc000828840, 0x1, 0xc001a36960, 0xc001a36960, 0xc0015689c0, 0xc001dd2088)
Dec 16 13:09:34 hendrix start.sh[1211]:         /home/pajbot/go/pkg/mod/github.com/gorilla/[email protected]/conn.go:513 +0x53
Dec 16 13:09:34 hendrix start.sh[1211]: github.com/gorilla/websocket.(*Conn).WriteMessage(0xc000828840, 0x1, 0xc000cf2840, 0xf, 0x10, 0x1, 0x1)
Dec 16 13:09:34 hendrix start.sh[1211]:         /home/pajbot/go/pkg/mod/github.com/gorilla/[email protected]/conn.go:766 +0x6e
Dec 16 13:09:34 hendrix start.sh[1211]: github.com/pajlada/go-twitch-pubsub.(*connection).startWriter(0xc001a3e5a0)
Dec 16 13:09:34 hendrix start.sh[1211]:         /home/pajbot/go/pkg/mod/github.com/pajlada/[email protected]/connection.go:220 +0x6d
Dec 16 13:09:34 hendrix start.sh[1211]: created by github.com/pajlada/go-twitch-pubsub.(*connection).connect
Dec 16 13:09:34 hendrix start.sh[1211]:         /home/pajbot/go/pkg/mod/github.com/pajlada/[email protected]/connection.go:190 +0x10c
Dec 16 13:09:34 hendrix systemd[1]: pajbot2.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Dec 16 13:09:34 hendrix systemd[1]: pajbot2.service: Failed with result 'exit-code'.
Dec 16 13:09:36 hendrix systemd[1]: pajbot2.service: Scheduled restart job, restart counter is at 2.
Dec 16 13:09:36 hendrix systemd[1]: Stopped pajbot2.

@ALazyMeme ALazyMeme added the bug Issues relating to bugs label Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues relating to bugs
Projects
None yet
Development

No branches or pull requests

2 participants