oxen-core/src
Jason Rhinelander 0cd096fc22 Fix rare blink pool deadlock
cryptonote_protocol_handler calls `pool.get_blink(hash)` while already
holding a blink shared lock, which should have been
`pool.get_blink(hash, true)` to avoid `get_blink` trying to take its own
lock.

That double lock is undefined behaviour and can cause a deadlock on the
mutex, although it appears rare that it actually does.  If it does,
however, this eventually backs up into vote relaying during the idle
loop, which then stalls the idle loop so we stop sending out uptime
proofs (since that is also in the idle loop).

A simple fix here is to add the `true` argument, but on reconsideration
this extra argument to take or not take a lock is messy and error prone,
so this commit instead removes the second argument entirely and instead
documents which call must and must not hold a lock, getting rid of the
three methods (get_blink, has_blink, and add_existing_blink) that had
the `have_lock` argument.  This ends up having only a small impact on
calling code - the vast majority of callers already hold a lock, and the
few that don't are easily adjusted.
2020-01-18 22:29:26 -04:00
..
blockchain_db Regenerate the checkpoint table in lmdb 2020-01-10 15:23:55 +11:00
blockchain_utilities Merge pull request #912 from Doy-lee/DisablePruning 2019-12-04 15:36:19 +11:00
blocks Update blocks blob v5.1.1 to 321467 (#897) 2019-10-16 14:05:32 +10:00
checkpoints Distinguish pop_blocks from reorg in detach hook 2019-10-16 10:25:04 +11:00
common --regtest fixes and mine n blocks ability 2019-12-26 12:29:05 -04:00
crypto Add wallet long polling to wallet-cli 2020-01-07 12:35:06 +11:00
cryptonote_basic Use old serialization for libc++ (android and apple) 2020-01-15 12:25:15 +11:00
cryptonote_core Fix rare blink pool deadlock 2020-01-18 22:29:26 -04:00
cryptonote_protocol Fix rare blink pool deadlock 2020-01-18 22:29:26 -04:00
daemon Merge pull request #986 from Doy-lee/LongPoll 2020-01-07 17:14:37 +11:00
daemonizer Merge commit '581994b' into LokiMergeUpstream 2019-05-02 14:15:02 +10:00
debug_utilities Merge commit 'f2f725d8db3535055d1c7e102c0bba75b22a3409' into LokiMergeUpstream 2019-04-12 15:23:01 +10:00
device Store loki version as std::array<u16,3> everywhere 2019-11-27 14:07:52 -04:00
device_trezor Use PkgConfig to properly find zmq/sodium 2019-12-03 00:51:18 -04:00
gen_multisig Update monero copyright to 2019 pre-emptively to make merge simpler 2019-04-12 14:36:43 +10:00
lmdb Align hashable data structures 2019-11-27 14:07:52 -04:00
mnemonics mnemonics: fix 4 byte UTF-8 rewriting 2019-04-30 21:10:54 +00:00
multisig Update monero copyright to 2019 pre-emptively to make merge simpler 2019-04-12 14:36:43 +10:00
net Fix IPv6 addr parsing for boost <1.66 2019-08-15 00:24:56 -03:00
p2p test code: add ability to trigger p2p resync 2019-12-26 12:29:05 -04:00
platform Update monero copyright to 2019 pre-emptively to make merge simpler 2019-04-12 14:36:43 +10:00
quorumnet de-constexpr for xenial 2019-12-26 12:26:03 -04:00
ringct serialization: check stream good flag at the end 2019-07-05 12:18:37 +10:00
rpc Fix rare blink pool deadlock 2020-01-18 22:29:26 -04:00
serialization Add SN ed25519/x25519 pubkeys + quorumnet port in proofs 2019-10-07 22:09:17 -03:00
simplewallet Update blink priority to 5 2020-01-16 10:29:36 +11:00
wallet Merge pull request #1015 from Doy-lee/AndroidPatches 2020-01-16 13:37:12 +11:00
CMakeLists.txt Quorumnet network communication layer 2019-11-27 14:03:11 -04:00
cryptonote_config.h Build/core test fixes, incoporate staking changes from LNS 2019-12-04 15:17:55 +11:00
version.cpp.in Update v6 patch to 3 2020-01-10 13:07:37 +11:00
version.h Store loki version as std::array<u16,3> everywhere 2019-11-27 14:07:52 -04:00