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

server: Fix syncNotified race. #2932

Merged
merged 1 commit into from
Apr 29, 2022
Merged

Conversation

dnldd
Copy link
Member

@dnldd dnldd commented Apr 27, 2022

This fixes a race with the syncNotified field of a serverPeer.

==================                                                                                                                                                                                          
WARNING: DATA RACE                                                                                                                                                                                          
Read at 0x00c01dff946b by goroutine 183:                                                                                                                                                                    
  main.(*server).peerDoneHandler()                                                                                                                                                                          
      /Users/dnldd/Work/dcrd/server.go:2253 +0xa8                                                                                                                                                           
                                                                                                                                                                                                            
Previous write at 0x00c01dff946b by goroutine 46:                                                                                                                                                           
  main.(*server).peerHandler()                                                                                                                                                                              
      /Users/dnldd/Work/dcrd/server.go:2317 +0x4b4                                                                                                                                                          
                                                                                                                                                                                                            
Goroutine 183 (running) created at:                                                                                                                                                                         
  main.(*server).outboundPeerConnected()                                                                                                                                                                    
      /Users/dnldd/Work/dcrd/server.go:2236 +0x5bc                                                                                                                                                          
  main.(*server).outboundPeerConnected-fm()                                                                                                                                                                 
      /Users/dnldd/Work/dcrd/server.go:2224 +0x58
...

This fixes a race with the syncNotified field of a serverPeer.
@davecgh davecgh added this to the 1.8.0 milestone Apr 27, 2022
server.go Show resolved Hide resolved
@davecgh davecgh merged commit d47a897 into decred:master Apr 29, 2022
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

Successfully merging this pull request may close these issues.

3 participants