qaisjp/go-discord-irc

Fatal error and everything shutdown after working nice 9 hours.

BCC-BGChatCommunity opened this issue · 1 comments

time="2022-01-24T13:59:10+02:00" level=info msg="IRC connection cooldownTimer created..." nick=Luzifer_Todorov
2022/01/24 13:59:12 Connected to irc.domain.be:6667 (ip:6667)
time="2022-01-24T13:59:14+02:00" level=info msg="IRC connection expired by cooldownTimer..." nick=izcheznaaa
time="2022-01-24T13:59:14+02:00" level=info msg="Closing connection." nick=izcheznaaa
2022/01/24 13:59:14 Connected to irc.domain.be:6667 (ip:6667)
2022/01/24 13:59:14 Connected to irc.domain.be:6667 (ip:6667)
fatal error: concurrent map writes

goroutine 133178 [running]:
runtime.throw(0x8c8dff, 0x15)
/usr/lib/go-1.16/src/runtime/panic.go:1117 +0x72 fp=0xc001784df8 sp=0xc001784dc8 pc=0x437d12
runtime.mapassign_faststr(0x8325e0, 0xc000083fb0, 0xc000e78e70, 0xc, 0xc000087120)
/usr/lib/go-1.16/src/runtime/map_faststr.go:291 +0x3d8 fp=0xc001784e60 sp=0xc001784df8 pc=0x415e38
github.com/qaisjp/go-discord-irc/bridge.(*ircConnection).OnWelcome(0xc0044bdae0, 0xc00161af00)
/home/user/discord/go-discord-irc/bridge/irc_connection.go:60 +0xe5 fp=0xc001784eb8 sp=0xc001784e60 pc=0x75f5a5
github.com/qaisjp/go-discord-irc/bridge.(*ircConnection).OnWelcome-fm(0xc00161af00)
/home/user/discord/go-discord-irc/bridge/irc_connection.go:50 +0x3d fp=0xc001784ed8 sp=0xc001784eb8 pc=0x768ebd
github.com/qaisjp/go-ircevent.(*Connection).RunCallbacks.func1(0xc00288ca00, 0x1, 0xc003866c60, 0xc003d5e310, 0xc00161af00)
/home/user/go/pkg/mod/github.com/qaisjp/go-ircevent@v0.0.0-20210224154625-07452bfb05b5/irc_callback.go:164 +0x6a fp=0xc001784fb8 sp=0xc001784ed8 pc=0x743a8a
runtime.goexit()
/usr/lib/go-1.16/src/runtime/asm_amd64.s:1371 +0x1 fp=0xc001784fc0 sp=0xc001784fb8 pc=0x46dae1
created by github.com/qaisjp/go-ircevent.(*Connection).RunCallbacks
/home/user/go/pkg/mod/github.com/qaisjp/go-ircevent@v0.0.0-20210224154625-07452bfb05b5/irc_callback.go:162 +0x45e

goroutine 1 [chan receive, 157 minutes]:
main.main()
/home/user/discord/go-discord-irc/main.go:250 +0x1b07

And many more lines in error log. Now i take a update for go to last version and i got same error.
This bot take about 1000+ users and everyday in different time take error and shutdown everything. Please help with that issue!

After update version of go to latest 24hours no problems.