JuliaPhysics / Measurements.jl

Error propagation calculator and library for physical measurements. It supports real and complex numbers with uncertainty, arbitrary precision calculations, operations with arrays, and numerical integration.

Home Page:https://juliaphysics.github.io/Measurements.jl/stable/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GC Corruption from Measurements.jl usage

ChrisRackauckas opened this issue · comments

https://gitlab.com/PumasAI/Pumas-jl/-/jobs/264465532 was found in https://github.com/PumasAI/Pumas.jl/pull/605 .

GC error (probable corruption) :
Allocations: 288350199 (Pool: 288312654; Big: 37545); GC: 705
<?#0x7f11e5e9f8c0::Measurements.Measurement{Float64}(val=512.784, err=1.52101, tag=0x0000000000000000, der=Measurements.Derivatives{Float64}(parent=Measurements.Derivatives{Float64}(parent=#<null>, key=(2.37152e-322, 6.90283e-310, 0x00007f11e654f490), value=6.91692e-323), key=(2.268, 0.2, 0x0000000000000002), value=-7.60506))>
0x7f124b99b010: Queued root: 0x7f11e7601c10 :: 0x7f125d721c10 (bits: 3)
        of type Core.MethodInstance
0x7f124b99b028: Queued root: 0x7f11e7673c90 :: 0x7f125d721c10 (bits: 3)
        of type Core.MethodInstance
0x7f124b99b040: Queued root: 0x7f11e5e32810 :: 0x7f125d721ba0 (bits: 3)
        of type Method
0x7f124b99b058: Queued root: 0x7f11e39932b0 :: 0x7f125d721ba0 (bits: 3)
        of type Method
0x7f124b99b070: Queued root: 0x7f1266cedb70 :: 0x7f125d721040 (bits: 3)
        of type Array{Any, 1}
0x7f124b99b088:  r-- Stack frame 0x7ffd33f2d7e0 -- 13 of 16 (direct)

signal (6): Aborted
in expression starting at /builds/PumasAI/Pumas-jl/test/features/measurement_tests.jl:7
gsignal at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
abort at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
gc_assert_datatype_fail at /buildworker/worker/package_linux64/build/src/gc.c:1522
gc_mark_loop at /buildworker/worker/package_linux64/build/src/gc.c:2402
_jl_gc_collect at /buildworker/worker/package_linux64/build/src/gc.c:2703
jl_gc_collect at /buildworker/worker/package_linux64/build/src/gc.c:2874
jl_gc_pool_alloc at /buildworker/worker/package_linux64/build/src/gc.c:1102
* at /builds/PumasAI/Pumas-jl/.julia/packages/Measurements/VjRMd/src/math.jl:192
##369 at /builds/PumasAI/Pumas-jl/.julia/packages/ModelingToolkit/3e5pc/src/utils.jl:59
unknown function (ip: 0x7f11e34c93ed)
macro expansion at /builds/PumasAI/Pumas-jl/.julia/packages/ModelingToolkit/3e5pc/src/utils.jl:102 [inlined]
macro expansion at ./none:0 [inlined]
fast_invokelatest at ./none:0 [inlined]
out_f_safe at /builds/PumasAI/Pumas-jl/.julia/packages/ModelingToolkit/3e5pc/src/systems/diffeqs/diffeqsystem.jl:217 [inlined]
DiffEqWrapper at /builds/PumasAI/Pumas-jl/src/simulate_methods/diffeqs.jl:425 [inlined]
ODEFunction at /builds/PumasAI/Pumas-jl/.julia/packages/DiffEqBase/aPwRz/src/diffeqfunction.jl:193 [inlined]
perform_step! at /builds/PumasAI/Pumas-jl/.julia/packages/OrdinaryDiffEq/BhP0W/src/perform_step/low_order_rk_perform_step.jl:589
solve! at /builds/PumasAI/Pumas-jl/.julia/packages/OrdinaryDiffEq/BhP0W/src/perform_step/composite_perform_step.jl:43
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2197
#__solve#345 at /builds/PumasAI/Pumas-jl/.julia/packages/OrdinaryDiffEq/BhP0W/src/solve.jl:5
jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2332
#__solve at ./none:0 [inlined]
#solve#381 at /builds/PumasAI/Pumas-jl/.julia/packages/DiffEqBase/aPwRz/src/solve.jl:39 [inlined]
#solve at ./none:0 [inlined]
#_solve_diffeq#388 at /builds/PumasAI/Pumas-jl/src/simulate_methods/diffeqs.jl:31
#_solve_diffeq at ./none:0 [inlined]
#_solve#84 at /builds/PumasAI/Pumas-jl/src/models/model_api.jl:138 [inlined]
#_solve at ./none:0 [inlined]
#simobs#87 at /builds/PumasAI/Pumas-jl/src/models/model_api.jl:174
unknown function (ip: 0x7f11e3301d87)
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1842
jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2348
#simobs at ./none:0
unknown function (ip: 0x7f11e330167d)
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1842
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2197
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:323
eval_value at /buildworker/worker/package_linux64/build/src/interpreter.c:411
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:625
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:689
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:689
jl_interpret_toplevel_thunk_callback at /buildworker/worker/package_linux64/build/src/interpreter.c:885
unknown function (ip: 0xfffffffffffffffe)
unknown function (ip: 0x7f11e64ec7df)
unknown function (ip: 0x14d)
jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:894
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:764
jl_parse_eval_all at /buildworker/worker/package_linux64/build/src/ast.c:883
jl_load at /buildworker/worker/package_linux64/build/src/toplevel.c:826
include at ./boot.jl:326 [inlined]
include_relative at ./loading.jl:1038
include at ./sysimg.jl:29 [inlined]
include at /builds/PumasAI/Pumas-jl/.julia/packages/SafeTestsets/A83XK/src/SafeTestsets.jl:23
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1842
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2197
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:323
eval_value at /buildworker/worker/package_linux64/build/src/interpreter.c:411
eval_stmt_value at /buildworker/worker/package_linux64/build/src/interpreter.c:362 [inlined]
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:773
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:689
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:689
jl_interpret_toplevel_thunk_callback at /buildworker/worker/package_linux64/build/src/interpreter.c:885
unknown function (ip: 0xfffffffffffffffe)
unknown function (ip: 0x7f11e675177f)
unknown function (ip: 0x27)
jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:894
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:764
jl_eval_module_expr at /buildworker/worker/package_linux64/build/src/toplevel.c:179
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:614
jl_toplevel_eval_in at /buildworker/worker/package_linux64/build/src/toplevel.c:793
eval at ./boot.jl:328
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2197
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:323
eval_value at /buildworker/worker/package_linux64/build/src/interpreter.c:411
eval_stmt_value at /buildworker/worker/package_linux64/build/src/interpreter.c:362 [inlined]
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:773
jl_interpret_toplevel_thunk_callback at /buildworker/worker/package_linux64/build/src/interpreter.c:885
unknown function (ip: 0xfffffffffffffffe)
unknown function (ip: 0x7f11e67440af)
unknown function (ip: 0x3)
jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:894
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:764
jl_parse_eval_all at /buildworker/worker/package_linux64/build/src/ast.c:883
jl_load at /buildworker/worker/package_linux64/build/src/toplevel.c:826
include at ./boot.jl:326 [inlined]
include_relative at ./loading.jl:1038
include at ./sysimg.jl:29
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1842
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2197
include at ./client.jl:403
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2197
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:323
eval_value at /buildworker/worker/package_linux64/build/src/interpreter.c:411
eval_stmt_value at /buildworker/worker/package_linux64/build/src/interpreter.c:362 [inlined]
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:773
jl_interpret_toplevel_thunk_callback at /buildworker/worker/package_linux64/build/src/interpreter.c:885
unknown function (ip: 0xfffffffffffffffe)
unknown function (ip: 0x7f12525a97cf)
unknown function (ip: 0x28)
jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:894
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:764
jl_parse_eval_all at /buildworker/worker/package_linux64/build/src/ast.c:883
jl_load at /buildworker/worker/package_linux64/build/src/toplevel.c:826
include at ./boot.jl:326 [inlined]
include_relative at ./loading.jl:1038
include at ./sysimg.jl:29
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2197
include at ./client.jl:403
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1842
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2197
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:323
eval_value at /buildworker/worker/package_linux64/build/src/interpreter.c:411
eval_stmt_value at /buildworker/worker/package_linux64/build/src/interpreter.c:362 [inlined]
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:773
jl_interpret_toplevel_thunk_callback at /buildworker/worker/package_linux64/build/src/interpreter.c:885
unknown function (ip: 0xfffffffffffffffe)
unknown function (ip: 0x7f125d89793f)
unknown function (ip: 0xffffffffffffffff)
jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:894
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:764
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:713
jl_toplevel_eval_in at /buildworker/worker/package_linux64/build/src/toplevel.c:793
eval at ./boot.jl:328
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2197
exec_options at ./client.jl:243
_start at ./client.jl:436
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2197
jl_apply at /buildworker/worker/package_linux64/build/ui/../src/julia.h:1571 [inlined]
true_main at /buildworker/worker/package_linux64/build/ui/repl.c:96
main at /buildworker/worker/package_linux64/build/ui/repl.c:217
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
_start at /usr/local/julia/bin/julia (unknown line)
Allocations: 288350199 (Pool: 288312654; Big: 37545); GC: 705
ERROR: Package Pumas errored during testing
Stacktrace:
 [1] pkgerror(::String, ::Vararg{String,N} where N) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Types.jl:120
 [2] #test#66(::Bool, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/Pkg/src/Operations.jl:1329
 [3] #test at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/Pkg/src/API.jl:0 [inlined]
 [4] #test#46(::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/Pkg/src/API.jl:198
 [5] #test at ./none:0 [inlined]
 [6] #test#45 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/Pkg/src/API.jl:180 [inlined]
 [7] #test at ./none:0 [inlined]
 [8] #test#44 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/Pkg/src/API.jl:179 [inlined]
 [9] #test at ./none:0 [inlined]
 [10] #test#43(::Base.Iterators.Pairs{Symbol,Bool,Tuple{Symbol},NamedTuple{(:coverage,),Tuple{Bool}}}, ::Function, ::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/Pkg/src/API.jl:178
 [11] (::getfield(Pkg.API, Symbol("#kw##test")))(::NamedTuple{(:coverage,),Tuple{Bool}}, ::typeof(Pkg.API.test), ::String) at ./none:0
 [12] top-level scope at none:0

The test that was being run is https://github.com/PumasAI/Pumas.jl/blob/master/test/features/measurement_tests.jl which is sending a Measurement through an ODE.

Thanks for the report, however I cannot reproduce the error by just including the measurement_tests.jl file:

julia> include("measurement_tests.jl")
warnings for Measurements are suppressed.
Test Summary: | Pass  Total
Static Vector |    2      2
Test Summary:     | Pass  Total
Non-static vector |    2      2
Test Summary:  | Pass  Total
Magic argument |    2      2
Test Summary:     | Pass  Total
Analytic solution |    2      2
Test.DefaultTestSet("Analytic solution", Any[], 2, false)

Information about my environment:

(Pumas) pkg> status
Project Pumas v0.1.0
    Status `~/.julia/dev/Pumas/Project.toml`
  [0bf59076] + AdvancedHMC v0.2.2
  [336ed68f] + CSV v0.5.9
  [a93c6f00] + DataFrames v0.18.4
  [82cc6244] + DataInterpolations v0.2.0
  [864edb3b] + DataStructures v0.17.0
  [bcd4f6db] + DelayDiffEq v5.11.0
  [2b5f629d] + DiffEqBase v5.17.0
  [01453d9d] + DiffEqDiffTools v0.14.0
  [c894b116] + DiffEqJump v6.2.0
  [163ba53b] + DiffResults v0.0.4
  [31c24e10] + Distributions v0.21.1
  [f6369f11] + ForwardDiff v0.10.3
  [38e38edf] + GLM v1.1.1
  [19dc6840] + HCubature v1.4.0
  [2ee39098] + LabelledArrays v0.7.1
  [c7f686f2] + MCMCChains v0.3.11
  [1914dd2f] + MacroTools v0.5.1
  [e1d29d7a] + Missings v0.4.1
  [961ee093] + ModelingToolkit v0.5.0
  [429524aa] + Optim v0.19.2
  [1dea7af3] + OrdinaryDiffEq v5.13.0
  [90014a1f] + PDMats v0.9.7
  [3cdcf5f2] + RecipesBase v0.7.0
  [731186ca] + RecursiveArrayTools v1.0.0
  [189a3867] + Reexport v0.2.0
  [90137ffa] + StaticArrays v0.11.0
  [2913bbd2] + StatsBase v0.32.0
  [f3b207a7] + StatsPlots v0.10.2
  [09ab397b] + StructArrays v0.4.0
  [bd369af6] + Tables v0.2.10
  [84d833dd] + TransformVariables v0.3.3
  [a2a6695c] + TreeViews v0.3.0
  [1986cc42] + Unitful v0.16.0
  [ade2ca70] + Dates 
  [8ba89e20] + Distributed 
  [37e2e46d] + LinearAlgebra 
  [d6f4376e] + Markdown 
  [44cfe95a] + Pkg 
  [de0858da] + Printf 
    Status `~/.julia/dev/Pumas/Manifest.toml`
  [0bf59076] + AdvancedHMC v0.2.2
  [336ed68f] + CSV v0.5.9
  [a93c6f00] + DataFrames v0.18.4
  [82cc6244] + DataInterpolations v0.2.0
  [864edb3b] + DataStructures v0.17.0
  [bcd4f6db] + DelayDiffEq v5.11.0
  [2b5f629d] + DiffEqBase v5.17.0
  [01453d9d] + DiffEqDiffTools v0.14.0
  [c894b116] + DiffEqJump v6.2.0
  [163ba53b] + DiffResults v0.0.4
  [31c24e10] + Distributions v0.21.1
  [f6369f11] + ForwardDiff v0.10.3
  [38e38edf] + GLM v1.1.1
  [19dc6840] + HCubature v1.4.0
  [2ee39098] + LabelledArrays v0.7.1
  [c7f686f2] + MCMCChains v0.3.11
  [1914dd2f] + MacroTools v0.5.1
  [e1d29d7a] + Missings v0.4.1
  [961ee093] + ModelingToolkit v0.5.0
  [429524aa] + Optim v0.19.2
  [1dea7af3] + OrdinaryDiffEq v5.13.0
  [90014a1f] + PDMats v0.9.7
  [3cdcf5f2] + RecipesBase v0.7.0
  [731186ca] + RecursiveArrayTools v1.0.0
  [189a3867] + Reexport v0.2.0
  [90137ffa] + StaticArrays v0.11.0
  [2913bbd2] + StatsBase v0.32.0
  [f3b207a7] + StatsPlots v0.10.2
  [09ab397b] + StructArrays v0.4.0
  [bd369af6] + Tables v0.2.10
  [84d833dd] + TransformVariables v0.3.3
  [a2a6695c] + TreeViews v0.3.0
  [1986cc42] + Unitful v0.16.0
  [ade2ca70] + Dates 
  [8ba89e20] + Distributed 
  [37e2e46d] + LinearAlgebra 
  [d6f4376e] + Markdown 
  [44cfe95a] + Pkg 
  [de0858da] + Printf 

julia> versioninfo()
Julia Version 1.1.1
Commit 55e36cc308 (2019-05-16 04:10 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, haswell)

@giordano @ChrisRackauckas this may be related to MakieOrg/Makie.jl#374, which was reported at JuliaLang/julia#32751 and fixed in JuliaLang/julia#32773. I've tested to check that this was fixed on the latest nightlies. If so, you may want to request a backport?

Well, retesting worked 🤷‍♂