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

Test failure in threads test on aarch64 #38555

Closed
Keno opened this issue Nov 23, 2020 · 1 comment
Closed

Test failure in threads test on aarch64 #38555

Keno opened this issue Nov 23, 2020 · 1 comment
Assignees
Labels
bug Indicates an unexpected problem or unintended behavior ci Continuous integration multithreading Base.Threads and related functionality test This change adds or pertains to unit tests

Comments

@Keno
Copy link
Member

Keno commented Nov 23, 2020

https://build.julialang.org/#/builders/52/builds/5744

In relevant part:

Error During Test at /buildworker/worker/tester_linuxaarch64/build/share/julia/test/threads_exec.jl:847
  Test threw exception
  Expression: fib34666(25) == 75025
  TaskFailedException
  Stacktrace:
    [1] wait
      @ ./task.jl:306 [inlined]
    [2] fetch
      @ ./task.jl:321 [inlined]
    [3] (::var"#f#105"{Channel{Any}})(x::Int64)
      @ Main /buildworker/worker/tester_linuxaarch64/build/share/julia/test/threads_exec.jl:843
    [4] macro expansion
      @ /buildworker/worker/tester_linuxaarch64/build/share/julia/test/threads_exec.jl:845 [inlined]
    [5] macro expansion
      @ ./task.jl:371 [inlined]
    [6] fib34666(x::Int64)
      @ Main /buildworker/worker/tester_linuxaarch64/build/share/julia/test/threads_exec.jl:837
    [7] top-level scope
      @ /buildworker/worker/tester_linuxaarch64/build/share/julia/test/threads_exec.jl:847
    [8] include(mod::Module, _path::String)
      @ Base ./Base.jl:386
    [9] exec_options(opts::Base.JLOptions)
      @ Base ./client.jl:285
   [10] _start()
      @ Base ./client.jl:485
  
      nested task error: TaskFailedException
      Stacktrace:
       [1] wait
         @ ./task.jl:306 [inlined]
       [2] fetch
         @ ./task.jl:321 [inlined]
       [3] (::var"#f#105"{Channel{Any}})(x::Int64)
         @ Main /buildworker/worker/tester_linuxaarch64/build/share/julia/test/threads_exec.jl:843
       [4] (::var"#103#106"{Int64})()
         @ Main ./threadingconstructs.jl:169
      
          nested task error: TaskFailedException
          Stacktrace:
           [1] wait
             @ ./task.jl:306 [inlined]
           [2] fetch
             @ ./task.jl:321 [inlined]
           [3] (::var"#f#105"{Channel{Any}})(x::Int64)
             @ Main /buildworker/worker/tester_linuxaarch64/build/share/julia/test/threads_exec.jl:843
           [4] (::var"#104#107"{Int64})()
             @ Main ./threadingconstructs.jl:169
          
              nested task error: TaskFailedException
              Stacktrace:
               [1] wait
                 @ ./task.jl:306 [inlined]
               [2] fetch
                 @ ./task.jl:321 [inlined]
               [3] (::var"#f#105"{Channel{Any}})(x::Int64)
                 @ Main /buildworker/worker/tester_linuxaarch64/build/share/julia/test/threads_exec.jl:843
               [4] (::var"#103#106"{Int64})()
                 @ Main ./threadingconstructs.jl:169
              
                  nested task error: TaskFailedException
                  Stacktrace:
                   [1] wait
                     @ ./task.jl:306 [inlined]
                   [2] fetch
                     @ ./task.jl:321 [inlined]
                   [3] (::var"#f#105"{Channel{Any}})(x::Int64)
                     @ Main /buildworker/worker/tester_linuxaarch64/build/share/julia/test/threads_exec.jl:843
                   [4] (::var"#104#107"{Int64})()
                     @ Main ./threadingconstructs.jl:169
                  
                      nested task error: TaskFailedException
                      Stacktrace:
                       [1] wait
                         @ ./task.jl:306 [inlined]
                       [2] fetch
                         @ ./task.jl:321 [inlined]
                       [3] (::var"#f#105"{Channel{Any}})(x::Int64)
                         @ Main /buildworker/worker/tester_linuxaarch64/build/share/julia/test/threads_exec.jl:843
                       [4] (::var"#104#107"{Int64})()
                         @ Main ./threadingconstructs.jl:169
                      
                          nested task error: TaskFailedException
                          Stacktrace:
                           [1] wait
                             @ ./task.jl:306 [inlined]
                           [2] fetch
                             @ ./task.jl:321 [inlined]
                           [3] (::var"#f#105"{Channel{Any}})(x::Int64)
                             @ Main /buildworker/worker/tester_linuxaarch64/build/share/julia/test/threads_exec.jl:843
                           [4] (::var"#104#107"{Int64})()
                             @ Main ./threadingconstructs.jl:169
                          
                              nested task error: TaskFailedException
                              Stacktrace:
                               [1] wait
                                 @ ./task.jl:306 [inlined]
                               [2] fetch
                                 @ ./task.jl:321 [inlined]
                               [3] (::var"#f#105"{Channel{Any}})(x::Int64)
                                 @ Main /buildworker/worker/tester_linuxaarch64/build/share/julia/test/threads_exec.jl:843
                               [4] (::var"#103#106"{Int64})()
                                 @ Main ./threadingconstructs.jl:169
                              
                                  nested task error: TaskFailedException
                                  Stacktrace:
                                   [1] wait
                                     @ ./task.jl:306 [inlined]
                                   [2] fetch
                                     @ ./task.jl:321 [inlined]
                                   [3] (::var"#f#105"{Channel{Any}})(x::Int64)
                                     @ Main /buildworker/worker/tester_linuxaarch64/build/share/julia/test/threads_exec.jl:843
                                   [4] (::var"#104#107"{Int64})()
                                     @ Main ./threadingconstructs.jl:169
                                  
                                      nested task error: TaskFailedException
                                      Stacktrace:
                                       [1] wait
                                         @ ./task.jl:306 [inlined]
                                       [2] fetch
                                         @ ./task.jl:321 [inlined]
                                       [3] (::var"#f#105"{Channel{Any}})(x::Int64)
                                         @ Main /buildworker/worker/tester_linuxaarch64/build/share/julia/test/threads_exec.jl:843
                                       [4] (::var"#103#106"{Int64})()
                                         @ Main ./threadingconstructs.jl:169
                                      
                                          nested task error: TaskFailedException
                                          Stacktrace:
                                           [1] wait
                                             @ ./task.jl:306 [inlined]
                                           [2] fetch
                                             @ ./task.jl:321 [inlined]
                                           [3] (::var"#f#105"{Channel{Any}})(x::Int64)
                                             @ Main /buildworker/worker/tester_linuxaarch64/build/share/julia/test/threads_exec.jl:843
                                           [4] (::var"#103#106"{Int64})()
                                             @ Main ./threadingconstructs.jl:169
                                          
                                              nested task error: TaskFailedException
                                              Stacktrace:
                                               [1] wait
                                                 @ ./task.jl:306 [inlined]
                                               [2] fetch
                                                 @ ./task.jl:321 [inlined]
                                               [3] (::var"#f#105"{Channel{Any}})(x::Int64)
                                                 @ Main /buildworker/worker/tester_linuxaarch64/build/share/julia/test/threads_exec.jl:843
                                               [4] (::var"#103#106"{Int64})()
                                                 @ Main ./threadingconstructs.jl:169
                                              
                                                  nested task error: TaskFailedException
                                                  Stacktrace:
                                                   [1] wait
                                                     @ ./task.jl:306 [inlined]
                                                   [2] fetch
                                                     @ ./task.jl:321 [inlined]
                                                   [3] (::var"#f#105"{Channel{Any}})(x::Int64)
                                                     @ Main /buildworker/worker/tester_linuxaarch64/build/share/julia/test/threads_exec.jl:843
                                                   [4] (::var"#104#107"{Int64})()
                                                     @ Main ./threadingconstructs.jl:169
                                                  
                                                      nested task error: TaskFailedException
                                                      Stacktrace:
                                                       [1] wait
                                                         @ ./task.jl:306 [inlined]
                                                       [2] fetch
                                                         @ ./task.jl:321 [inlined]
                                                       [3] (::var"#f#105"{Channel{Any}})(x::Int64)
                                                         @ Main /buildworker/worker/tester_linuxaarch64/build/share/julia/test/threads_exec.jl:843
                                                       [4] (::var"#104#107"{Int64})()
                                                         @ Main ./threadingconstructs.jl:169
                                                      
                                                          nested task error: TaskFailedException
                                                          Stacktrace:
                                                           [1] wait
                                                             @ ./task.jl:306 [inlined]
                                                           [2] fetch
                                                             @ ./task.jl:321 [inlined]
                                                           [3] (::var"#f#105"{Channel{Any}})(x::Int64)
                                                             @ Main /buildworker/worker/tester_linuxaarch64/build/share/julia/test/threads_exec.jl:843
                                                           [4] (::var"#103#106"{Int64})()
                                                             @ Main ./threadingconstructs.jl:169
                                                          
                                                              nested task error: TaskFailedException
                                                              Stacktrace:
                                                               [1] wait
                                                                 @ ./task.jl:306 [inlined]
                                                               [2] fetch
                                                                 @ ./task.jl:321 [inlined]
                                                               [3] (::var"#f#105"{Channel{Any}})(x::Int64)
                                                                 @ Main /buildworker/worker/tester_linuxaarch64/build/share/julia/test/threads_exec.jl:843
                                                               [4] (::var"#104#107"{Int64})()
                                                                 @ Main ./threadingconstructs.jl:169
                                                              
                                                                  nested task error: MethodError: no method matching +(::Int64, ::Nothing)
                                                                  Closest candidates are:
                                                                    +(::Any, ::Any, !Matched::Any, !Matched::Any...) at operators.jl:540
                                                                    +(::T, !Matched::T) where T<:Union{Int128, Int16, Int32, Int64, Int8, UInt128, UInt16, UInt32, UInt64, UInt8} at int.jl:87
                                                                    +(::Union{Int16, Int32, Int64, Int8}, !Matched::BigInt) at gmp.jl:534
                                                                    ...
                                                                  Stacktrace:
                                                                   [1] (::var"#f#105"{Channel{Any}})(x::Int64)
                                                                     @ Main /buildworker/worker/tester_linuxaarch64/build/share/julia/test/threads_exec.jl:843
                                                                   [2] (::var"#104#107"{Int64})()
                                                                     @ Main ./threadingconstructs.jl:169
ERROR: LoadError: There was an error during testing
in expression starting at /buildworker/worker/tester_linuxaarch64/build/share/julia/test/threads_exec.jl:847
@Keno Keno added multithreading Base.Threads and related functionality bug Indicates an unexpected problem or unintended behavior test This change adds or pertains to unit tests ci Continuous integration labels Nov 23, 2020
@Keno
Copy link
Member Author

Keno commented Nov 23, 2020

If I just run

for i = 1:100; @test fib34666(25) == 75025; end

with 8 threads, this reproduces pretty much every time.

@Keno Keno self-assigned this Nov 24, 2020
Keno added a commit that referenced this issue Nov 24, 2020
On x86 loads have implicit acquire semantics, but the same is
not true on other architectures (e.g. aarch64). We've been
observing test failures on aarch64 as a result (#38555).
Currently, we don't really have a good way to modify fields
in an atomic way (pending #37847), so this just achieves
the same thing using llvmcall to try and get the tests passing.
Keno added a commit that referenced this issue Nov 25, 2020
On x86 loads have implicit acquire semantics, but the same is
not true on other architectures (e.g. aarch64). We've been
observing test failures on aarch64 as a result (#38555).
Currently, we don't really have a good way to modify fields
in an atomic way (pending #37847), so this just achieves
the same thing using llvmcall to try and get the tests passing.
@Keno Keno closed this as completed Nov 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior ci Continuous integration multithreading Base.Threads and related functionality test This change adds or pertains to unit tests
Projects
None yet
Development

No branches or pull requests

1 participant