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

Neutrino: Race detected at start-up #170

Closed
johnsonjh opened this issue Nov 4, 2020 · 2 comments
Closed

Neutrino: Race detected at start-up #170

johnsonjh opened this issue Nov 4, 2020 · 2 comments

Comments

@johnsonjh
Copy link

Race detector goes off immediate at startup with Neutrino:

==================                                                            
WARNING: DATA RACE                                                            
Write at 0x00c0179ac498 by goroutine 83:                                      
  github.com/pkt-cash/pktd/addrmgr.(*AddrManager).Attempt()                   
      github.com/pkt-cash/pktd/addrmgr/addrmanager.go:862 +0x1c8              
  github.com/pkt-cash/pktd/neutrino.(*ChainService).outboundPeerConnected()   
      github.com/pkt-cash/pktd/neutrino/neutrino.go:1414 +0x433               
  github.com/pkt-cash/pktd/neutrino.(*ChainService).outboundPeerConnected-fm()
      github.com/pkt-cash/pktd/neutrino/neutrino.go:1388 +0x64                
                                                                              
Previous read at 0x00c0179ac498 by goroutine 136:                             
  github.com/pkt-cash/pktd/addrmgr.(*KnownAddress).LastAttempt()              
      github.com/pkt-cash/pktd/addrmgr/knownaddress.go:34 +0x5d0              
  github.com/pkt-cash/pktd/neutrino.NewChainService.func5()                   
      github.com/pkt-cash/pktd/neutrino/neutrino.go:806 +0x3c6                
  github.com/pkt-cash/pktd/connmgr.(*ConnManager).NewConnReq()                
      github.com/pkt-cash/pktd/connmgr/connmanager.go:406 +0x401              
  github.com/pkt-cash/pktd/connmgr.(*ConnManager).handleFailedConn.func3()
      github.com/pkt-cash/pktd/connmgr/connmanager.go:225 +0x52           
                                                                          
Goroutine 83 (running) created at:                                        
  github.com/pkt-cash/pktd/connmgr.(*ConnManager).connHandler()           
      github.com/pkt-cash/pktd/connmgr/connmanager.go:281 +0x115b         
                                                                          
Goroutine 136 (running) created at:                                       
  github.com/pkt-cash/pktd/connmgr.(*ConnManager).handleFailedConn()      
      github.com/pkt-cash/pktd/connmgr/connmanager.go:223 +0x6c4          
  github.com/pkt-cash/pktd/connmgr.(*ConnManager).connHandler()           
      github.com/pkt-cash/pktd/connmgr/connmanager.go:355 +0x4c4          
==================                                                        
@johnsonjh
Copy link
Author

And here's another one found in Neutrino... seems to be the usual suspects involved:

==================
WARNING: DATA RACE
Read at 0x00c0005db390 by goroutine 156:
  github.com/pkt-cash/pktd/connmgr.(*ConnManager).handleFailedConn()
      github.com/pkt-cash/pktd/connmgr/connmanager.go:212 +0x3f3
  github.com/pkt-cash/pktd/connmgr.(*ConnManager).connHandler()
      github.com/pkt-cash/pktd/connmgr/connmanager.go:355 +0x4c4

Previous write at 0x00c0005db390 by goroutine 127:
  ??()
      -:0 +0xffffffffffffffff
  github.com/pkt-cash/pktd/addrmgr.(*AddrManager).Good()
      github.com/pkt-cash/pktd/addrmgr/addrmanager.go:920 +0x310
  github.com/pkt-cash/pktd/neutrino.(*ServerPeer).OnVersion()
      github.com/pkt-cash/pktd/neutrino/neutrino.go:280 +0x8f5
  github.com/pkt-cash/pktd/neutrino.(*ServerPeer).OnVersion-fm()
      github.com/pkt-cash/pktd/neutrino/neutrino.go:219 +0x55
  github.com/pkt-cash/pktd/peer.(*Peer).readRemoteVersionMsg()
      github.com/pkt-cash/pktd/peer/peer.go:2055 +0x9dc
  github.com/pkt-cash/pktd/peer.(*Peer).negotiateOutboundProtocol()
      github.com/pkt-cash/pktd/peer/peer.go:2161 +0x86
  github.com/pkt-cash/pktd/peer.(*Peer).start.func1()
      github.com/pkt-cash/pktd/peer/peer.go:2173 +0xa4

Goroutine 156 (running) created at:
  github.com/pkt-cash/pktd/connmgr.(*ConnManager).Start()
      github.com/pkt-cash/pktd/connmgr/connmanager.go:536 +0x126

Goroutine 127 (finished) created at:
  github.com/pkt-cash/pktd/peer.(*Peer).start()
      github.com/pkt-cash/pktd/peer/peer.go:2169 +0x13e
  github.com/pkt-cash/pktd/peer.(*Peer).AssociateConnection.func1()
      github.com/pkt-cash/pktd/peer/peer.go:2230 +0x3c
==================

@johnsonjh
Copy link
Author

Later on, hit again, but identical to the first one posted.

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