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

Deadlock error #22

Closed
namelessperson0 opened this issue Oct 21, 2021 · 1 comment
Closed

Deadlock error #22

namelessperson0 opened this issue Oct 21, 2021 · 1 comment

Comments

@namelessperson0
Copy link
Contributor

Getting the below Deadlock error

I1021 12:48:25.391863       1 server.go:1131] Server._handleBlock: Received block ( 10484 / 71060 ) from Peer [ Remote Address: 35.232.92.5:17000 Peer
ID=1 ]                                                                                                                                                
I1021 12:48:32.586066       1 block_producer.go:327] Produced block with 1 txns with approx 0 total txns in mempool                                   
I1021 12:48:42.593449       1 block_producer.go:327] Produced block with 1 txns with approx 0 total txns in mempool                                   
I1021 12:48:44.700017       1 server.go:1131] Server._handleBlock: Received block ( 10485 / 71060 ) from Peer [ Remote Address: 35.232.92.5:17000 Peer
ID=1 ]                                                                                                                                                
I1021 12:48:52.613061       1 block_producer.go:327] Produced block with 1 txns with approx 0 total txns in mempool                                   
I1021 12:49:02.693992       1 block_producer.go:327] Produced block with 1 txns with approx 0 total txns in mempool                                   
I1021 12:59:27.471689       1 connection_manager.go:574] Rejecting INBOUND peer (65.21.93.96:40864) due to already having an inbound connection from t
he same IP with limit_one_inbound_connection_per_ip set.                                                                                              
E1021 12:59:27.477029       1 peer.go:1060] ReadDeSoMessage: : ReadMessage: Could not read MsgType: read tcp 185.69.166.144:39742->34.123.41.111:17000
: use of closed network connection                                                                                                                    
E1021 12:59:27.477092       1 peer.go:919] Peer.inHandler: Can't read message from peer [ Remote Address: 34.123.41.111:17000, DISCONNECTED PeerID=2 ]
: ReadDeSoMessage: : ReadMessage: Could not read MsgType: read tcp 185.69.166.144:39742->34.123.41.111:17000: use of closed network connection        
E1021 12:59:27.477046       1 peer.go:1060] ReadDeSoMessage: : ReadMessage: Could not read MsgType: read tcp 185.69.166.144:33458->46.4.89.216:17000: 
use of closed network connection                                                                                                                      
E1021 12:59:27.477204       1 peer.go:919] Peer.inHandler: Can't read message from peer [ Remote Address: 46.4.89.216:17000, DISCONNECTED PeerID=4 ]: 
ReadDeSoMessage: : ReadMessage: Could not read MsgType: read tcp 185.69.166.144:33458->46.4.89.216:17000: use of closed network connection            
E1021 15:54:49.651852       1 peer.go:1060] ReadDeSoMessage: : ReadMessage: Could not read MsgType: read tcp 185.69.166.144:17000->65.21.93.96:37920: 
use of closed network connection                                                                                                                      
badger 2021/10/21 15:54:49 INFO: Block cache metrics: hit: 5385222 miss: 973539 keys-added: 282663 keys-updated: 44 keys-evicted: 216295 cost-added: 1
136598192 cost-evicted: 868163136 sets-dropped: 0 sets-rejected: 688614 gets-dropped: 1856 gets-kept: 6356672 gets-total: 6358761 hit-ratio: 0.85     
POTENTIAL DEADLOCK:                                                                                                                                   
Previous place where the lock was grabbed                                                                                                             
goroutine 887651 lock 0xc29cb1aacc                                                                                                                    
E1021 15:54:49.990728       1 peer.go:788] Peer.outHandler: Peer [ Remote Address: 35.232.92.5:17000 PeerID=1 ] took too long to response to reqest. E
xpected MsgType=BLOCK at time 2021-10-21 13:02:55.341119554 +0000 UTC m=+2917.552453170 but it is now time 2021-10-21 13:03:29.916084911 +0000 UTC m=+
2952.127418529                                                                                                                                        
E1021 15:55:01.989426       1 peer.go:919] Peer.inHandler: Can't read message from peer [ Remote Address: 65.21.93.96:37920, DISCONNECTED PeerID=7 ]: 
ReadDeSoMessage: : ReadMessage: Could not read MsgType: read tcp 185.69.166.144:17000->65.21.93.96:37920: use of closed network connection            
deso/src/core/lib/peer.go:156 lib.(*Peer).MaybeDequeueDeSoMessage ??? <<<<<                                                                           
deso/src/core/lib/peer.go:418 lib.(*Peer).StartDeSoMessageProcessor ???                                                                               

Have been trying to lock it again for more than 10m0s
goroutine 2657040 lock 0xc29cb1aacc                                                                                                                   
                                                                                                                                                      
Here is what goroutine 887651 doing now                                                                                                               
goroutine 887651 [semacquire]:                                                                                                                        
sync.runtime_SemacquireMutex(0x488b45, 0xcc, 0xc00003e030)                                                                                            
        /usr/lib/go/src/runtime/sema.go:71 +0x25                                                                                                      
sync.(*Mutex).lockSlow(0xc0001260c0)                                                                                                                  
        /usr/lib/go/src/sync/mutex.go:138 +0x165                                                                                                      
sync.(*Mutex).Lock(...)                                                                                                                               
        /usr/lib/go/src/sync/mutex.go:81                                                                                                              
github.com/sasha-s/go-deadlock.(*lockOrder).postUnlock(0xc0001260c0, {0xfade20, 0xc29cb1aacc})
        /deso/src/core/third_party/github.com/sasha-s/go-deadlock/deadlock.go:332 +0x50
github.com/sasha-s/go-deadlock.postUnlock(...)
        /deso/src/core/third_party/github.com/sasha-s/go-deadlock/deadlock.go:169
github.com/sasha-s/go-deadlock.(*RWMutex).Unlock(0xc29cb1aacc)
        /deso/src/core/third_party/github.com/sasha-s/go-deadlock/deadlock.go:131 +0x47
github.com/deso-protocol/core/lib.(*Peer).MaybeDequeueDeSoMessage(0xc29cb1a900)
        /deso/src/core/lib/peer.go:161 +0x142
github.com/deso-protocol/core/lib.(*Peer).StartDeSoMessageProcessor(0xc29cb1a900)
        /deso/src/core/lib/peer.go:418 +0x8b
created by github.com/deso-protocol/core/lib.(*Peer).Start
        /deso/src/core/lib/peer.go:1017 +0x16f
Other goroutines holding locks:
goroutine 2335 lock 0xc0007a088c
deso/src/core/lib/peer.go:156 lib.(*Peer).MaybeDequeueDeSoMessage ??? <<<<< 
deso/src/core/lib/peer.go:418 lib.(*Peer).StartDeSoMessageProcessor ???
goroutine 58 lock 0xc0001612d0
deso/src/core/lib/blockchain.go:1643 lib.(*Blockchain).ProcessBlock ??? <<<<<
deso/src/core/lib/server.go:1177 lib.(*Server)._handleBlock ???
deso/src/core/lib/server.go:1480 lib.(*Server)._handlePeerMessages ???
deso/src/core/lib/server.go:1520 lib.(*Server).messageHandler ???

goroutine 54 lock 0xc0005342e0
deso/src/core/lib/mempool.go:1965 lib.(*DeSoMempool).RegenerateReadOnlyView ??? <<<<<
deso/src/core/lib/mempool.go:1924 lib.(*DeSoMempool).StartReadOnlyUtxoViewRegenerator.func1 ???

goroutine 291 lock 0xc00016e344
deso/src/core/lib/connection_manager.go:206 lib.(*ConnectionManager).getRandomAddr ??? <<<<<
deso/src/core/lib/connection_manager.go:304 lib.(*ConnectionManager)._getOutboundConn ???
deso/src/core/lib/connection_manager.go:389 lib.(*ConnectionManager).ConnectPeer ???

goroutine 16245 lock 0xc0541f240c
deso/src/core/lib/peer.go:156 lib.(*Peer).MaybeDequeueDeSoMessage ??? <<<<< 
deso/src/core/lib/peer.go:418 lib.(*Peer).StartDeSoMessageProcessor ???



POTENTIAL DEADLOCK:
Previous place where the lock was grabbed
goroutine 16245 lock 0xc0541f240c
deso/src/core/lib/peer.go:156 lib.(*Peer).MaybeDequeueDeSoMessage ??? <<<<< 
deso/src/core/lib/peer.go:418 lib.(*Peer).StartDeSoMessageProcessor ???
Have been trying to lock it again for more than 10m0s
goroutine 2657086 lock 0xc0541f240c


@namelessperson0
Copy link
Contributor Author

Tried again and the deadlock error did not occur. But #21 issue remains.

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