DataStructures.jl icon indicating copy to clipboard operation
DataStructures.jl copied to clipboard

test suite failures on ARM: test_swiss_dict.jl errors on julia 1.3.1, test_sorted_containers.jl hangs on Julia 1.5.1

Open peteristhegreat opened this issue 4 years ago • 2 comments

Working on a t4g.micro instance in AWS, I was trying some packages that rely on DataStructures.jl in Julia 1.3.1, and I was hitting some issues. I tried the test suite for DataStructures.jl and got these errors:

/home/ec2-user/.julia/packages/DataStructures/mgePl/test/test_swiss_dict.jl ...
SwissDict: Error During Test at /home/ec2-user/.julia/packages/DataStructures/mgePl/test/test_swiss_dict.jl:14
  Got exception outside of a @test
  UndefRefError: access to undefined reference
  Stacktrace:
   [1] getindex at ./array.jl:744 [inlined]
   [2] ht_keyindex2! at /home/ec2-user/.julia/packages/DataStructures/mgePl/src/swiss_dict.jl:190 [inlined]
   [3] ht_keyindex2!(::SwissDict{Any,Any}, ::Int64) at /home/ec2-user/.julia/packages/DataStructures/mgePl/src/swiss_dict.jl:175
   [4] _setindex! at /home/ec2-user/.julia/packages/DataStructures/mgePl/src/swiss_dict.jl:390 [inlined]
   [5] setindex!(::SwissDict{Any,Any}, ::Int64, ::Int64) at /home/ec2-user/.julia/packages/DataStructures/mgePl/src/swiss_dict.jl:385
   [6] top-level scope at /home/ec2-user/.julia/packages/DataStructures/mgePl/test/test_swiss_dict.jl:17
   [7] top-level scope at /buildworker/worker/package_linuxaarch64/build/usr/share/julia/stdlib/v1.3/Test/src/Test.jl:1107
   [8] top-level scope at /home/ec2-user/.julia/packages/DataStructures/mgePl/test/test_swiss_dict.jl:15
   [9] include at ./boot.jl:328 [inlined]
   [10] include_relative(::Module, ::String) at ./loading.jl:1105
   [11] include(::Module, ::String) at ./Base.jl:31
   [12] include(::String) at ./client.jl:424
   [13] top-level scope at /home/ec2-user/.julia/packages/DataStructures/mgePl/test/runtests.jl:50
   [14] top-level scope at /buildworker/worker/package_linuxaarch64/build/usr/share/julia/stdlib/v1.3/Test/src/Test.jl:1107
   [15] top-level scope at /home/ec2-user/.julia/packages/DataStructures/mgePl/test/runtests.jl:47
   [16] include at ./boot.jl:328 [inlined]
   [17] include_relative(::Module, ::String) at ./loading.jl:1105
   [18] include(::Module, ::String) at ./Base.jl:31
   [19] include(::String) at ./client.jl:424
   [20] top-level scope at none:6
   [21] eval(::Module, ::Any) at ./boot.jl:330
   [22] exec_options(::Base.JLOptions) at ./client.jl:263
   [23] _start() at ./client.jl:460

SwissDict on pairs: Error During Test at /home/ec2-user/.julia/packages/DataStructures/mgePl/test/test_swiss_dict.jl:75
  Got exception outside of a @test
  KeyError: key 5 not found
  Stacktrace:
   [1] pop!(::SwissDict{Int64,Int64}, ::Int64) at /home/ec2-user/.julia/packages/DataStructures/mgePl/src/swiss_dict.jl:592
   [2] top-level scope at /home/ec2-user/.julia/packages/DataStructures/mgePl/test/test_swiss_dict.jl:77
   [3] top-level scope at /buildworker/worker/package_linuxaarch64/build/usr/share/julia/stdlib/v1.3/Test/src/Test.jl:1107
   [4] top-level scope at /home/ec2-user/.julia/packages/DataStructures/mgePl/test/test_swiss_dict.jl:76
   [5] include at ./boot.jl:328 [inlined]
   [6] include_relative(::Module, ::String) at ./loading.jl:1105
   [7] include(::Module, ::String) at ./Base.jl:31
   [8] include(::String) at ./client.jl:424
   [9] top-level scope at /home/ec2-user/.julia/packages/DataStructures/mgePl/test/runtests.jl:50
   [10] top-level scope at /buildworker/worker/package_linuxaarch64/build/usr/share/julia/stdlib/v1.3/Test/src/Test.jl:1107
   [11] top-level scope at /home/ec2-user/.julia/packages/DataStructures/mgePl/test/runtests.jl:47
   [12] include at ./boot.jl:328 [inlined]
   [13] include_relative(::Module, ::String) at ./loading.jl:1105
   [14] include(::Module, ::String) at ./Base.jl:31
   [15] include(::String) at ./client.jl:424
   [16] top-level scope at none:6
   [17] eval(::Module, ::Any) at ./boot.jl:330
   [18] exec_options(::Base.JLOptions) at ./client.jl:263
   [19] _start() at ./client.jl:460

Filter function: Error During Test at /home/ec2-user/.julia/packages/DataStructures/mgePl/test/test_swiss_dict.jl:110
  Got exception outside of a @test
  UndefRefError: access to undefined reference
  Stacktrace:
   [1] getindex at ./array.jl:744 [inlined]
   [2] ht_keyindex2! at /home/ec2-user/.julia/packages/DataStructures/mgePl/src/swiss_dict.jl:190 [inlined]
   [3] ht_keyindex2!(::SwissDict{String,Int64}, ::String) at /home/ec2-user/.julia/packages/DataStructures/mgePl/src/swiss_dict.jl:175
   [4] _setindex! at /home/ec2-user/.julia/packages/DataStructures/mgePl/src/swiss_dict.jl:390 [inlined]
   [5] setindex! at /home/ec2-user/.julia/packages/DataStructures/mgePl/src/swiss_dict.jl:385 [inlined]
   [6] SwissDict{String,Int64}(::Tuple{Pair{String,Int64}}) at /home/ec2-user/.julia/packages/DataStructures/mgePl/src/swiss_dict.jl:52
   [7] SwissDict(::Pair{String,Int64}) at /home/ec2-user/.julia/packages/DataStructures/mgePl/src/swiss_dict.jl:70
   [8] top-level scope at /home/ec2-user/.julia/packages/DataStructures/mgePl/test/test_swiss_dict.jl:111
   [9] top-level scope at /buildworker/worker/package_linuxaarch64/build/usr/share/julia/stdlib/v1.3/Test/src/Test.jl:1107
   [10] top-level scope at /home/ec2-user/.julia/packages/DataStructures/mgePl/test/test_swiss_dict.jl:111
   [11] include at ./boot.jl:328 [inlined]
   [12] include_relative(::Module, ::String) at ./loading.jl:1105
   [13] include(::Module, ::String) at ./Base.jl:31
   [14] include(::String) at ./client.jl:424
   [15] top-level scope at /home/ec2-user/.julia/packages/DataStructures/mgePl/test/runtests.jl:50
   [16] top-level scope at /buildworker/worker/package_linuxaarch64/build/usr/share/julia/stdlib/v1.3/Test/src/Test.jl:1107
   [17] top-level scope at /home/ec2-user/.julia/packages/DataStructures/mgePl/test/runtests.jl:47
   [18] include at ./boot.jl:328 [inlined]
   [19] include_relative(::Module, ::String) at ./loading.jl:1105
   [20] include(::Module, ::String) at ./Base.jl:31
   [21] include(::String) at ./client.jl:424
   [22] top-level scope at none:6
   [23] eval(::Module, ::Any) at ./boot.jl:330
   [24] exec_options(::Base.JLOptions) at ./client.jl:263
   [25] _start() at ./client.jl:460

typeof: Error During Test at /home/ec2-user/.julia/packages/DataStructures/mgePl/test/test_swiss_dict.jl:127
  Test threw exception
  Expression: d[3] === 4
  KeyError: key 3 not found
  Stacktrace:
   [1] getindex(::SwissDict{Int64,Int64}, ::Int64) at /home/ec2-user/.julia/packages/DataStructures/mgePl/src/swiss_dict.jl:470
   [2] top-level scope at /home/ec2-user/.julia/packages/DataStructures/mgePl/test/test_swiss_dict.jl:127
   [3] top-level scope at /buildworker/worker/package_linuxaarch64/build/usr/share/julia/stdlib/v1.3/Test/src/Test.jl:1107
   [4] top-level scope at /home/ec2-user/.julia/packages/DataStructures/mgePl/test/test_swiss_dict.jl:125

typeof: Test Failed at /home/ec2-user/.julia/packages/DataStructures/mgePl/test/test_swiss_dict.jl:130
  Expression: d == d2 == d3
   Evaluated: SwissDict(1 => 2,0 => -1,0 => 3,0 => 281472898533024,0 => 281472898532912,0 => 281473106542960,0 => 281472916047088,0 => 4,3 => 4,0 => 281472898533584…) == SwissDict(1 => 2,281472816942064 => 0,281473103880592 => 0,281472903760432 => 0,281473103880592 => 0,281472816942512 => 0,281472816943632 => 0,281473103880592 => 0,3 => 4,281472816974672 => 0…) == SwissDict(1 => 2,91 => 1,44 => 0,281472795672577 => 22,0 => 5,1 => 1,281473026655488 => 79,281473026411344 => 38,3 => 4,281473026365784 => 91…)
Stacktrace:
 [1] top-level scope at /home/ec2-user/.julia/packages/DataStructures/mgePl/test/test_swiss_dict.jl:130
 [2] top-level scope at /buildworker/worker/package_linuxaarch64/build/usr/share/julia/stdlib/v1.3/Test/src/Test.jl:1107
 [3] top-level scope at /home/ec2-user/.julia/packages/DataStructures/mgePl/test/test_swiss_dict.jl:125

And then it hangs.

Trying again with Julia 1.5.1 it instead hangs on the test_sorted_containers.jl test.

               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.5.1 (2020-08-25)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(@v1.5) pkg> test DataStructures
    Testing DataStructures
Status `~/tmp/jl_EvbRmV/Project.toml`
  [34da2185] Compat v3.16.0
  [864edb3b] DataStructures v0.18.6
  [bac558e1] OrderedCollections v1.3.1
  [27ebfcd6] Primes v0.5.0
  [b77e0a4c] InteractiveUtils
  [9a3f8284] Random
  [9e88b42a] Serialization
  [8dfed614] Test
Status `~/tmp/jl_EvbRmV/Manifest.toml`
  [34da2185] Compat v3.16.0
  [864edb3b] DataStructures v0.18.6
  [bac558e1] OrderedCollections v1.3.1
  [27ebfcd6] Primes v0.5.0
  [2a0f44e3] Base64
  [ade2ca70] Dates
  [8bb1440f] DelimitedFiles
  [8ba89e20] Distributed
  [b77e0a4c] InteractiveUtils
  [76f85450] LibGit2
  [8f399da3] Libdl
  [37e2e46d] LinearAlgebra
  [56ddb016] Logging
  [d6f4376e] Markdown
  [a63ad114] Mmap
  [44cfe95a] Pkg
  [de0858da] Printf
  [3fa0cd96] REPL
  [9a3f8284] Random
  [ea8e919c] SHA
  [9e88b42a] Serialization
  [1a1011a3] SharedArrays
  [6462fe0b] Sockets
  [2f01184e] SparseArrays
  [10745b16] Statistics
  [8dfed614] Test
  [cf7118a7] UUIDs
  [4ec0a83e] Unicode
Skipping Base.active_repl
Skipping Base.active_repl_backend
/home/ec2-user/.julia/packages/DataStructures/mgePl/test/test_deprecations.jl ...
┌ Warning: `path(t::Trie, str::AbstractString)` is deprecated, use `partial_path(t::Trie, str::AbstractString)` instead.
│   caller = top-level scope at test_deprecations.jl:12
└ @ Core ~/.julia/packages/DataStructures/mgePl/test/test_deprecations.jl:12
┌ Warning: `path(t::Trie, str::AbstractString)` is deprecated, use `partial_path(t::Trie, str::AbstractString)` instead.
│   caller = top-level scope at test_deprecations.jl:13
└ @ Core ~/.julia/packages/DataStructures/mgePl/test/test_deprecations.jl:13
┌ Warning: `path(t::Trie, str::AbstractString)` is deprecated, use `partial_path(t::Trie, str::AbstractString)` instead.
│   caller = top-level scope at test_deprecations.jl:14
└ @ Core ~/.julia/packages/DataStructures/mgePl/test/test_deprecations.jl:14
┌ Warning: `path(t::Trie, str::AbstractString)` is deprecated, use `partial_path(t::Trie, str::AbstractString)` instead.
│   caller = top-level scope at test_deprecations.jl:15
└ @ Core ~/.julia/packages/DataStructures/mgePl/test/test_deprecations.jl:15
┌ Warning: `path(t::Trie, str::AbstractString)` is deprecated, use `partial_path(t::Trie, str::AbstractString)` instead.
│   caller = top-level scope at test_deprecations.jl:16
└ @ Core ~/.julia/packages/DataStructures/mgePl/test/test_deprecations.jl:16
┌ Warning: `top` is deprecated, use `first` instead.
│   caller = top-level scope at test_deprecations.jl:21
└ @ Core ~/.julia/packages/DataStructures/mgePl/test/test_deprecations.jl:21
┌ Warning: `reverse_iter` is deprecated, use `Iterators.reverse` instead.
│   caller = test_reverse_iter(::Queue{Int64}) at test_deprecations.jl:27
└ @ Main ~/.julia/packages/DataStructures/mgePl/test/test_deprecations.jl:27
┌ Warning: `reverse_iter` is deprecated, use `Iterators.reverse` instead.
│   caller = test_reverse_iter(::Queue{Int64}) at test_deprecations.jl:32
└ @ Main ~/.julia/packages/DataStructures/mgePl/test/test_deprecations.jl:32
┌ Warning: `reverse_iter` is deprecated, use `Iterators.reverse` instead.
│   caller = test_reverse_iter(::Stack{Int64}) at test_deprecations.jl:27
└ @ Main ~/.julia/packages/DataStructures/mgePl/test/test_deprecations.jl:27
┌ Warning: `reverse_iter` is deprecated, use `Iterators.reverse` instead.
│   caller = test_reverse_iter(::Stack{Int64}) at test_deprecations.jl:32
└ @ Main ~/.julia/packages/DataStructures/mgePl/test/test_deprecations.jl:32
/home/ec2-user/.julia/packages/DataStructures/mgePl/test/test_int_set.jl ...
/home/ec2-user/.julia/packages/DataStructures/mgePl/test/test_sparse_int_set.jl ...
/home/ec2-user/.julia/packages/DataStructures/mgePl/test/test_deque.jl ...
/home/ec2-user/.julia/packages/DataStructures/mgePl/test/test_circ_deque.jl ...
/home/ec2-user/.julia/packages/DataStructures/mgePl/test/test_sorted_containers.jl ...

peteristhegreat avatar Sep 21 '20 19:09 peteristhegreat

On my Windows 10 machine (Intel i7), Julia 1.5.1 (fresh install), I was not able to reproduce the issue with test_sorted_containers when I invoked Pkg.test("DataStructures"). It does take a bit longer than the other tests, but still less than a minute.

However, I did confirm a problem with test_swiss_dict. See the trace below. The error message continued for thousands of lines in my command window when I finally hit ^C, so I suppose the error handler itself is getting into an infinite loop.

C:\Users\test_ds_151\.julia\packages\DataStructures\mgePl\test\test_swiss_dict.jl ...
Internal error: encountered unexpected error in runtime:
ErrorException("type UnionAll has no field size")
jl_errorf at /cygdrive/d/buildbot/worker/package_win64/build/src\rtutils.c:77
jl_field_index at /cygdrive/d/buildbot/worker/package_win64/build/src\datatype.c:1001
jl_f_getfield at /cygdrive/d/buildbot/worker/package_win64/build/src\builtins.c:780
intrinsic_nothrow at .\compiler\tfuncs.jl:1483
stmt_effect_free at .\compiler/ssair\queries.jl:30
optimize at .\compiler\optimize.jl:188
typeinf at .\compiler\typeinfer.jl:33
typeinf_edge at .\compiler\typeinfer.jl:484
abstract_call_method at .\compiler\abstractinterpretation.jl:419

StephenVavasis avatar Sep 21 '20 21:09 StephenVavasis

I can confirm the error reported by @StephenVavasis The following creates an internal error in julia (tested on 1.5.2) d3 = SwissDict((1 => 2, 3 => "b"))

mfalt avatar Oct 17 '20 23:10 mfalt

@peteristhegreat @mfalt Neither Julia 1.3 nor 1.5 are supported anymore. If you can reproduce the issue with Julia 1.6 or 1.9 with the latest DataStructures release 0.18.15 feel free to open a new issue.

laborg avatar Oct 05 '23 04:10 laborg