Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regtest: setgenerate true assert failure #4242

Closed
wtogami opened this issue May 29, 2014 · 3 comments
Closed

regtest: setgenerate true assert failure #4242

wtogami opened this issue May 29, 2014 · 3 comments

Comments

@wtogami
Copy link
Contributor

wtogami commented May 29, 2014

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.

@wtogami
Copy link
Contributor Author

wtogami commented May 29, 2014

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

@laanwj
Copy link
Member

laanwj commented May 29, 2014

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.

@laanwj laanwj added the RPC label May 29, 2014
@laanwj
Copy link
Member

laanwj commented Feb 16, 2016

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

@laanwj laanwj closed this as completed Feb 16, 2016
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants