-
-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After starting up evcxr produces an error -> Initialization failed: Child process terminated with status: signal: 9 #210
Comments
I don't have much by way of ideas I'm afraid. The only Mac I have access to is github's CI infrastructure which runs the tests when new commits are pushed. It currently passes there. The only thing that comes to mind is that you could try cloning the evcxr repository and running |
Might be relevent rust-lang/cargo#8913 |
I ran cargo test and it came back with an error that said Caused by: --- stderr build script failed, must exit now', /Users/tatsuo/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/cmake-0.1.46/src/lib.rs:974:5 After reading the error I installed cmake via brew and rest cargo test again and got `error[E0658]: use of unstable library feature 'iter_map_while': recently added For more information about this error, try so I am going to look into the issue link that it gave to see if I can fix it. |
|
Ah, I guess although you have the dependencies required for evcxr_repl, you don't have the dependencies required for evcxr_jupyter. You can run just the evcxr tests, by running |
|
The minimal supported rustc version of rust-analyzer is 1.57: https://github.com/rust-analyzer/rust-analyzer/blob/0f8c96c92689af8378dbe9f466c6bf15a3a27458/xtask/Cargo.toml#L7 Rust-analyzer is used by evcxr to get the type of variables that should be preserved between inputs. |
So I tried updating and finally have been able to run `running 21 tests test result: ok. 21 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.11s
running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
running 37 tests failures: ---- crate_name_with_hyphens stdout ---- ---- const_generics_with_explicit_type stdout ---- ---- abort_and_restart stdout ---- ---- continue_execution_after_bad_use_statement stdout ---- ---- check_for_errors stdout ---- ---- error_from_macro_expansion stdout ---- ---- format stdout ---- ---- define_then_call_function stdout ---- ---- int_array stdout ---- ---- define_then_call_macro stdout ---- ---- code_completion stdout ---- ---- invalid_code stdout ---- ---- missing_semicolon_on_let_stmt stdout ---- ---- multiple_identical_use_statements stdout ---- ---- non_concrete_types stdout ---- ---- non_semi_statements stdout ---- ---- moved_value stdout ---- ---- partial_destructuring stdout ---- ---- question_mark_operator stdout ---- ---- partially_inferred_variable_type stdout ---- ---- print_then_assign_variable stdout ---- ---- rc_refcell_etc stdout ---- ---- redefine_type_with_existing_var stdout ---- ---- reserved_words stdout ---- ---- save_and_restore_variables stdout ---- ---- single_statement stdout ---- ---- statement_and_expression stdout ---- ---- repeated_use_statements stdout ---- ---- struct_type_inference stdout ---- ---- tls_implementing_drop stdout ---- ---- unnamable_type_closure stdout ---- ---- unnamable_type_impl_trait stdout ---- ---- variable_assignment_compile_fail_then_use_statement stdout ---- ---- crate_deps stdout ---- ---- printing stdout ---- ---- function_panics_without_variable_preserving stdout ---- ---- function_panics_with_variable_preserving stdout ---- failures: test result: FAILED. 0 passed; 37 failed; 0 ignored; 0 measured; 0 filtered out; finished in 5.17s error: test failed, to rerun pass '-p evcxr --test integration_tests'` |
Thanks for trying that. It looks like they're failing in the same way as when you run the evcxr repl - child process gets sent signal 9, which I assume is a SIGKILL like it is on Linux. Did anything in the issue that sigmaSd linked above seem like it might be relevant? In particular the last post on that issue:
|
So I uninstalled rust and rustup with homebrew and installed the normal way. After reinstalling the normal way and downloading evcxr everything seemed to run perfectly. Thanks. |
This will hopefully help people who run into #210 in future.
This probably needs to be reopened - I installed Rust via "normal" means (not using Homebrew) and am getting this exact error. Trying to use a "default" shell still results in the same problem (I use Fish, but it doesn't seem to matter). I cloned the repository and ran
|
@macintacos, if you run |
@davidlattimore nope, unfortunately it does not. |
@macintacos, what does You could try running: EVCXR_TMPDIR=$HOME/tmp/e1 evcxr Then once you exit, have a look at file ~/tmp/e1/target/x86_64-unknown-linux-gnu/debug/libctx.so On Mac, I guess it would be Then if we compare that with the type of the evcxr executable: file `which evcxr` For me the shared object and executable are:
So both are x86-64 for me. Are yours the same as each other? |
Here's what I get from
Checking the executable files, I get:
They both seem to be arm64 for me, and the path generated at |
You might be able to gain more clues as to what's going on by running evcxr and loading and running the dylib. If you create a temporary directory similar to the above: EVCXR_TMPDIR=$HOME/tmp/e1 evcxr
Welcome to evcxr. For help, type :help
>> println!("Hello, world");
Hello, world Then run something like the following: OBJ=$HOME/tmp/e1/target/debug/deps/libcode_2.dylib; echo "LOAD_AND_RUN $OBJ $(nm -j $OBJ | grep run_user_code)" | EVCXR_IS_RUNTIME=1 evcxr I'm assuming that OSX has an OBJ=$HOME/tmp/e1/target/debug/deps/libcode_2.dylib; echo "LOAD_AND_RUN $OBJ run_user_code_1" | EVCXR_IS_RUNTIME=1 evcxr When I run my equivalent to the above, I get the following output:
Hopefully when you do that you get an error similar to what you get when you run evcxr normally - i.e. something about SIGKILL. From a bit of Googling, it sounds like OSX on M1 enforces that binaries are signed. I'm wondering if the If we can determine that missing signing is the problem, then hopefully we can work out what should be signing things that isn't and fix that. |
Yeah I get an immediate
I tried running
|
Thanks for trying that. Could you check if the tests for libloading pass? Evcxr uses libloading to load .so/.dylib etc and obtain pointers to the functions contained within. |
Did you just mean to clone that repository and run
|
Thanks @macintacos, yep, that's what I had in mind. That's interesting that the libloading tests pass. Some of those tests use the rust compiler to compile dynamic libraries, then load and run them - which is pretty much what evcxr does. I'm at a bit of a loss as to what the difference might be. It's unfortunate that OSX doesn't give us more of a clue as to what the problem is. There's not some kind of system log that might indicate the cause of the termination is there? The only other option I can think of, is I could write a few tests that might narrow down what the problem is and you could try running them and see which ones pass and which don't. I was wondering if perhaps it was the pointer authentication that is used on the M1, but as far as I can tell, that should result in a segfault if violated, not a signal 9. |
Not sure why this error arrises but, I followed the directions on the github page for installation. I am on a Macbook Air M1, so I am thinking that this might possibly be the issue. I never had the issue when installing and running it on WSL on Windows. Any ideas on how to solve this issue?
The text was updated successfully, but these errors were encountered: