Gridcoin-research: gridcoinresearch crashes after the machine is woken up

Created on 15 Sep 2020  路  11Comments  路  Source: gridcoin-community/Gridcoin-Research

Hello,
after upgrading gridcoinresearch from 4.0.6.0 to 5.0.0.0 I experience regular crashes after I put my machine into sleep state for a longer period (e.g. night) and then wake it up. The console output shows an unhandled exception:

************************
EXCEPTION: N5boost10wrapexceptINS_15condition_errorEEE       
boost::condition_variable::do_wait_until failed in pthread_cond_timedwait: Invalid argument       
gridcoin in scheduler

terminate called after throwing an instance of 'boost::wrapexcept<boost::condition_error>'
  what():  boost::condition_variable::do_wait_until failed in pthread_cond_timedwait: Invalid argument

I'm not sure if this is a bug in the wallet or some internal issue of the boost library.

I can run the wallet in gdb to catch more details, but I need some hints on what to look for.

Side info:
OS: Fedora 32 (boost 1.69.0, gcc 10.2.1)
build: gridcoinresearch compiled by myself, from tags/5.0.0.0.
configure invocation: ./configure --with-incompatible-bdb

bug

All 11 comments

If you compile it yourself, don't strip the executable, so that it has symbols, and run the executable in gdb that is in the src or qt directory (for the daemon or qt version as applicable). When it crashes please do a thread apply all bt and give us the complete backtrace. Thanks! :)

Probably relevant: bitcoin/bitcoin#18234 bitcoin/bitcoin#18271

We should discuss which way we want to go with this. I am not sure I am ready to do #18234 in its full, and we have things using boost chrono calendar, which isn't available in the std library until C++20, IIRC. So we will not be able to get rid of boost::chrono for a while. I propose adapting #18271 as the fix for the interim. @cyrossignol I would like your opinion on this too. This is a serious enough problem that I would like to get a fix included in the upcoming maintenance release.

It looks like #18284 merged since we last talked about this. I will push the fix in a moment.

Do it against hotfix please.

@bzaborow Please pull from the hotfix branch, build and see if this fixes the issue and report back. Thanks!

@jamescowens So far two longer sleep-wakeup cycles and it didn't crash - perhaps it is fixed. But I'll keep it under gdb for a few days more and then confirm here.

Good.

@bzaborow Can you provide an update on this please?

@jamescowens This fix definitely solved the issue, no crashes since I've switched to hotfix branch.

Excellent. Closing this issue. :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

denravonska picture denravonska  路  21Comments

denravonska picture denravonska  路  17Comments

eMPee584 picture eMPee584  路  18Comments

Nethlek picture Nethlek  路  17Comments

diorthotis picture diorthotis  路  27Comments