Author: Pieter Wuille 2011-09-06 11:55:30
Published on: 2011-09-06T11:55:30+00:00
On Sep 4, 2011, Pieter Wuille informed Gavin about the deadlock issues he found in bitcoind while using DEBUG_LOCKORDER. However, later he realized that all locking of cs_vRecv/cs_vSend happens inside TRY_CRITICAL_SECTION blocks, hence there are no actual potential deadlocks.Sipa found a deadlock between the addr-handling and IRC-join-handling code which was caused due to the db transaction for the entire message created by processing of "addr" while only locking cs_mapAddresses inside AddAddress. For IRC seeded addresses, no db tx was pre-created causing a lock inside AddAddress. A solution was proposed by adding CRITICAL_BLOCK(cs_mapAddresses) before addrDB.TxnBegin() in main.cpp, ProcessMessage, case "addr".
Updated on: 2023-05-18T22:15:47.685453+00:00