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

Profile: by default, don't initialize with more than 10M samples (even if there are multiple threads); also, fix the Profile tests when multithreading is enabled #42254

Closed
wants to merge 1 commit into from

Conversation

DilumAluthge
Copy link
Member

Fixes #42252

@DilumAluthge
Copy link
Member Author

DilumAluthge commented Sep 15, 2021

Okay, so in its current state, this PR fixes the Profile tests on linux64.

However, there are still failures on linux32.

Here are the `linux32` failures (click to expand):
      From worker 5:	┌ Warning: The profile data buffer is full; profiling probably terminated
      From worker 5:	│ before your program finished. To profile for longer runs, call
      From worker 5:	│ `Profile.init()` with a larger buffer and/or larger delay.
      From worker 5:	└ @ Profile /cache/build/amdci7-2/julialang/julia-master/usr/share/julia/stdlib/v1.8/Profile/src/Profile.jl:510
      From worker 5:	┌ Warning: The profile data buffer is full; profiling probably terminated
      From worker 5:	│ before your program finished. To profile for longer runs, call
      From worker 5:	│ `Profile.init()` with a larger buffer and/or larger delay.
      From worker 5:	└ @ Profile /cache/build/amdci7-2/julialang/julia-master/usr/share/julia/stdlib/v1.8/Profile/src/Profile.jl:510
Profile                             (5) |         failed at 2021-09-15T09:20:47.555
Test Failed at /cache/build/amdci7-0/julialang/julia-master/julia-e9e09c705c/share/julia/stdlib/v1.8/Profile/test/runtests.jl:110
  Expression: n_ == def_n * Threads.nthreads()
   Evaluated: 134217728 == 160000000
Error During Test at /cache/build/amdci7-0/julialang/julia-master/julia-e9e09c705c/share/julia/stdlib/v1.8/Profile/test/runtests.jl:120
  Got exception outside of a @test
  InexactError: check_top_bit(UInt32, -2147483648)
  Stacktrace:
    [1] throw_inexacterror(f::Symbol, #unused#::Type{UInt32}, val::Int32)
      @ Core ./boot.jl:607
    [2] check_top_bit
      @ ./boot.jl:621 [inlined]
    [3] toUInt32
      @ ./boot.jl:720 [inlined]
    [4] UInt32
      @ ./boot.jl:761 [inlined]
    [5] convert
      @ ./number.jl:7 [inlined]
    [6] cconvert
      @ ./essentials.jl:417 [inlined]
    [7] init(n::Int32, delay::Float64; limitwarn::Bool)
      @ Profile /cache/build/amdci7-2/julialang/julia-master/usr/share/julia/stdlib/v1.8/Profile/src/Profile.jl:77
    [8] init(; n::Int32, delay::Float64, limitwarn::Bool)
      @ Profile /cache/build/amdci7-2/julialang/julia-master/usr/share/julia/stdlib/v1.8/Profile/src/Profile.jl:62
    [9] macro expansion
      @ /cache/build/amdci7-0/julialang/julia-master/julia-e9e09c705c/share/julia/stdlib/v1.8/Profile/test/runtests.jl:130 [inlined]
   [10] macro expansion
      @ /cache/build/amdci7-2/julialang/julia-master/usr/share/julia/stdlib/v1.8/Test/src/Test.jl:1321 [inlined]
   [11] top-level scope
      @ /cache/build/amdci7-0/julialang/julia-master/julia-e9e09c705c/share/julia/stdlib/v1.8/Profile/test/runtests.jl:121
   [12] include
      @ ./Base.jl:416 [inlined]
   [13] macro expansion
      @ /cache/build/amdci7-0/julialang/julia-master/julia-e9e09c705c/share/julia/test/testdefs.jl:24 [inlined]
   [14] macro expansion
      @ /cache/build/amdci7-2/julialang/julia-master/usr/share/julia/stdlib/v1.8/Test/src/Test.jl:1321 [inlined]
   [15] macro expansion
      @ /cache/build/amdci7-0/julialang/julia-master/julia-e9e09c705c/share/julia/test/testdefs.jl:23 [inlined]
   [16] macro expansion
      @ ./timing.jl:368 [inlined]
   [17] runtests(name::String, path::String, isolate::Bool; seed::UInt128)
      @ Main /cache/build/amdci7-0/julialang/julia-master/julia-e9e09c705c/share/julia/test/testdefs.jl:21
   [18] (::Distributed.var"#106#108"{Distributed.CallMsg{:call_fetch}})()
      @ Distributed /cache/build/amdci7-2/julialang/julia-master/usr/share/julia/stdlib/v1.8/Distributed/src/process_messages.jl:278
   [19] run_work_thunk(thunk::Distributed.var"#106#108"{Distributed.CallMsg{:call_fetch}}, print_error::Bool)
      @ Distributed /cache/build/amdci7-2/julialang/julia-master/usr/share/julia/stdlib/v1.8/Distributed/src/process_messages.jl:63
   [20] macro expansion
      @ /cache/build/amdci7-2/julialang/julia-master/usr/share/julia/stdlib/v1.8/Distributed/src/process_messages.jl:278 [inlined]
   [21] (::Distributed.var"#105#107"{Distributed.CallMsg{:call_fetch}, Distributed.MsgHeader, Sockets.TCPSocket})()
      @ Distributed ./task.jl:411
Error During Test at /cache/build/amdci7-0/julialang/julia-master/julia-e9e09c705c/share/julia/stdlib/v1.8/Profile/test/runtests.jl:148
  Test threw exception
  Expression: getline(values(fdictc)) == getline(values(fdict0)) + 2
  MethodError: no method matching +(::Nothing, ::Int32)
  Closest candidates are:
    +(::Any, ::Any, !Matched::Any, !Matched::Any...) at operators.jl:655
    +(!Matched::T, ::T) where T<:Union{Int128, Int16, Int32, Int64, Int8, UInt128, UInt16, UInt32, UInt64, UInt8} at int.jl:87
    +(!Matched::T, ::Integer) where T<:AbstractChar at char.jl:237
    ...
  Stacktrace:
   [1] macro expansion
     @ /cache/build/amdci7-2/julialang/julia-master/usr/share/julia/stdlib/v1.8/Test/src/Test.jl:460 [inlined]
   [2] macro expansion
     @ /cache/build/amdci7-0/julialang/julia-master/julia-e9e09c705c/share/julia/stdlib/v1.8/Profile/test/runtests.jl:148 [inlined]
   [3] macro expansion
     @ /cache/build/amdci7-2/julialang/julia-master/usr/share/julia/stdlib/v1.8/Test/src/Test.jl:1321 [inlined]
   [4] top-level scope
     @ /cache/build/amdci7-0/julialang/julia-master/julia-e9e09c705c/share/julia/stdlib/v1.8/Profile/test/runtests.jl:134

The full log is here: https://buildkite.com/julialang/julia-master/builds/3683#00e8a61a-add7-484e-8803-64c8a1b77d76

@DilumAluthge DilumAluthge force-pushed the dpa/profile-tests-multithreading branch from 0ca1a88 to ee5f105 Compare September 15, 2021 10:41
@DilumAluthge DilumAluthge changed the title Profile tests: fix the tests when multithreading is enabled Profile: by default, don't initialize with more than 10M samples (even if there are multiple threads); also, fix the Profile tests when multithreading is enabled Sep 15, 2021
@DilumAluthge DilumAluthge added the ci Continuous integration label Sep 15, 2021
@DilumAluthge DilumAluthge changed the title Profile: by default, don't initialize with more than 10M samples (even if there are multiple threads); also, fix the Profile tests when multithreading is enabled Profile: by default, don't initialize with more than 10M samples (even if there are multiple threads); also, fix the Profile tests when multithreading is enabled Sep 15, 2021
@DilumAluthge DilumAluthge force-pushed the dpa/profile-tests-multithreading branch from ee5f105 to ec3cac7 Compare September 15, 2021 10:57
@DilumAluthge DilumAluthge removed the test This change adds or pertains to unit tests label Sep 15, 2021
@DilumAluthge DilumAluthge deleted the dpa/profile-tests-multithreading branch September 15, 2021 13:29
@vtjnash vtjnash removed backport 1.6 Change should be backported to release-1.6 backport 1.7 labels Sep 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This change fixes an existing bug ci Continuous integration profiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Profile tests fail when multithreading is enabled
2 participants