Skip to content
This repository was archived by the owner on Nov 6, 2020. It is now read-only.

No possible successful shutdown for --fast-and-loose #7910

Closed
tsutsu opened this issue Feb 16, 2018 · 3 comments
Closed

No possible successful shutdown for --fast-and-loose #7910

tsutsu opened this issue Feb 16, 2018 · 3 comments
Labels
M4-core ⛓ Core client code / Rust. Z1-question 🙋‍♀️ Issue is a question. Closer should answer.
Milestone

Comments

@tsutsu
Copy link

tsutsu commented Feb 16, 2018

I'm running:

  • Which Parity version?: Parity/v1.10.0-unstable-f8bf7e7d4-20180118/x86_64-macos/rustc1.23.0
  • Which operating system?: MacOS
  • How installed?: from source
  • Are you fully synchronized?: no
  • Which network are you connected to?: ropsten
  • Did you try to restart the node?: yes (that's the problem!)

Quoting parity --help (emphasis mine):

--fast-and-loose
Disables DB WAL, which gives a significant speed up but means an unclean exit is unrecoverable.

Expected behaviour: that there is actually such a thing as a "clean" exit, that won't corrupt my DB when using --fast-and-loose.

Actual behaviour:

  • the database is corrupted when you press Ctrl+C.
  • the database is corrupted when you send killall -HUP parity.
  • the database is corrupted even if I ask very nicely :(

Looking at the source, there's no cleanup-DB-on-quit code in either parity/main.rs or parity/run.rs. And, in fact, ethcore/src/blockchain/blockchain.rs never even calls anything like KeyValueDB::close().

@5chdn 5chdn added Z1-question 🙋‍♀️ Issue is a question. Closer should answer. M4-core ⛓ Core client code / Rust. labels Feb 16, 2018
@5chdn 5chdn added this to the 1.10 milestone Feb 16, 2018
@Aggour
Copy link

Aggour commented Feb 16, 2018

The --fast-and-loose argument doesn't allow for a clean exit on purpose. It's a feature meant to be used for quick synchronization on testnet and not for use on the production network.

@5chdn 5chdn closed this as completed Feb 16, 2018
@andresilva
Copy link
Contributor

The reason you don't see any call like KeyValueDB::close() is because the database is closed automatically when it is dropped, that's done here. We fixed an issue recently where some values weren't being dropped correctly on shutdown (#7695) and I think your build doesn't include that. I just ran with --fast-and-loose and exited a couple of times with ctrl-c and there was no db corruption. Try a recent nightly or build the latest master and check if it still happens.

@andresilva
Copy link
Contributor

Okay I just corrupted it, anyway don't use --fast-and-loose. 🙈

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
M4-core ⛓ Core client code / Rust. Z1-question 🙋‍♀️ Issue is a question. Closer should answer.
Projects
None yet
Development

No branches or pull requests

4 participants