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

Sigsegv caused by polymake (presumably) with bleeding-new system #3023

Closed
laurentbartholdi opened this issue Nov 16, 2023 · 4 comments
Closed

Comments

@laurentbartholdi
Copy link

I upgraded (because of other packages and development) julia from its source repository, and it seems Polymake got broken along the way. At least, here is the output on my macOS M1 laptop:

julia> using Oscar
┌ Info: Precompiling Oscar [f1435218-dba5-11e9-1e4d-f1a5fab5fc13]
└ @ Base loading.jl:2442

[17142] signal 11 (2): Segmentation fault: 11
in expression starting at /Users/laurent/.julia/packages/Oscar/EfZT4/src/imports.jl:14
_ZN10jlpolymake27call_function_feed_argumentIN2pm4perl10VarFunCallEEEvRT_P11_jl_value_t at /Users/laurent/.julia/artifacts/224ff39695c50d14d6e7f7487543e974fb256f7e/lib/libpolymake_julia.dylib (unknown line)
_ZN10jlpolymake22polymake_call_functionIN2pm4perl13PropertyValueEEET_RKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEERKNS5_6vectorISB_NS9_ISB_EEEEN5jlcxx8ArrayRefIP11_jl_value_tLi1EEE at /Users/laurent/.julia/artifacts/224ff39695c50d14d6e7f7487543e974fb256f7e/lib/libpolymake_julia.dylib (unknown line)
_ZN5jlcxx6detail11CallFunctorIN2pm4perl13PropertyValueEJRKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEERKNS5_6vectorISB_NS9_ISB_EEEENS_8ArrayRefIP11_jl_value_tLi1EEEEE5applyEPKvNS_13WrappedCppPtrESQ_P10jl_array_t at /Users/laurent/.julia/artifacts/224ff39695c50d14d6e7f7487543e974fb256f7e/lib/libpolymake_julia.dylib (unknown line)
internal_call_function at /Users/laurent/.julia/dev/CxxWrap/src/CxxWrap.jl:625
#35 at /Users/laurent/.julia/packages/Polymake/CBURK/src/call_function.jl:24 [inlined]
disable_sigint at ./c.jl:167
#call_function#34 at /Users/laurent/.julia/packages/Polymake/CBURK/src/call_function.jl:17
call_function at /Users/laurent/.julia/packages/Polymake/CBURK/src/call_function.jl:10 [inlined]
#call_function#37 at /Users/laurent/.julia/packages/Polymake/CBURK/src/call_function.jl:31
call_function at /Users/laurent/.julia/packages/Polymake/CBURK/src/call_function.jl:29 [inlined]
#16 at /Users/laurent/.julia/packages/Polymake/CBURK/src/Polymake.jl:254
withenv at ./env.jl:246
unknown function (ip: 0x152a80053)
_jl_invoke at /usr/local/src/julia/src/gf.c:2913 [inlined]
ijl_apply_generic at /usr/local/src/julia/src/gf.c:3095
jl_apply at /usr/local/src/julia/src/./julia.h:2129 [inlined]
do_apply at /usr/local/src/julia/src/builtins.c:815
__init__ at /Users/laurent/.julia/packages/Polymake/CBURK/src/Polymake.jl:225
unknown function (ip: 0x1529ba233)
_jl_invoke at /usr/local/src/julia/src/gf.c:2913 [inlined]
ijl_apply_generic at /usr/local/src/julia/src/gf.c:3095
jl_apply at /usr/local/src/julia/src/./julia.h:2129 [inlined]
jl_module_run_initializer at /usr/local/src/julia/src/toplevel.c:76
run_module_init at ./loading.jl:1135
register_restored_modules at ./loading.jl:1123
_include_from_serialized at ./loading.jl:1068
_require_search_from_serialized at ./loading.jl:1582
_require at ./loading.jl:1995
__require_prelocked at ./loading.jl:1872
jfptr___require_prelocked_64639 at /usr/local/src/julia/usr/lib/julia/sys.dylib (unknown line)
_jl_invoke at /usr/local/src/julia/src/gf.c:2894 [inlined]
ijl_apply_generic at /usr/local/src/julia/src/gf.c:3095
jl_apply at /usr/local/src/julia/src/./julia.h:2129 [inlined]
jl_f__call_in_world at /usr/local/src/julia/src/builtins.c:878
#invoke_in_world#3 at ./essentials.jl:962 [inlined]
invoke_in_world at ./essentials.jl:959 [inlined]
_require_prelocked at ./loading.jl:1863
macro expansion at ./loading.jl:1801 [inlined]
macro expansion at ./lock.jl:267 [inlined]
__require at ./loading.jl:1762
jfptr___require_64571 at /usr/local/src/julia/usr/lib/julia/sys.dylib (unknown line)
_jl_invoke at /usr/local/src/julia/src/gf.c:2894 [inlined]
ijl_apply_generic at /usr/local/src/julia/src/gf.c:3095
jl_apply at /usr/local/src/julia/src/./julia.h:2129 [inlined]
jl_f__call_in_world at /usr/local/src/julia/src/builtins.c:878
#invoke_in_world#3 at ./essentials.jl:962 [inlined]
invoke_in_world at ./essentials.jl:959 [inlined]
require at ./loading.jl:1755
jfptr_require_64568 at /usr/local/src/julia/usr/lib/julia/sys.dylib (unknown line)
_jl_invoke at /usr/local/src/julia/src/gf.c:2894 [inlined]
ijl_apply_generic at /usr/local/src/julia/src/gf.c:3095
jl_apply at /usr/local/src/julia/src/./julia.h:2129 [inlined]
call_require at /usr/local/src/julia/src/toplevel.c:481 [inlined]
eval_import_path at /usr/local/src/julia/src/toplevel.c:518
jl_toplevel_eval_flex at /usr/local/src/julia/src/toplevel.c:807
jl_toplevel_eval_flex at /usr/local/src/julia/src/toplevel.c:881
ijl_toplevel_eval at /usr/local/src/julia/src/toplevel.c:947 [inlined]
ijl_toplevel_eval_in at /usr/local/src/julia/src/toplevel.c:989
eval at ./boot.jl:422 [inlined]
include_string at ./loading.jl:2133
_jl_invoke at /usr/local/src/julia/src/gf.c:2894 [inlined]
ijl_apply_generic at /usr/local/src/julia/src/gf.c:3095
_include at ./loading.jl:2193
include at ./Base.jl:525
jfptr_include_43115 at /usr/local/src/julia/usr/lib/julia/sys.dylib (unknown line)
_jl_invoke at /usr/local/src/julia/src/gf.c:2894 [inlined]
ijl_apply_generic at /usr/local/src/julia/src/gf.c:3095
jl_apply at /usr/local/src/julia/src/./julia.h:2129 [inlined]
jl_f__call_latest at /usr/local/src/julia/src/builtins.c:859
include at /Users/laurent/.julia/packages/Oscar/EfZT4/src/Oscar.jl:20
unknown function (ip: 0x106b0c0cb)
_jl_invoke at /usr/local/src/julia/src/gf.c:2913 [inlined]
ijl_apply_generic at /usr/local/src/julia/src/gf.c:3095
jl_apply at /usr/local/src/julia/src/./julia.h:2129 [inlined]
do_call at /usr/local/src/julia/src/interpreter.c:126
eval_stmt_value at /usr/local/src/julia/src/interpreter.c:174 [inlined]
eval_body at /usr/local/src/julia/src/interpreter.c:637
jl_interpret_toplevel_thunk at /usr/local/src/julia/src/interpreter.c:795
jl_toplevel_eval_flex at /usr/local/src/julia/src/toplevel.c:938
jl_eval_module_expr at /usr/local/src/julia/src/toplevel.c:215 [inlined]
jl_toplevel_eval_flex at /usr/local/src/julia/src/toplevel.c:738
jl_toplevel_eval_flex at /usr/local/src/julia/src/toplevel.c:881
jl_toplevel_eval_flex at /usr/local/src/julia/src/toplevel.c:881
ijl_toplevel_eval at /usr/local/src/julia/src/toplevel.c:947 [inlined]
ijl_toplevel_eval_in at /usr/local/src/julia/src/toplevel.c:989
eval at ./boot.jl:422 [inlined]
include_string at ./loading.jl:2133
_jl_invoke at /usr/local/src/julia/src/gf.c:2894 [inlined]
ijl_apply_generic at /usr/local/src/julia/src/gf.c:3095
_include at ./loading.jl:2193
include at ./Base.jl:525 [inlined]
include_package_for_output at ./loading.jl:2311
jfptr_include_package_for_output_64869 at /usr/local/src/julia/usr/lib/julia/sys.dylib (unknown line)
_jl_invoke at /usr/local/src/julia/src/gf.c:2894 [inlined]
ijl_apply_generic at /usr/local/src/julia/src/gf.c:3095
jl_apply at /usr/local/src/julia/src/./julia.h:2129 [inlined]
do_call at /usr/local/src/julia/src/interpreter.c:126
eval_stmt_value at /usr/local/src/julia/src/interpreter.c:174 [inlined]
eval_body at /usr/local/src/julia/src/interpreter.c:637
jl_interpret_toplevel_thunk at /usr/local/src/julia/src/interpreter.c:795
jl_toplevel_eval_flex at /usr/local/src/julia/src/toplevel.c:938
jl_toplevel_eval_flex at /usr/local/src/julia/src/toplevel.c:881
ijl_toplevel_eval at /usr/local/src/julia/src/toplevel.c:947 [inlined]
ijl_toplevel_eval_in at /usr/local/src/julia/src/toplevel.c:989
eval at ./boot.jl:422 [inlined]
include_string at ./loading.jl:2133
include_string at ./loading.jl:2143 [inlined]
exec_options at ./client.jl:316
_start at ./client.jl:525
jfptr__start_66165 at /usr/local/src/julia/usr/lib/julia/sys.dylib (unknown line)
_jl_invoke at /usr/local/src/julia/src/gf.c:2894 [inlined]
ijl_apply_generic at /usr/local/src/julia/src/gf.c:3095
jl_apply at /usr/local/src/julia/src/./julia.h:2129 [inlined]
true_main at /usr/local/src/julia/src/jlapi.c:586
jl_repl_entrypoint at /usr/local/src/julia/src/jlapi.c:738
Allocations: 2583068 (Pool: 2582920; Big: 148); GC: 4
ERROR: Failed to precompile Oscar [f1435218-dba5-11e9-1e4d-f1a5fab5fc13] to "/Users/laurent/.julia/compiled/v1.11/Oscar/jl_RGyHxr".
(@v1.11) pkg> status Oscar
Status `~/.julia/environments/v1.11/Project.toml`
  [f1435218] Oscar v0.14.0-DEV `https://github.com/oscar-system/Oscar.jl#master`
julia> versioninfo()
Julia Version 1.11.0-DEV.868
Commit f31cd8ad2f (2023-11-08 17:27 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin22.6.0)
  CPU: 10 × Apple M1 Max
  WORD_SIZE: 64
  LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1)
  Threads: 1 on 8 virtual cores
@lgoettgens
Copy link
Member

It is a known problem that Polymake (and everything else dependent on CxxWrap) is incompatible with julia nightly. See e.g. JuliaInterop/CxxWrap.jl#391 and JuliaInterop/libcxxwrap-julia#137.

@laurentbartholdi
Copy link
Author

laurentbartholdi commented Nov 16, 2023 via email

@benlorenz
Copy link
Member

benlorenz commented Nov 17, 2023

If you want to work with julia master you will need to rebuild not only libcxxwrap_julia frequently but also libpolymake_julia_jll, libsingular_julia_jll, maybe GAP_pkg_juliainterface_jll and polymake_oscarnumber_jll.

Rebuilding libpolymake_julia with a custom build of libcxxwrap_julia allows the Polymake.jl tests to pass but Oscar will still refuse to load, this time due to libsingular_julia:

julia-nightly: symbol lookup error: ~/.julia/artifacts/7d92a5fcca61efbd3a650f8472afcf2ab1d7d9ac/lib/libsingular_julia.so: undefined symbol: jl_arrayset, version JL_LIBJULIA_1.11

And it looks like libsingular_julia also needs a bunch of changes to even build with the latest julia nightly.

All this is due to frequent changes in the julia C API and ABI.
For using Oscar I would really recommend staying away from julia nightly.

@fingolfin
Copy link
Member

I think @benlorenz explained it all quite correctly. At this point your only options are to either use Julia 1.9 or 1.10-rcX with latest Oscar; or use bleeding edge Julia and not use Oscar. We hopefully will soon support Julia master again (e.g. @benlorenz is quite busy working on that), but as long as they keep breaking APIs/ABIs weekly, this will always be a game of catch up.

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

4 participants