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

Julia 1.10.0 fails REPL tests randomly #52739

Closed
iryabink opened this issue Jan 4, 2024 · 0 comments
Closed

Julia 1.10.0 fails REPL tests randomly #52739

iryabink opened this issue Jan 4, 2024 · 0 comments
Labels
REPL Julia's REPL (Read Eval Print Loop) test This change adds or pertains to unit tests

Comments

@iryabink
Copy link

iryabink commented Jan 4, 2024

Julia version 1.10.0 (official build, Linux version installed to a local user from an official *tar.gz) fails REPL tests randomly.

ilya@ryzen:~/opt/julia-1.10.0/bin$ ./julia 
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.10.0 (2023-12-25)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> versioninfo()
Julia Version 1.10.0
Commit 3120989f39b (2023-12-25 18:01 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 16 × AMD Ryzen 7 3700X 8-Core Processor
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, znver2)
  Threads: 1 on 16 virtual cores

julia>

On the first run:

julia> Base.runtests(["REPL"])
Running parallel tests with:
  nworkers() = 1
  nthreads() = 1
  Sys.CPU_THREADS = 8
  Sys.total_memory() = 94.295 GiB
  Sys.free_memory() = 81.430 GiB

Test  (Worker) | Time (s) | GC (s) | GC % | Alloc (MB) | RSS (MB)
REPL       (1) |        started at 2024-01-04T09:31:37.031
REPL       (1) |         failed at 2024-01-04T09:31:57.701
Test Failed at /home/ilya/opt/julia-1.10.0/share/julia/stdlib/v1.10/REPL/test/replcompletions.jl:683
  Expression: occursin("test(args...)", c[1])
   Evaluated: occursin("test(args...)", "test11(a::Integer, b, c) @ Main.CompletionFoo ~/opt/julia-1.10.0/share/julia/stdlib/v1.10/REPL/test/replcompletions.jl:102")

Test Failed at /home/ilya/opt/julia-1.10.0/share/julia/stdlib/v1.10/REPL/test/replcompletions.jl:684
  Expression: occursin("test11(a::Integer, b, c)", c[2])
   Evaluated: occursin("test11(a::Integer, b, c)", "test(args...) @ Main.CompletionFoo ~/opt/julia-1.10.0/share/julia/stdlib/v1.10/REPL/test/replcompletions.jl:72")



Test Summary: | Pass  Fail  Broken  Total   Time
  Overall     | 1647     2       3   1652  21.6s
    REPL      | 1647     2       3   1652  21.1s
    FAILURE

The global RNG seed was 0xb84638615f8034f324e2841b1ab8fa86.

Error in testset REPL:
Test Failed at /home/ilya/opt/julia-1.10.0/share/julia/stdlib/v1.10/REPL/test/replcompletions.jl:683
  Expression: occursin("test(args...)", c[1])
   Evaluated: occursin("test(args...)", "test11(a::Integer, b, c) @ Main.CompletionFoo ~/opt/julia-1.10.0/share/julia/stdlib/v1.10/REPL/test/replcompletions.jl:102")

Error in testset REPL:
Test Failed at /home/ilya/opt/julia-1.10.0/share/julia/stdlib/v1.10/REPL/test/replcompletions.jl:684
  Expression: occursin("test11(a::Integer, b, c)", c[2])
   Evaluated: occursin("test11(a::Integer, b, c)", "test(args...) @ Main.CompletionFoo ~/opt/julia-1.10.0/share/julia/stdlib/v1.10/REPL/test/replcompletions.jl:72")

ERROR: LoadError: Test run finished with errors
in expression starting at /home/ilya/opt/julia-1.10.0/share/julia/test/runtests.jl:95
ERROR: A test has failed. Please submit a bug report (https://github.com/JuliaLang/julia/issues)
including error messages above and the output of versioninfo():
Julia Version 1.10.0
Commit 3120989f39b (2023-12-25 18:01 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 16 × AMD Ryzen 7 3700X 8-Core Processor
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, znver2)
  Threads: 1 on 16 virtual cores

Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:35
 [2] runtests(tests::Vector{String}; ncores::Int64, exit_on_error::Bool, revise::Bool, seed::Nothing)
   @ Base ./util.jl:706
 [3] runtests(tests::Vector{String})
   @ Base ./util.jl:681
 [4] top-level scope
   @ REPL[2]:1

caused by: failed process: Process(setenv(`/home/ilya/opt/julia-1.10.0/bin/julia -C native -J/home/ilya/opt/julia-1.10.0/lib/julia/sys.so -g1 /home/ilya/opt/julia-1.10.0/bin/../share/julia/test/runtests.jl REPL`,["PATH=/home/ilya/.local/bin:/home/ilya/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/ilya/.dotnet/tools:/home/ilya/.dotnet:/home/ilya/.dotnet/tools:/home/ilya/.dotnet:/home/ilya/.dotnet/tools", "DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path", "QT_ACCESSIBILITY=1", "INVOCATION_ID=0eeac5848f4e43d88946fb7c67c73df3", "IM_CONFIG_PHASE=1", "MC_TMPDIR=/tmp/mc-ilya", "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus", "XDG_CURRENT_DESKTOP=ubuntu:GNOME", "LANG=en_CA.UTF-8", "LOGNAME=ilya"  …  "SESSION_MANAGER=local/ryzen:@/tmp/.ICE-unix/2809,unix/ryzen:/tmp/.ICE-unix/2809", "XMODIFIERS=@im=ibus", "MC_SID=311878", "HOME=/home/ilya", "TERM=xterm-256color", "WINDOWPATH=2", "LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:", "COLORTERM=truecolor", "OPENBLAS_MAIN_FREE=1", "VTE_VERSION=6003"]), ProcessExited(1)) [1]

Stacktrace:
 [1] pipeline_error
   @ Base ./process.jl:565 [inlined]
 [2] run(::Cmd; wait::Bool)
   @ Base ./process.jl:480
 [3] run
   @ ./process.jl:477 [inlined]
 [4] runtests(tests::Vector{String}; ncores::Int64, exit_on_error::Bool, revise::Bool, seed::Nothing)
   @ Base ./util.jl:698
 [5] runtests(tests::Vector{String})
   @ Base ./util.jl:681
 [6] top-level scope
   @ REPL[2]:1

julia>

On the second immediate run:

julia> Base.runtests(["REPL"])
Running parallel tests with:
  nworkers() = 1
  nthreads() = 1
  Sys.CPU_THREADS = 8
  Sys.total_memory() = 94.295 GiB
  Sys.free_memory() = 81.366 GiB

Test  (Worker) | Time (s) | GC (s) | GC % | Alloc (MB) | RSS (MB)
REPL       (1) |        started at 2024-01-04T09:32:21.420
REPL       (1) |    20.60 |   0.48 |  2.3 |    1869.17 |   564.52

Test Summary: | Pass  Broken  Total   Time
  Overall     | 1649       3   1652  21.6s
    SUCCESS

julia>

On the third run you may or may not reproduce the error. For example, when I was writing this post the third run was successful. Sometimes, the first run is OK, the second or subsequent fail

@giordano giordano added test This change adds or pertains to unit tests REPL Julia's REPL (Read Eval Print Loop) labels Jan 4, 2024
aviatesk added a commit that referenced this issue Jan 29, 2024
The earlier test relied on the order of the method match list returned
by `_methods_by_ftype`. However, particularly in cases where the
`ambig=true` option is used, the match list isn't deterministic. This
commit modifies it, similar to other pieces of code, so that it `any` to
ensure the code does not depend on the implementation details of
`ml_matches`.

Fixes #52739.
aviatesk added a commit that referenced this issue Jan 29, 2024
While the original issue #52739 has been observed only in v1.10, the
necessity to enhance the robustness of the corresponding test code is
still applicable in the nightly. See #53096 for the details.
aviatesk added a commit that referenced this issue Jan 29, 2024
The earlier test relied on the order of the method match list returned
by `_methods_by_ftype`. However, particularly in cases where the
`ambig=true` option is used, the match list isn't deterministic. This
commit modifies it, similar to other pieces of code, so that it `any` to
ensure the code does not depend on the implementation details of
`ml_matches`.

Fixes #52739.
aviatesk added a commit that referenced this issue Jan 29, 2024
#53097)

While the original issue #52739 has been observed only in v1.10, the
necessity to enhance the robustness of the corresponding test code is
still applicable in the nightly. See #53096 for the details.
Drvi pushed a commit to RelationalAI/julia that referenced this issue Jun 7, 2024
The earlier test relied on the order of the method match list returned
by `_methods_by_ftype`. However, particularly in cases where the
`ambig=true` option is used, the match list isn't deterministic. This
commit modifies it, similar to other pieces of code, so that it `any` to
ensure the code does not depend on the implementation details of
`ml_matches`.

Fixes JuliaLang#52739.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
REPL Julia's REPL (Read Eval Print Loop) test This change adds or pertains to unit tests
Projects
None yet
Development

No branches or pull requests

3 participants