Bitcoin full node and query server

Jul 18, 2020

View in context in the libbitcoin Slack #general mirror.

N
narodnik16:28
Do you know which line of code is locking?
17 replies · evoskuil, narodnik · last Jul 18, 2020
evoskuil17:23
The problem is that, in this case, the code executed under the critical section cannot be easily visually verified to exit without reentry.
evoskuil17:24
All other critical sections in libbitcoin are easily verified.
N
narodnik17:46
I see, complicated
evoskuil17:49
Yep
evoskuil17:50
Requires a good concurrency debugger. I’ve had it up in VS, which shows everything. Takes time to track tho. Reducing thread count helps a little.
N
narodnik18:04
I think we need to isolate which section of code the lock happens in and whether it's repeatable/deterministic across runs. It should be possible to see which sequence of invoke()s causes the lock.
N
narodnik18:05
C++23 will have boost::asio as executors
evoskuil18:05
I can see all the threads idle, including the deadlock, in the debugger. That’s not the problem.
evoskuil18:06
The full call stack for each thread is visible.
evoskuil18:07
It is of course deterministic, it’s a computer :)
evoskuil18:12
The deadlock is in the code I linked above.
evoskuil18:12
It is of course repeatable, but it’s also a race condition.
evoskuil18:15
I’ve debugged this same sort of issue before several times. V3 has been running for a couple years no with no occurrence of deadlock, and it is basically the same code. The new work in v4 is incomplete, which includes debugging this deadlock.
N
narodnik18:28
What can I do to help? I want to get a Python API working once there's a v4 lock.
evoskuil19:01
Prolly not too much unfortunately. The outstanding work on v4 is not large in amount, but requires a lot of context. It takes me about a week to get my head back into it.
N
narodnik19:11
Understood