regtest: setgenerate true assert failure #4242

issue wtogami opened this issue on May 29, 2014
  1. wtogami commented at 12:59 AM on May 29, 2014: contributor

    If you run setgenerate true too rapidly in regtest mode, bitcoind can crash with

    /home/ubuntu/install/include/boost/thread/pthread/condition_variable_fwd.hpp:81: boost::condition_variable::~condition_variable(): Assertion `!ret' failed.
    

    This was reproduced with the Linux 64bit gitian binary.

  2. wtogami commented at 2:37 AM on May 29, 2014: contributor

    Sometimes it kills bitcoind without a visible asert failure. Sometimes bitcoind just misses the RPC entirely without any visible error and without killing bitcoind.

  3. laanwj commented at 7:43 AM on May 29, 2014: member

    Setgenerate is marked as 'threadSafe' in the vRPCCommands table. This means that a potential race can happen if it is not really thread-safe. You could try setting threadSafe to false (which will make it acquire all locks beforehand) to see if that fixes the issue.

  4. laanwj added the label RPC on May 29, 2014
  5. laanwj commented at 1:17 PM on February 16, 2016: member

    This is resolved by now. Don't use setgenerate on regtest, use generate.

  6. laanwj closed this on Feb 16, 2016

  7. 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-13 15:15 UTC

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