-
Notifications
You must be signed in to change notification settings - Fork 269
Crash when network graph file does not exist #1459
Copy link
Copy link
Closed
Labels
Component: MainComposing the core Shadow executableComposing the core Shadow executableType: BugError or flaw producing unexpected resultsError or flaw producing unexpected results
Description
When the network graph file path given in the config file does not exist, shadow crashes. I would expect a warning or error message and a clean exit.
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', core/support/configuration.rs:1329:
83
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
Shadow version:
shadow --show-build-info
Shadow v2.0.0-pre.1-29-gd2c7909 running GLib v2.56.1 and IGraph v0.7.1
Shadow was built from branch determinism on 2021-06-17--17:10:19 in Release mode with compile options: -ggdb;-fno-omit-frame-pointer;-Wreturn-type;-Wswitch;-O3 and link options: -Wl,--no-as-needed
Stack trace:
0x00007f6d10a0d3d7 in raise () from /lib64/libc.so.6
(gdb) bt
#0 0x00007f6d10a0d3d7 in raise () from /lib64/libc.so.6
#1 0x00007f6d10a0eac8 in abort () from /lib64/libc.so.6
#2 0x000000000079cdb7 in std::sys::unix::abort_internal::h62d932bf0be45017 () at library/std/src/sys/unix/mod.rs:237
#3 0x0000000000789395 in std::sys_common::util::abort::h654366703a8a74b7 (args=...) at library/std/src/sys_common/util.rs:19
#4 0x000000000078b6ee in rust_panic (msg=...) at library/std/src/panicking.rs:642
#5 0x000000000078b557 in std::panicking::rust_panic_with_hook::h263160f22b059048 (payload=..., message=..., location=<optimized out>) at library/std/src/panicking.rs:610
#6 0x000000000078b017 in std::panicking::begin_panic_handler::_$u7b$$u7b$closure$u7d$$u7d$::hd45fe6038bd32735 () at library/std/src/panicking.rs:497
#7 0x000000000078711c in std::sys_common::backtrace::__rust_end_short_backtrace::h4fa0386d891c718a (f=...) at library/std/src/sys_common/backtrace.rs:141
#8 0x000000000078af79 in rust_begin_unwind (info=0x7ffdad213b28) at library/std/src/panicking.rs:493
#9 0x00000000007f5771 in core::panicking::panic_fmt::hb045f52f112433cc (fmt=...) at library/core/src/panicking.rs:92
#10 0x00000000007f53e3 in core::option::expect_none_failed::hadad17f061c76fec (msg=..., value=...) at library/core/src/option.rs:1329
#11 0x00000000005795f9 in config_getNetworkGraph ()
#12 0x00000000004cf6a8 in _controller_loadTopology (controller=0xe99af0) at /scratch/rjansen/phantom/code/shadow-phantom/src/main/core/controller.c:161
#13 controller_run (controller=0xe99af0) at /scratch/rjansen/phantom/code/shadow-phantom/src/main/core/controller.c:343
#14 0x00000000004cee25 in _main_helper (argv=<optimized out>, config=0xe87210, options=0xd4f640) at /scratch/rjansen/phantom/code/shadow-phantom/src/main/core/main.c:109
#15 main_runShadow (argc=<optimized out>, argv=<optimized out>) at /scratch/rjansen/phantom/code/shadow-phantom/src/main/core/main.c:277
#16 0x00007f6d109f9555 in __libc_start_main () from /lib64/libc.so.6
#17 0x00000000004ce694 in _start ()
(gdb) frame 11
#11 0x00000000005795f9 in config_getNetworkGraph ()Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Component: MainComposing the core Shadow executableComposing the core Shadow executableType: BugError or flaw producing unexpected resultsError or flaw producing unexpected results