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
Labels

Comments

@wtogami
Copy link
Contributor

@wtogami 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

This comment has been minimized.

Copy link
Contributor Author

@wtogami 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

This comment has been minimized.

Copy link
Member

@laanwj 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

This comment has been minimized.

Copy link
Member

@laanwj laanwj commented Feb 16, 2016

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

@laanwj laanwj closed this Feb 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.