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

v3: 238-branch: Data race with ws.sendLimiter #242

Open
1lann opened this issue Jul 6, 2021 · 0 comments
Open

v3: 238-branch: Data race with ws.sendLimiter #242

1lann opened this issue Jul 6, 2021 · 0 comments

Comments

@1lann
Copy link
Contributor

1lann commented Jul 6, 2021

I got a data race (that I have not attempted to reproduce and does not reproduce on its own, I got a weird unauthorized error from the gateway) on 238-branch. Just noting it down here if you or I could investigate it later:

==================
WARNING: DATA RACE
Write at 0x00c000072120 by main goroutine:
  github.com/diamondburned/arikawa/v3/utils/wsutil.(*Websocket).Dial()
      C:/Users/jason/go/pkg/mod/github.com/diamondburned/arikawa/[email protected]/utils/wsutil/ws.go:103 +0x316
  github.com/diamondburned/arikawa/v3/gateway.(*Gateway).Open()
      C:/Users/jason/go/pkg/mod/github.com/diamondburned/arikawa/[email protected]/gateway/gateway.go:361 +0x139
  github.com/diamondburned/arikawa/v3/session.(*Session).Open()
      C:/Users/jason/go/pkg/mod/github.com/diamondburned/arikawa/[email protected]/session/session.go:144 +0x1a4
  main.(*Bot).Start()
      K:/Douki/tmpphone/bot.go:71 +0xf2
  main.main()
      K:/Douki/tmpphone/main.go:125 +0x12ac

Previous read at 0x00c000072120 by goroutine 31:
  github.com/diamondburned/arikawa/v3/utils/wsutil.(*Websocket).SendCtx()
      C:/Users/jason/go/pkg/mod/github.com/diamondburned/arikawa/[email protected]/utils/wsutil/ws.go:131 +0xf5
  github.com/diamondburned/arikawa/v3/gateway.(*Gateway).SendCtx()
      C:/Users/jason/go/pkg/mod/github.com/diamondburned/arikawa/[email protected]/gateway/gateway.go:524 +0x229
  github.com/diamondburned/arikawa/v3/gateway.(*Gateway).UpdateVoiceStateCtx()
      C:/Users/jason/go/pkg/mod/github.com/diamondburned/arikawa/[email protected]/gateway/commands.go:120 +0x293
  github.com/diamondburned/arikawa/v3/voice.(*Session).JoinChannelCtx()
      C:/Users/jason/go/pkg/mod/github.com/diamondburned/arikawa/[email protected]/voice/session.go:212 +0x1e6
  github.com/diamondburned/arikawa/v3/voice.(*Session).JoinChannel()
      C:/Users/jason/go/pkg/mod/github.com/diamondburned/arikawa/[email protected]/voice/session.go:167 +0x144
  main.NewBot.func1()
      K:/Douki/tmpphone/bot.go:62 +0x87

Goroutine 31 (running) created at:
  main.NewBot()
      K:/Douki/tmpphone/bot.go:61 +0x54e
  main.main()
      K:/Douki/tmpphone/main.go:66 +0xbcc
==================
2021/07/06 00:34:29 Gateway error: websocket: close sent
panic: failed to start gateway: first error: WS error: websocket: close 4003: Not authenticated.

goroutine 1 [running]:
main.main()
        K:/Douki/tmpphone/main.go:127 +0x18de
exit status 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant