mimblewimble / grin

Minimal implementation of the Mimblewimble protocol.
https://grin.mw/
Apache License 2.0
5.04k stars 990 forks source link

Error starting grin #151

Closed BloddyBaron closed 7 years ago

BloddyBaron commented 7 years ago
$ RUST_LOG=grin=debug cargo run Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs Running target/debug/grin INFO:grin : Using configuration file at: /home/laptop/Downloads/grin/grin/grin.toml INFO:grin : Starting the Grin server from configuration file at /home/laptop/Downloads/grin/grin/grin.toml thread 'main' panicked at 'called Result::unwrap() on an Err value: RocksDbErr("IO error: While lock file: .grin/chain/LOCK: Resource temporarily unavailable")', /checkout/src/libcore/result.rs:860:4 note: Run with RUST_BACKTRACE=1 for a backtrace. laptop@laptop-Aspire-E5-574:~/Downloads/grin/grin$ cargo clean laptop@laptop-Aspire-E5-574:~/Downloads/grin/grin$ RUST_LOG=grin=debug cargo run Compiling modifier v0.1.0 Compiling version_check v0.1.3 Compiling scoped-tls v0.1.0 Compiling bitflags v0.7.0 Compiling unicode-normalization v0.1.5 Compiling quote v0.3.15 Compiling log v0.3.8 Compiling smallvec v0.2.1 Compiling make-cmd v0.1.0 Compiling safemem v0.2.0 Compiling constant_time_eq v0.1.3 Compiling regex-syntax v0.3.9 Compiling slab v0.3.0 Compiling bitflags v0.9.1 Compiling byteorder v1.1.0 Compiling scopeguard v0.3.2 Compiling futures v0.1.16 Compiling winapi-build v0.1.1 Compiling semver v0.1.20 Compiling void v1.0.2 Compiling num-traits v0.1.40 Compiling httparse v1.2.3 Compiling glob v0.2.11 Compiling either v1.2.0 Compiling unicode-width v0.1.4 Compiling lazycell v0.5.1 Compiling percent-encoding v1.0.0 Compiling dtoa v0.4.2 Compiling typeable v0.1.2 Compiling strsim v0.6.0 Compiling utf8-ranges v1.0.0 Compiling utf8-ranges v0.1.3 Compiling grin_util v0.1.0 (file:///home/laptop/Downloads/grin/grin/util) Compiling serde v1.0.15 Compiling winapi v0.2.8 Compiling byteorder v0.5.3 Compiling rayon-core v1.2.1 Compiling libc v0.2.31 Compiling unicode-xid v0.0.4 Compiling lazy_static v0.2.9 Compiling cfg-if v0.1.2 Compiling language-tags v0.2.2 Compiling matches v0.1.6 Compiling cc v1.0.0 Compiling regex-syntax v0.4.1 Compiling odds v0.2.25 Compiling ansi_term v0.9.0 Compiling route-recognizer v0.1.12 Compiling take v0.1.0 Compiling itoa v0.3.4 Compiling vec_map v0.8.0 Compiling rustc-serialize v0.3.24 Compiling traitobject v0.1.0 Compiling fs_extra v1.0.0 Compiling libloading v0.4.2 Compiling unicase v1.4.2 Compiling mime v0.2.6 Compiling blake2-rfc v0.2.17 Compiling base64 v0.6.0 Compiling kernel32-sys v0.2.2 Compiling unreachable v1.0.0 Compiling rustc_version v0.1.7 Compiling enum_primitive v0.1.1 Compiling num-integer v0.1.35 Compiling coco v0.1.1 Compiling itertools v0.6.5 Compiling tokio-service v0.1.0 Compiling tokio-timer v0.1.2 Compiling relay v0.1.0 Compiling synom v0.11.3 Compiling memchr v0.1.11 Compiling num_cpus v1.7.0 Compiling memchr v1.0.1 Compiling memmap v0.5.2 (https://github.com/danburkert/memmap-rs#5ff8bc3b) Compiling atty v0.2.3 Compiling time v0.1.38 Compiling daemonize v0.2.3 Compiling rand v0.3.16 Compiling net2 v0.2.31 Compiling term_size v0.3.0 Compiling iovec v0.1.0 Compiling unicode-bidi v0.3.4 Compiling cmake v0.1.26 Compiling nodrop v0.1.9 Compiling error v0.1.9 Compiling unsafe-any v0.4.2 Compiling serde_json v1.0.3 Compiling toml v0.4.5 Compiling thread_local v0.3.4 Compiling unicase v2.0.0 Compiling num-iter v0.1.34 Compiling syn v0.11.11 Compiling aho-corasick v0.5.3 Compiling aho-corasick v0.6.3 Compiling futures-cpupool v0.1.6 Compiling num-complex v0.1.40 Compiling conduit-mime-types v0.7.3 Compiling textwrap v0.8.0 Compiling mio v0.6.10 Compiling bytes v0.4.5 Compiling arrayvec v0.3.23 Compiling num-bigint v0.1.40 Compiling typemap v0.3.3 Compiling cuckoo_miner v0.1.0 (https://github.com/mimblewimble/cuckoo-miner?tag=grin_integration_12#8e2a81dd) Compiling idna v0.1.4 Compiling regex v0.2.2 Compiling clap v2.26.2 Compiling tokio-io v0.1.3 Compiling serde_derive_internals v0.16.0 Compiling plugin v0.2.6 Compiling num-rational v0.1.39 Compiling thread-id v2.0.0 Compiling url v1.5.1 Compiling rayon v0.8.2 Compiling tokio-core v0.1.9 Compiling serde_derive v1.0.15 Compiling num v0.1.40 Compiling thread_local v0.2.7 Compiling mime v0.3.4 Compiling hyper v0.10.13 Compiling gcc v0.3.54 Compiling tokio-proto v0.1.1 Compiling regex v0.1.80 Compiling secp256k1zkp v0.7.1 (https://github.com/mimblewimble/rust-secp256k1-zkp#571e243b) Compiling rust-crypto v0.2.36 Compiling librocksdb-sys v5.6.2 Compiling hyper v0.11.4 (https://github.com/hyperium/hyper#e8d61737) Compiling iron v0.5.1 Compiling grin_core v0.1.0 (file:///home/laptop/Downloads/grin/grin/core) warning: missing documentation for a trait method --> core/src/core/pmmr.rs:184:2 184 fn rewind(&mut self, position: u64, index: u32) -> Result<(), String>; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

note: lint level defined here --> core/src/lib.rs:22:9 | 22 | #![warn(missing_docs)] | ^^^^^^^^^^^^

warning: missing documentation for a struct field --> core/src/core/pmmr.rs:386:2 | 386 | pub elems: Vec<Option<HashSum>>, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: unused variable: index --> core/src/core/pmmr.rs:401:44 401 fn remove(&mut self, positions: Vec, index: u32) -> Result<(), String> { ^^^^^
= note: #[warn(unused_variables)] on by default
warning: unused imports: Hash, ZERO_HASH --> core/src/core/mod.rs:34:18 34 use self::hash::{Hash, Hashed, ZERO_HASH}; ^^^^ ^^^^^^^^^

= note: #[warn(unused_imports)] on by default

Compiling env_logger v0.3.5 Compiling router v0.5.1 Compiling grin_pow v0.1.0 (file:///home/laptop/Downloads/grin/grin/pow) warning: redundant linker flag specified for library stdc++

Compiling rocksdb v0.7.2 Compiling grin_store v0.1.0 (file:///home/laptop/Downloads/grin/grin/store) Compiling grin_p2p v0.1.0 (file:///home/laptop/Downloads/grin/grin/p2p) Compiling grin_chain v0.1.0 (file:///home/laptop/Downloads/grin/grin/chain) warning: use of deprecated item: implemention moved to iter_ok --> p2p/src/conn.rs:186:14 186 let iter = stream::iter(iter::repeat(()).map(Ok::<(), Error>)); ^^^^^^^^^^^^
= note: #[warn(deprecated)] on by default

warning: use of deprecated item: renamed to unbounded_send --> p2p/src/conn.rs:241:22 | 241 | self.outbound_chan.send(data).map_err( | ^^^^

warning: use of deprecated item: renamed to unbounded_send --> p2p/src/protocol.rs:137:11 | 137 | sender.send(data).unwrap(); | ^^^^

warning: use of deprecated item: renamed to unbounded_send --> p2p/src/protocol.rs:159:12 | 159 | sender.send(data).unwrap(); | ^^^^

warning: use of deprecated item: renamed to unbounded_send --> p2p/src/protocol.rs:186:11 | 186 | sender.send(data).unwrap(); | ^^^^

warning: use of deprecated item: renamed to unbounded_send --> p2p/src/protocol.rs:213:11 | 213 | sender.send(data).unwrap(); | ^^^^

Compiling grin_pool v0.1.0 (file:///home/laptop/Downloads/grin/grin/pool) Compiling grin_api v0.1.0 (file:///home/laptop/Downloads/grin/grin/api) Compiling grin_wallet v0.1.0 (file:///home/laptop/Downloads/grin/grin/wallet) Compiling grin_grin v0.1.0 (file:///home/laptop/Downloads/grin/grin/grin) warning: use of deprecated item: renamed to unbounded_send --> grin/src/seed.rs:121:11 121 tx.send(p.addr).unwrap(); ^^^^
= note: #[warn(deprecated)] on by default

warning: use of deprecated item: renamed to unbounded_send --> grin/src/seed.rs:168:9 | 168 | tx.send(*addr).unwrap(); | ^^^^

Compiling grin_config v0.1.0 (file:///home/laptop/Downloads/grin/grin/config) Compiling grin v0.1.0 (file:///home/laptop/Downloads/grin/grin) Finished dev [unoptimized + debuginfo] target(s) in 518.22 secs Running target/debug/grin INFO:grin : Using configuration file at: /home/laptop/Downloads/grin/grin/grin.toml INFO:grin : Starting the Grin server from configuration file at /home/laptop/Downloads/grin/grin/grin.toml thread 'main' panicked at 'called Result::unwrap() on an Err value: RocksDbErr("IO error: While lock file: .grin/chain/LOCK: Resource temporarily unavailable")', /checkout/src/libcore/result.rs:860:4 note: Run with RUST_BACKTRACE=1 for a backtrace.

This is only the second time I started grin. First time went smooth and it all worked, now this error came up. I did cargo clean but still no luck. Anyone else had this issue?

ignopeverell commented 7 years ago

Was the other instance still running or did you kill it abruptly? The database LOCK file is still present, indicating that it couldn't be cleaned or there's another process owning it.

BloddyBaron commented 7 years ago

True, I did restart without problems after deleting the lock file.

ignopeverell commented 7 years ago

Okay, that's expected then. If the process gets killed or crashes hard, the lock needs to be manually removed.