openvcash / vcash

A decentralized currency for the internet.
https://vcash.info
GNU Affero General Public License v3.0
36 stars 35 forks source link

Multiple daemon instances on Windows #18

Open whphhg opened 7 years ago

whphhg commented 7 years ago

It's possible to run mutliple instances of the daemon on Windows at the same time and run into the issue below, after which the first launched daemon becomes unresponsive. You can continue launching new instances which will kill the previous one with the same error.

[ERROR] - errcall: Database environment, arg2 = BDB0060 PANIC: fatal region error detected; run recovery.

This doesn't happen on Linux and macOS. If a daemon is launched while there's already one running the new one exits with the Failed to obtain lock on file .lock message.

xCoreDev commented 7 years ago

I checked and saw that Windows "one instance only" locking is not handled: https://github.com/openvcash/vcash/blob/master/coin/src/stack_impl.cpp#L5560-L5600 Imo best would be to implement a locking file for win too.