Locking is missing from LoadExternalBlockFile #6858

issue morcos opened this issue on October 19, 2015
  1. morcos commented at 8:38 PM on October 19, 2015: member

    LoadExternalBlockFile accesses mapBlockIndex without holding cs_main (or any other locks). The fImporting flag should prevent a block being processed from the p2p code at the same time the bitcoin-loadblk thread is running, however a submitblock RPC call could cause a block to be processed and change mapBlockIndex.

    A related, but somewhat separate issue is that during reindexing it should not be possible to write data to the block files. The database of which files contain which blocks and where space exists for new blocks to be written is still in the process of being created. A submitblock RPC call during a reindexing seems like it would cause significant problems.

  2. morcos commented at 8:40 PM on October 19, 2015: member

    Oops, I already filed this issue

  3. morcos closed this on Oct 19, 2015

  4. DrahtBot locked this on Sep 8, 2021
Contributors

github-metadata-mirror

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: 2026-04-22 12:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me