I suspect, it is a race where LoadMempool is still running/about to finish.
MarcoFalke added the label
good first issue
on Apr 2, 2018
laanwj
commented at 8:11 am on April 3, 2018:
member
Short term fix: when it gets that exception, it should probably retry instead of giving up.
Longer term this would be a reason to prefer using a mutex to avoid preliminary or concurrent access to the mempool dump instead of returning an error. The RPC could just wait.
promag
commented at 10:35 pm on April 3, 2018:
member
Could we have the test framework wait for mempool to load?
promag
commented at 10:36 pm on April 3, 2018:
member
I think we had reports that loading the mempool took 1.5 hours or so, just noting without further comment.
ajtowns
commented at 5:55 am on April 13, 2018:
member
Could we have the test framework wait for mempool to load?
The test case already waits for the mempool to load; it checks it via len(n.getrawmempool())==5, but I guess the problem is that between loading the 5th tx and updating the global flag, it also releases cs_main, reprioritises transactions, and notes a couple of log entries, which is enough time for python to race on and try saving the mempool data.
FWIW, adding MilliSleep(200); just before the final LogPrintf in LoadMemPool looks like it reproduces the problem pretty reliably to me.
Fixing that problem gives another though: there’s a check for “Unable to dump mempool to disk” further on, which can also give the “mempool was not loaded yet” error. That can be worked around too, but maybe it would be better to just make the g_is_mempool_loaded flag visible via getmempoolinfo so the tests can wait accurately?
MarcoFalke closed this
on May 1, 2019
MarcoFalke referenced this in commit
12aa2ac988
on May 1, 2019
vijaydasmp referenced this in commit
185d1f3546
on Oct 21, 2021
vijaydasmp referenced this in commit
e27c1a393b
on Oct 21, 2021
vijaydasmp referenced this in commit
47375dbecd
on Oct 22, 2021
vijaydasmp referenced this in commit
8e8588a542
on Oct 22, 2021
vijaydasmp referenced this in commit
bfe027d095
on Oct 23, 2021
vijaydasmp referenced this in commit
b9561673fa
on Oct 26, 2021
vijaydasmp referenced this in commit
19ba92ca28
on Dec 6, 2021
vijaydasmp referenced this in commit
1634550d9e
on Dec 10, 2021
vijaydasmp referenced this in commit
d5e24debd4
on Dec 10, 2021
vijaydasmp referenced this in commit
71941b7c23
on Dec 10, 2021
vijaydasmp referenced this in commit
1520ebfaa2
on Dec 11, 2021
vijaydasmp referenced this in commit
f6bc96c0ca
on Dec 11, 2021
vijaydasmp referenced this in commit
9966abbd90
on Dec 11, 2021
vijaydasmp referenced this in commit
92032654d6
on Dec 11, 2021
vijaydasmp referenced this in commit
4a2dceb202
on Dec 11, 2021
vijaydasmp referenced this in commit
75ad56190f
on Dec 13, 2021
vijaydasmp referenced this in commit
c5f428c2d2
on Dec 13, 2021
vijaydasmp referenced this in commit
3c44a4aa24
on Dec 13, 2021
vijaydasmp referenced this in commit
4bb33614e8
on Dec 14, 2021
vijaydasmp referenced this in commit
b25e8edf15
on Dec 14, 2021
vijaydasmp referenced this in commit
516865bf80
on Dec 15, 2021
vijaydasmp referenced this in commit
497b047cc6
on Dec 15, 2021
MarcoFalke locked this
on Dec 16, 2021
vijaydasmp referenced this in commit
4e4caff322
on Dec 18, 2021
vijaydasmp referenced this in commit
64fb6b3a05
on Dec 21, 2021
vijaydasmp referenced this in commit
f79ef7e386
on Dec 21, 2021
vijaydasmp referenced this in commit
be0111694f
on Dec 24, 2021
vijaydasmp referenced this in commit
71e38b9ebc
on Dec 25, 2021
gades referenced this in commit
16e2406cd4
on May 24, 2022
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2024-11-17 15:12 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me