Skip to content
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

CxxWrap.jl version must match between Ray.jl and build project #216

Open
omus opened this issue Oct 20, 2023 · 1 comment
Open

CxxWrap.jl version must match between Ray.jl and build project #216

omus opened this issue Oct 20, 2023 · 1 comment

Comments

@omus
Copy link
Member

omus commented Oct 20, 2023

I was experimenting with using a newer version of CxxWrap and ran into this segfault when loading the library:

[26553] signal (11.2): Segmentation fault: 11
in expression starting at /Users/cvogt/.julia/dev/Ray/src/ray_julia_jll/ray_julia_jll.jl:14
_ZNSt3__16__treeINS_12__value_typeINS_4pairImmEEN5jlcxx14CachedDatatypeEEENS_19__map_value_compareIS3_S6_NS_4lessIS3_EELb1EEENS_9allocatorIS6_EEE25__emplace_unique_key_argsIS3_JNS2_IS3_S5_EEEEENS2_INS_15__tree_iteratorIS6_PNS_11__tree_nodeIS6_PvEElEEbEERKT_DpOT0_ at /private/var/tmp/_bazel_cvogt/f6792afd486f2310f20344e531af81b0/execroot/com_github_beacon_biosignals_ray_wrapper/bazel-out/darwin_arm64-opt/bin/julia_core_worker_lib.so (unknown line)
_ZN5jlcxx14JuliaTypeCacheINSt3__113unordered_mapINS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEdNS1_4hashIS8_EENS1_8equal_toIS8_EENS6_INS1_4pairIKS8_dEEEEEEE14set_julia_typeEP14_jl_datatype_tb at /private/var/tmp/_bazel_cvogt/f6792afd486f2310f20344e531af81b0/execroot/com_github_beacon_biosignals_ray_wrapper/bazel-out/darwin_arm64-opt/bin/julia_core_worker_lib.so (unknown line)
_ZN5jlcxx6Module17add_type_internalINSt3__113unordered_mapINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEdNS2_4hashIS9_EENS2_8equal_toIS9_EENS7_INS2_4pairIKS9_dEEEEEENS_13ParameterListIJEEE14_jl_datatype_tEENS_11TypeWrapperIT_EERSF_PT1_ at /private/var/tmp/_bazel_cvogt/f6792afd486f2310f20344e531af81b0/execroot/com_github_beacon_biosignals_ray_wrapper/bazel-out/darwin_arm64-opt/bin/julia_core_worker_lib.so (unknown line)
define_julia_module at /private/var/tmp/_bazel_cvogt/f6792afd486f2310f20344e531af81b0/execroot/com_github_beacon_biosignals_ray_wrapper/bazel-out/darwin_arm64-opt/bin/julia_core_worker_lib.so (unknown line)
register_julia_module at /Users/cvogt/.julia/artifacts/2526f1faf6c345898421326fb03a88a5e7875b71/lib/libcxxwrap_julia.0.11.1.dylib (unknown line)
register_julia_module at /Users/cvogt/.julia/dev/CxxWrap/src/CxxWrap.jl:393 [inlined]
readmodule at /Users/cvogt/.julia/dev/CxxWrap/src/CxxWrap.jl:751
wrapmodule at /Users/cvogt/.julia/dev/CxxWrap/src/CxxWrap.jl:761 [inlined]
wrapmodule at /Users/cvogt/.julia/dev/CxxWrap/src/CxxWrap.jl:756
_jl_invoke at /Users/cvogt/Development/Julia/aarch64/1.9/src/gf.c:0 [inlined]
ijl_apply_generic at /Users/cvogt/Development/Julia/aarch64/1.9/src/gf.c:2940
jl_apply at /Users/cvogt/Development/Julia/aarch64/1.9/src/./julia.h:1880 [inlined]
do_call at /Users/cvogt/Development/Julia/aarch64/1.9/src/interpreter.c:126
eval_body at /Users/cvogt/Development/Julia/aarch64/1.9/src/interpreter.c:0
jl_interpret_toplevel_thunk at /Users/cvogt/Development/Julia/aarch64/1.9/src/interpreter.c:762
jl_toplevel_eval_flex at /Users/cvogt/Development/Julia/aarch64/1.9/src/toplevel.c:912
jl_eval_module_expr at /Users/cvogt/Development/Julia/aarch64/1.9/src/toplevel.c:203 [inlined]
jl_toplevel_eval_flex at /Users/cvogt/Development/Julia/aarch64/1.9/src/toplevel.c:715
jl_toplevel_eval_flex at /Users/cvogt/Development/Julia/aarch64/1.9/src/toplevel.c:856
ijl_toplevel_eval at /Users/cvogt/Development/Julia/aarch64/1.9/src/toplevel.c:921 [inlined]
ijl_toplevel_eval_in at /Users/cvogt/Development/Julia/aarch64/1.9/src/toplevel.c:971
eval at ./boot.jl:370 [inlined]
include_string at ./loading.jl:1903
_jl_invoke at /Users/cvogt/Development/Julia/aarch64/1.9/src/gf.c:0 [inlined]
ijl_apply_generic at /Users/cvogt/Development/Julia/aarch64/1.9/src/gf.c:2940
_include at ./loading.jl:1963
include at ./Base.jl:457
jfptr_include_40476 at /Users/cvogt/Development/Julia/aarch64/1.9/usr/lib/julia/sys.dylib (unknown line)
_jl_invoke at /Users/cvogt/Development/Julia/aarch64/1.9/src/gf.c:0 [inlined]
ijl_apply_generic at /Users/cvogt/Development/Julia/aarch64/1.9/src/gf.c:2940
jl_apply at /Users/cvogt/Development/Julia/aarch64/1.9/src/./julia.h:1880 [inlined]
jl_f__call_latest at /Users/cvogt/Development/Julia/aarch64/1.9/src/builtins.c:774
include at /Users/cvogt/.julia/dev/Ray/src/Ray.jl:6
unknown function (ip: 0x102ca40d3)
_jl_invoke at /Users/cvogt/Development/Julia/aarch64/1.9/src/gf.c:0 [inlined]
ijl_apply_generic at /Users/cvogt/Development/Julia/aarch64/1.9/src/gf.c:2940
jl_apply at /Users/cvogt/Development/Julia/aarch64/1.9/src/./julia.h:1880 [inlined]
do_call at /Users/cvogt/Development/Julia/aarch64/1.9/src/interpreter.c:126
eval_body at /Users/cvogt/Development/Julia/aarch64/1.9/src/interpreter.c:0
jl_interpret_toplevel_thunk at /Users/cvogt/Development/Julia/aarch64/1.9/src/interpreter.c:762
jl_toplevel_eval_flex at /Users/cvogt/Development/Julia/aarch64/1.9/src/toplevel.c:912
jl_eval_module_expr at /Users/cvogt/Development/Julia/aarch64/1.9/src/toplevel.c:203 [inlined]
jl_toplevel_eval_flex at /Users/cvogt/Development/Julia/aarch64/1.9/src/toplevel.c:715
jl_toplevel_eval_flex at /Users/cvogt/Development/Julia/aarch64/1.9/src/toplevel.c:856
jl_toplevel_eval_flex at /Users/cvogt/Development/Julia/aarch64/1.9/src/toplevel.c:856
ijl_toplevel_eval at /Users/cvogt/Development/Julia/aarch64/1.9/src/toplevel.c:921 [inlined]
ijl_toplevel_eval_in at /Users/cvogt/Development/Julia/aarch64/1.9/src/toplevel.c:971
eval at ./boot.jl:370 [inlined]
include_string at ./loading.jl:1903
_jl_invoke at /Users/cvogt/Development/Julia/aarch64/1.9/src/gf.c:0 [inlined]
ijl_apply_generic at /Users/cvogt/Development/Julia/aarch64/1.9/src/gf.c:2940
_include at ./loading.jl:1963
include at ./Base.jl:457 [inlined]
include_package_for_output at ./loading.jl:2049
jfptr_include_package_for_output_35976 at /Users/cvogt/Development/Julia/aarch64/1.9/usr/lib/julia/sys.dylib (unknown line)
_jl_invoke at /Users/cvogt/Development/Julia/aarch64/1.9/src/gf.c:0 [inlined]
ijl_apply_generic at /Users/cvogt/Development/Julia/aarch64/1.9/src/gf.c:2940
jl_apply at /Users/cvogt/Development/Julia/aarch64/1.9/src/./julia.h:1880 [inlined]
do_call at /Users/cvogt/Development/Julia/aarch64/1.9/src/interpreter.c:126
eval_body at /Users/cvogt/Development/Julia/aarch64/1.9/src/interpreter.c:0
jl_interpret_toplevel_thunk at /Users/cvogt/Development/Julia/aarch64/1.9/src/interpreter.c:762
jl_toplevel_eval_flex at /Users/cvogt/Development/Julia/aarch64/1.9/src/toplevel.c:912
jl_toplevel_eval_flex at /Users/cvogt/Development/Julia/aarch64/1.9/src/toplevel.c:856
ijl_toplevel_eval at /Users/cvogt/Development/Julia/aarch64/1.9/src/toplevel.c:921 [inlined]
ijl_toplevel_eval_in at /Users/cvogt/Development/Julia/aarch64/1.9/src/toplevel.c:971
eval at ./boot.jl:370 [inlined]
include_string at ./loading.jl:1903
include_string at ./loading.jl:1913 [inlined]
exec_options at ./client.jl:305
_start at ./client.jl:522
jfptr__start_45425 at /Users/cvogt/Development/Julia/aarch64/1.9/usr/lib/julia/sys.dylib (unknown line)
_jl_invoke at /Users/cvogt/Development/Julia/aarch64/1.9/src/gf.c:0 [inlined]
ijl_apply_generic at /Users/cvogt/Development/Julia/aarch64/1.9/src/gf.c:2940
jl_apply at /Users/cvogt/Development/Julia/aarch64/1.9/src/./julia.h:1880 [inlined]
true_main at /Users/cvogt/Development/Julia/aarch64/1.9/src/jlapi.c:573
jl_repl_entrypoint at /Users/cvogt/Development/Julia/aarch64/1.9/src/jlapi.c:717
Allocations: 745851 (Pool: 745307; Big: 544); GC: 1
ERROR: Failed to precompile Ray [3f779ece-f0b6-4c4f-a81a-0cb2add9eb95] to "/Users/cvogt/.julia/compiled/v1.9/Ray/jl_7EeQhc".
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:35
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
   @ Base ./loading.jl:2300
 [3] compilecache
   @ ./loading.jl:2167 [inlined]
 [4] _require(pkg::Base.PkgId, env::String)
   @ Base ./loading.jl:1805
 [5] _require_prelocked(uuidkey::Base.PkgId, env::String)
   @ Base ./loading.jl:1660
 [6] macro expansion
   @ ./loading.jl:1648 [inlined]
 [7] macro expansion
   @ ./lock.jl:267 [inlined]
 [8] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1611

The issue seems to be that the version of CxxWrap we build the library against can differ between the build project and the Ray.jl project.

@omus
Copy link
Member Author

omus commented Oct 23, 2023

We probably want to use the JULIA_LOAD_PATH to stack our projects such that the version of CxxWrap is used from the root Project.toml and have only additional build dependencies in the build/Project.toml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant