Can't run local network

I got this error when I start up local network:

 Running `target/debug/libra-swarm -s`

found when reading file.Only ascii printable, tabs (\t), and \n line ending characters are permitted.’, src/libcore/result.rs:1165:5
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace.

The command I run is:
cargo run -p libra-swarm – -s

Environment is:
macOS 10.13.6

Any help is appreciated.

Here is more debug info:
cargo run -p libra-swarm – -s -n 4
Finished dev [unoptimized + debuginfo] target(s) in 0.45s
Running target/debug/libra-swarm -s -n 4
found when reading file.Only ascii printable, tabs (\t), and \n line ending characters are permitted.’, src/libcore/result.rs:1165:5
stack backtrace:
0: 0x106801ab5 - backtrace::backtrace::libunwind::trace::h5374dc6304209fb0
at /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.37/src/backtrace/libunwind.rs:88
1: 0x106801ab5 - backtrace::backtrace::trace_unsynchronized::hc6c40d142cd2a86c
at /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.37/src/backtrace/mod.rs:66
2: 0x106801ab5 - std::sys_common::backtrace::_print_fmt::h070478e0aa6dc01e
at src/libstd/sys_common/backtrace.rs:76
3: 0x106801ab5 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h66f38d4abb2e41c1
at src/libstd/sys_common/backtrace.rs:60
4: 0x106828000 - core::fmt::write::h4f487e714088986d
at src/libcore/fmt/mod.rs:1030
5: 0x1067fbb2b - std::io::Write::write_fmt::h7bd7b6fe8b47c5fb
at src/libstd/io/mod.rs:1412
6: 0x106803eda - std::sys_common::backtrace::_print::hcf7e952e5633d242
at src/libstd/sys_common/backtrace.rs:64
7: 0x106803eda - std::sys_common::backtrace::print::hbc3f189fef9884dc
at src/libstd/sys_common/backtrace.rs:49
8: 0x106803eda - std::panicking::default_hook::{{closure}}::heee79636c241547c
at src/libstd/panicking.rs:196
9: 0x106803be5 - std::panicking::default_hook::hfcbd07059d15441e
at src/libstd/panicking.rs:210
10: 0x106804637 - std::panicking::rust_panic_with_hook::h0c4b67125f55410a
at src/libstd/panicking.rs:473
11: 0x10680417d - std::panicking::continue_panic_fmt::h0e74ab2b215a1401
at src/libstd/panicking.rs:380
12: 0x106804079 - rust_begin_unwind
at src/libstd/panicking.rs:307
13: 0x1068247ef - core::panicking::panic_fmt::h09741a3213dba543
at src/libcore/panicking.rs:85
14: 0x1068248c9 - core::result::unwrap_failed::hf47c31c429b02014
at src/libcore/result.rs:1165
15: 0x105b847a5 - core::result::Result<T,E>::unwrap::h46672ace7fcc9e5a
at /rustc/4560ea788cb760f0a34127156c78e2552949f734/src/libcore/result.rs:933
16: 0x105ba7953 - <stdlib::stdlib::ADDRESS_UTIL_MODULE as core::ops::deref::Deref>::deref::__static_ref_initialize::hb53fbeaebfa06eb9
at language/stdlib/src/stdlib.rs:28
17: 0x105ba7953 - core::ops::function::FnOnce::call_once::h123b9e4cc5e51230
at /rustc/4560ea788cb760f0a34127156c78e2552949f734/src/libcore/ops/function.rs:227
18: 0x105b85fb3 - spin::once::Once::call_once::h2a7ea8d52727c6cb
at /Users/nicholaszhu/.cargo/registry/src/github.com-1ecc6299db9ec823/spin-0.5.2/src/once.rs:110
19: 0x105b9b4d3 - lazy_static::lazy::Lazy::get::h28310fb63bdc675c
at /Users/nicholaszhu/.cargo/registry/src/github.com-1ecc6299db9ec823/lazy_static-1.4.0/src/core_lazy.rs:21
20: 0x105b9b4d3 - <stdlib::stdlib::ADDRESS_UTIL_MODULE as core::ops::deref::Deref>::deref::__stability::hca28b3a6265d4392
at /Users/nicholaszhu/Project/code/coin/libra/<::lazy_static::__lazy_static_internal macros>:16
21: 0x105b9b4d3 - <stdlib::stdlib::ADDRESS_UTIL_MODULE as core::ops::deref::Deref>::deref::hf9053d7bda598479
at /Users/nicholaszhu/Project/code/coin/libra/<::lazy_static::__lazy_static_internal macros>:18
22: 0x105ba7b6d - <stdlib::stdlib::MODULE_DEFS as core::ops::deref::Deref>::deref::__static_ref_initialize::h08abc67022ae4479
at language/stdlib/src/stdlib.rs:40
23: 0x105ba7b6d - core::ops::function::FnOnce::call_once::h4faf80b4fa00bcea
at /rustc/4560ea788cb760f0a34127156c78e2552949f734/src/libcore/ops/function.rs:227
24: 0x105b86c49 - spin::once::Once::call_once::h87babab8e2c7a4fe
at /Users/nicholaszhu/.cargo/registry/src/github.com-1ecc6299db9ec823/spin-0.5.2/src/once.rs:110
25: 0x105b9b613 - lazy_static::lazy::Lazy::get::ha0cca8e6fd49125a
at /Users/nicholaszhu/.cargo/registry/src/github.com-1ecc6299db9ec823/lazy_static-1.4.0/src/core_lazy.rs:21
26: 0x105b9b613 - <stdlib::stdlib::MODULE_DEFS as core::ops::deref::Deref>::deref::__stability::h96696bd85a408aad
at /Users/nicholaszhu/Project/code/coin/libra/<::lazy_static::__lazy_static_internal macros>:16
27: 0x105b9b613 - <stdlib::stdlib::MODULE_DEFS as core::ops::deref::Deref>::deref::h2867c138b0f1065e
at /Users/nicholaszhu/Project/code/coin/libra/<::lazy_static::__lazy_static_internal macros>:18
28: 0x105b9b307 - stdlib::stdlib::module_defs::h216fc7e0603747c1
at language/stdlib/src/stdlib.rs:92
29: 0x105b81486 - stdlib::build_stdlib::h9079a50a762769c9
at language/stdlib/src/lib.rs:45
30: 0x105ba7f4c - <stdlib::ANNOTATED_STDLIB as core::ops::deref::Deref>::deref::__static_ref_initialize::h9bf74496bb0d587b
at language/stdlib/src/lib.rs:18
31: 0x105ba7f4c - core::ops::function::FnOnce::call_once::hfdb1fa6232622471
at /rustc/4560ea788cb760f0a34127156c78e2552949f734/src/libcore/ops/function.rs:227
32: 0x105b87c10 - spin::once::Once::call_once::heb89960452afb88b
at /Users/nicholaszhu/.cargo/registry/src/github.com-1ecc6299db9ec823/spin-0.5.2/src/once.rs:110
33: 0x105b81a13 - lazy_static::lazy::Lazy::get::h164c1b0e5aa1968d
at /Users/nicholaszhu/.cargo/registry/src/github.com-1ecc6299db9ec823/lazy_static-1.4.0/src/core_lazy.rs:21
34: 0x105b81a13 - <stdlib::ANNOTATED_STDLIB as core::ops::deref::Deref>::deref::__stability::h201cd88057fa35c1
at /Users/nicholaszhu/Project/code/coin/libra/<::lazy_static::__lazy_static_internal macros>:16
35: 0x105b81a13 - <stdlib::ANNOTATED_STDLIB as core::ops::deref::Deref>::deref::h869614287b308924
at /Users/nicholaszhu/Project/code/coin/libra/<::lazy_static::__lazy_static_internal macros>:18
36: 0x105b813b7 - stdlib::stdlib_modules::h33d6b546d7011984
at language/stdlib/src/lib.rs:26
37: 0x105ab97df - vm_genesis::encode_genesis_transaction_with_validator::h6728737271c988c6
at language/vm/vm-genesis/src/lib.rs:240
38: 0x105aadf9d - config_builder::validator_config::ValidatorConfig::build_common::h9b0972654ec39c88
at config/config-builder/src/validator_config.rs:152
39: 0x105aae331 - <config_builder::validator_config::ValidatorConfig as config_builder::swarm_config::BuildSwarm>::build_swarm::h37fb09e009f05f09
at config/config-builder/src/validator_config.rs:171
40: 0x105920ea4 - config_builder::swarm_config::SwarmConfig::build::h80caddc42c3e5629
at /Users/nicholaszhu/Project/code/coin/libra/config/config-builder/src/swarm_config.rs:24
41: 0x1057eda04 - libra_swarm::swarm::LibraSwarm::configure_swarm::h4bb0a2324e3239a4
at libra-swarm/src/swarm.rs:311
42: 0x1055d83a8 - libra_swarm::main::h2056b597e6a9e8ae
at libra-swarm/src/main.rs:40
43: 0x1055d16c2 - std::rt::lang_start::{{closure}}::h739fce3dffdd2e0d
at /rustc/4560ea788cb760f0a34127156c78e2552949f734/src/libstd/rt.rs:64
44: 0x106803ff8 - std::rt::lang_start_internal::{{closure}}::h63f39619c053dac6
at src/libstd/rt.rs:49
45: 0x106803ff8 - std::panicking::try::do_call::ha1a4587e2a4eb439
at src/libstd/panicking.rs:292
46: 0x10680c5ef - __rust_maybe_catch_panic
at src/libpanic_unwind/lib.rs:80
47: 0x1068049de - std::panicking::try::h840ae8cb372083d2
at src/libstd/panicking.rs:271
48: 0x1068049de - std::panic::catch_unwind::hae56a990bf6a45eb
at src/libstd/panic.rs:394
49: 0x1068049de - std::rt::lang_start_internal::hcf96e32a124891dc
at src/libstd/rt.rs:48
50: 0x1055d16a2 - std::rt::lang_start::h71842e0006c512ae
at /rustc/4560ea788cb760f0a34127156c78e2552949f734/src/libstd/rt.rs:64
51: 0x1055d9ba2 - libra_swarm::Args::augment_clap::h4866d58754b1d3cf

1 Like

I am not sure what may be going wrong and it almost seems a corruption in one of you .mvir in libra/language/stdlib/modules.
That command runs fine for me and the error reported is implying there are unexpected characters in address_util.mvir .
Could you please check that file is correct (non corrupted) and contains no spacial character?

Thanks a lot,

I delete address_util.mvir file and recreate it.
But i still got same problem.

another thing is my rust version:
| => rustc --version
rustc 1.39.0 (4560ea788 2019-11-04)

Does this will impact?

I doubt Rust version is the issue. Could you upload the file so I can try? could you also create that file by hand (if that is not what you have done already) and see if the problem persists?
Finally, are you on latest master? can you get on that?
Sorry but this is a rather unusual error and not being able to repro it makes it really hard to guess

i update to 1.42, but still got same problem.

I also recreate address_util.mvir, still got that problem.

any other suggest will be appreciated

i am using Mac OS 10.15.2 and it seems okay although my machine does not have good specs.
will double-check. :woozy_face: