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

data race - discord #815

Closed
dajohi opened this issue Apr 28, 2019 · 6 comments
Closed

data race - discord #815

dajohi opened this issue Apr 28, 2019 · 6 comments

Comments

@dajohi
Copy link
Contributor

dajohi commented Apr 28, 2019

[2019-04-26T23:14:42Z] ERROR matrix:       Content[body] is not a string: <nil>                                      
map[string]interface {}{}     
==================            
WARNING: DATA RACE            
Write at 0x00c0011bcd20 by goroutine 77:                    
  github.com/bwmarrin/discordgo.(*State).OnInterface()      
      /home/matterbridge/.go/pkg/mod/github.com/bwmarrin/discordgo@v0.19.0/state.go:929 +0x1360                      
  github.com/bwmarrin/discordgo.(*Session).onInterface()    
      /home/matterbridge/.go/pkg/mod/github.com/bwmarrin/discordgo@v0.19.0/event.go:236 +0x1be                       
  github.com/bwmarrin/discordgo.(*Session).handleEvent()    
      /home/matterbridge/.go/pkg/mod/github.com/bwmarrin/discordgo@v0.19.0/event.go:194 +0x96                        
  github.com/bwmarrin/discordgo.(*Session).onEvent()        
      /home/matterbridge/.go/pkg/mod/github.com/bwmarrin/discordgo@v0.19.0/wsapi.go:562 +0x18ce                      
  github.com/bwmarrin/discordgo.(*Session).listen()         
      /home/matterbridge/.go/pkg/mod/github.com/bwmarrin/discordgo@v0.19.0/wsapi.go:251 +0xaf                        

Previous read at 0x00c0011bcd20 by goroutine 79:            
  github.com/42wim/matterbridge/bridge/discord.(*Bdiscord).memberAdd()                                               
      /home/matterbridge/.go/src/github.com/42wim/matterbridge/bridge/discord/handlers.go:135 +0xac                  
  github.com/42wim/matterbridge/bridge/discord.(*Bdiscord).memberAdd-fm()                                            
      /home/matterbridge/.go/src/github.com/42wim/matterbridge/bridge/discord/handlers.go:130 +0x55                  
  github.com/bwmarrin/discordgo.guildMemberAddEventHandler.Handle()                                                  
      /home/matterbridge/.go/pkg/mod/github.com/bwmarrin/discordgo@v0.19.0/eventhandlers.go:317 +0x69                

Goroutine 77 (running) created at:                          
  github.com/bwmarrin/discordgo.(*Session).Open()           
      /home/matterbridge/.go/pkg/mod/github.com/bwmarrin/discordgo@v0.19.0/wsapi.go:203 +0x1319                      
  github.com/bwmarrin/discordgo.(*Session).reconnect()      
      /home/matterbridge/.go/pkg/mod/github.com/bwmarrin/discordgo@v0.19.0/wsapi.go:796 +0x128                       
  github.com/bwmarrin/discordgo.(*Session).listen()         
      /home/matterbridge/.go/pkg/mod/github.com/bwmarrin/discordgo@v0.19.0/wsapi.go:239 +0x38b                       

Goroutine 79 (finished) created at:                         
  github.com/bwmarrin/discordgo.(*Session).handle()         
      /home/matterbridge/.go/pkg/mod/github.com/bwmarrin/discordgo@v0.19.0/event.go:171 +0x1df                       
  github.com/bwmarrin/discordgo.(*Session).handleEvent()    
      /home/matterbridge/.go/pkg/mod/github.com/bwmarrin/discordgo@v0.19.0/event.go:200 +0x103                       
  github.com/bwmarrin/discordgo.(*Session).onEvent()        
      /home/matterbridge/.go/pkg/mod/github.com/bwmarrin/discordgo@v0.19.0/wsapi.go:562 +0x18ce                      
  github.com/bwmarrin/discordgo.(*Session).listen()         
      /home/matterbridge/.go/pkg/mod/github.com/bwmarrin/discordgo@v0.19.0/wsapi.go:251 +0xaf                        
==================  
@dajohi
Copy link
Contributor Author

dajohi commented Apr 28, 2019

tagging @bwmarrin

@bwmarrin
Copy link

thanks for the ping @dajohi :) I'll see what I can find on my side.

@bwmarrin
Copy link

bwmarrin commented Apr 30, 2019

@dajohi
Copy link
Contributor Author

dajohi commented Apr 30, 2019

@bwmarrin correct. So which discordgo API should be used for concurrent-safe reads?

@bwmarrin
Copy link

bwmarrin commented May 6, 2019

@dajohi they're using it just fine. It's a library issue that will need fixed on discordgo side.

@42wim
Copy link
Owner

42wim commented Dec 6, 2020

Going to close this here, as it needs to be addressed upstream and is already an open issue there.

@42wim 42wim closed this as completed Dec 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants