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

Errors in Sets module on FunctionWrappers v1.1.2 #388

Closed
epatters opened this issue Mar 1, 2021 · 4 comments
Closed

Errors in Sets module on FunctionWrappers v1.1.2 #388

epatters opened this issue Mar 1, 2021 · 4 comments
Labels

Comments

@epatters
Copy link
Member

epatters commented Mar 1, 2021

The CategoricalAlgebra.Sets module and possibly other modules break when upgrading from FunctionWrappers v1.1.1 to v1.1.2.

In the GitHub CI, we get test failures:

Sets: Test Failed at /home/runner/work/Catlab.jl/Catlab.jl/test/categorical_algebra/Sets.jl:71
  Expression: (π1((1, "foo")), π2((1, "foo"))) == (1, "foo")
   Evaluated: (1, SetFunction(last, TypeSet(Tuple{Int64,String}), TypeSet(String))) == (1, "foo")
Stacktrace:
 [1] top-level scope at /home/runner/work/Catlab.jl/Catlab.jl/test/categorical_algebra/Sets.jl:71
 [2] include(::Function, ::Module, ::String) at ./Base.jl:380
 [3] include at ./Base.jl:368 [inlined]
 [4] include(::String) at /home/runner/work/Catlab.jl/Catlab.jl/test/categorical_algebra/CategoricalAlgebra.jl:1
 [5] top-level scope at /home/runner/work/Catlab.jl/Catlab.jl/test/categorical_algebra/CategoricalAlgebra.jl:22
 [6] top-level scope at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Test/src/Test.jl:1115
 [7] top-level scope at /home/runner/work/Catlab.jl/Catlab.jl/test/categorical_algebra/CategoricalAlgebra.jl:22
Sets: Error During Test at /home/runner/work/Catlab.jl/Catlab.jl/test/categorical_algebra/Sets.jl:75
  Test threw exception
  Expression: (pair(lim, f, g))(["foo", "bar", "baz"]) == (3, "foobarbaz")
  fatal error in type inference (type bound)
  Stacktrace:
   [1] show_delim_array(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::Tuple{Int64,String}, ::Char, ::Char, ::Char, ::Bool, ::Int64, ::Int64) at ./show.jl:776
   [2] show_delim_array at ./show.jl:761 [inlined]
   [3] show at ./show.jl:794 [inlined]
   [4] show_unquoted at ./show.jl:839 [inlined]
   [5] show_unquoted(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::Tuple{Int64,String}, ::Int64, ::Int64, ::Int64) at ./show.jl:840
   [6] show_list(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::Array{Any,1}, ::String, ::Int64, ::Int64, ::Int64, ::Bool, ::Bool) at ./show.jl:1041
   [7] show_list at ./show.jl:1024 [inlined]
   [8] show_unquoted(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::Expr, ::Int64, ::Int64, ::Int64) at ./show.jl:1427
   [9] show_unquoted at ./show.jl:1245 [inlined]
   [10] print(::IOContext{Base.GenericIOBuffer{Array{UInt8,1}}}, ::Expr) at ./show.jl:835
   [11] (::Test.var"#13#16")(::Any) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Test/src/Test.jl:283
   [12] sprint(::Function; context::Nothing, sizehint::Int64) at ./strings/io.jl:105
   [13] sprint at ./strings/io.jl:101 [inlined]
   [14] eval_test(::Expr, ::Expr, ::LineNumberNode, ::Bool) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Test/src/Test.jl:281
   [15] top-level scope at /home/runner/work/Catlab.jl/Catlab.jl/test/categorical_algebra/Sets.jl:75
   [16] include(::Function, ::Module, ::String) at ./Base.jl:380
   [17] include at ./Base.jl:368 [inlined]
   [18] include(::String) at /home/runner/work/Catlab.jl/Catlab.jl/test/categorical_algebra/CategoricalAlgebra.jl:1
   [19] top-level scope at /home/runner/work/Catlab.jl/Catlab.jl/test/categorical_algebra/CategoricalAlgebra.jl:22
   [20] top-level scope at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Test/src/Test.jl:1115
   [21] top-level scope at /home/runner/work/Catlab.jl/Catlab.jl/test/categorical_algebra/CategoricalAlgebra.jl:22

On my local machine (a Mac), I get a segfault:

signal (11): Segmentation fault: 11
in expression starting at /Users/epatters/Local/compositionality/catlab/test/categorical_algebra/Sets.jl:71
inst_datatype_inner at /Users/julia/buildbot/worker/package_macos64/build/src/jltypes.c:1138
jl_inst_concrete_tupletype_v at /Users/julia/buildbot/worker/package_macos64/build/src/jltypes.c:1405
jl_f_tuple at /Users/julia/buildbot/worker/package_macos64/build/src/builtins.c:722
jl_apply at /Users/julia/buildbot/worker/package_macos64/build/src/./julia.h:1690 [inlined]
do_call at /Users/julia/buildbot/worker/package_macos64/build/src/interpreter.c:117
eval_body at /Users/julia/buildbot/worker/package_macos64/build/src/interpreter.c:0
eval_body at /Users/julia/buildbot/worker/package_macos64/build/src/interpreter.c:492
jl_interpret_toplevel_thunk at /Users/julia/buildbot/worker/package_macos64/build/src/interpreter.c:660
jl_toplevel_eval_flex at /Users/julia/buildbot/worker/package_macos64/build/src/toplevel.c:840
jl_eval_module_expr at /Users/julia/buildbot/worker/package_macos64/build/src/toplevel.c:197
jl_toplevel_eval_flex at /Users/julia/buildbot/worker/package_macos64/build/src/toplevel.c:666
jl_parse_eval_all at /Users/julia/buildbot/worker/package_macos64/build/src/ast.c:913
jl_load_rewrite at /Users/julia/buildbot/worker/package_macos64/build/src/toplevel.c:914 [inlined]
jl_load at /Users/julia/buildbot/worker/package_macos64/build/src/toplevel.c:919
include at ./Base.jl:380
include at ./Base.jl:368
exec_options at ./client.jl:296
_start at ./client.jl:506
jfptr__start_57081.clone_1 at /Applications/Julia-1.5.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line)
true_main at /Applications/Julia-1.5.app/Contents/Resources/julia/bin/julia (unknown line)
main at /Applications/Julia-1.5.app/Contents/Resources/julia/bin/julia (unknown line)
Allocations: 18620419 (Pool: 18614385; Big: 6034); GC: 15
Segmentation fault: 11
@epatters epatters added the bug label Mar 1, 2021
epatters added a commit to epatters/Catlab.jl that referenced this issue Mar 1, 2021
epatters added a commit to epatters/Catlab.jl that referenced this issue Mar 1, 2021
@epatters
Copy link
Member Author

epatters commented Mar 1, 2021

For now, I worked around the problem by pegging the version of FunctionWrappers. This bug should probably be reported upstream.

@epatters
Copy link
Member Author

epatters commented Mar 20, 2021

The situation seems to be that:

  • on Julia v1.5, FunctionWrappers 1.1.1 works but v1.1.2 is broken
  • on Julia v1.6-rc3, FunctionWrappers 1.1.1 is broken but v1.1.2 works

Here "broken" means errors possibly followed by segfaults.

@jpfairbanks
Copy link
Member

Do you think it is possible to get a version that works on both? Or are they incompatible?

@epatters
Copy link
Member Author

epatters commented Mar 25, 2021

Good question. I have no idea since I don't know how FunctionWrappers works internally. That's a question for the FunctionWrappers maintainers.

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

No branches or pull requests

2 participants