Bitcoin full node and query server

Mar 4, 2020

View in context in the libbitcoin Slack #general mirror.

vdeurzen22:50
From my gdb and printf debugging I'm seeing that p2p::close() is hanging, specifically it's stuck joining all threads in the threadpool, somewhere in there something is causing some kind of deadlock. I've seen this on my production nodes, my local dev nodes on my laptop and my desktop machine, it's quite reproducible, but hard to track down
vdeurzen09:21
What I'm seeing after adding a bunch of debug logs is that p2p::close is being called more than once I also see there is a potential race between threadpool::shutdown, threadpool::join and threadpool::spawn_once. The shutdown method will reset work which can be re-initialized by spawn_once and could cause join to need to wait for more work to be finished.