Skip to content

Testing package extentions gives ConcurrencyViolationError #308

@oameye

Description

@oameye

When testing the extentions of my package with Aqua in the CI, I get a ConcurrencyViolationError:

using HarmonicBalance
using Aqua
using ModelingToolkit, OrdinaryDiffEqTsit5, SteadyStateDiffEq

TimeEvolution = Base.get_extension(HarmonicBalance, :TimeEvolution)
ModelingToolkitExt = Base.get_extension(HarmonicBalance, :ModelingToolkitExt)
SteadyStateDiffEqExt = Base.get_extension(HarmonicBalance, :SteadyStateDiffEqExt)

for mod in [TimeEvolution, ModelingToolkitExt, SteadyStateDiffEqExt]
    Aqua.test_ambiguities(mod)
    Aqua.test_all(
        mod;
        deps_compat=false,
        ambiguities=false,
        piracies=false,
        stale_deps=false,
        project_extras=false,
        persistent_tasks=false
    )
end
Error: Error during loading of extension SteadyStateDiffEqExt of HarmonicBalance, use `Base.retry_load_extensions()` to retry.
│   exception =1-element ExceptionStack:ConcurrencyViolationError("deadlock detected in loading SteadyStateDiffEqExt -> SteadyStateDiffEqExt")
│    Stacktrace:
│      [1] start_loading(modkey::Base.PkgId)
│        @ Base ./loading.jl:1637
│      [2] _require(pkg::Base.PkgId, env::Nothing)
│        @ Base ./loading.jl:1917
│      [3] __require_prelocked(uuidkey::Base.PkgId, env::Nothing)
│        @ Base ./loading.jl:1812
│      [4] #invoke_in_world#3
│        @ ./essentials.jl:926 [inlined]
│      [5] invoke_in_world
│        @ ./essentials.jl:923 [inlined]
│      [6] _require_prelocked
│        @ ./loading.jl:1803 [inlined]
│      [7] _require_prelocked
│        @ ./loading.jl:1802 [inlined]
│      [8] run_extension_callbacks(extid::Base.ExtensionId)
│        @ Base ./loading.jl:1295
│      [9] run_extension_callbacks(pkgid::Base.PkgId)
│        @ Base ./loading.jl:1330
│     [10] run_package_callbacks(modkey::Base.PkgId)
│        @ Base ./loading.jl:1164
│     [11] _tryrequire_from_serialized(modkey::Base.PkgId, path::String, ocachepath::String, sourcepath::String, depmods::Vector{Any})
│        @ Base ./loading.jl:1487
│     [12] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
│        @ Base ./loading.jl:1574
│     [13] _require(pkg::Base.PkgId, env::Nothing)
│        @ Base ./loading.jl:1938
│     [14] __require_prelocked(uuidkey::Base.PkgId, env::Nothing)
│        @ Base ./loading.jl:1812
│     [15] #invoke_in_world#3
│        @ ./essentials.jl:926 [inlined]
│     [16] invoke_in_world
│        @ ./essentials.jl:923 [inlined]
│     [17] _require_prelocked
│        @ ./loading.jl:1803 [inlined]
│     [18] _require_prelocked
│        @ ./loading.jl:1802 [inlined]
│     [19] macro expansion
│        @ ./lock.jl:267 [inlined]
│     [20] require(uuidkey::Base.PkgId)
│        @ Base ./loading.jl:1797
│     [21] iterate
│        @ ./generator.jl:47 [inlined]
│     [22] _collect(c::Vector{Base.PkgId}, itr::Base.Generator{Vector{Base.PkgId}, typeof(Base.require)}, ::Base.EltypeUnknown, isz::Base.HasShape{1})
│        @ Base ./array.jl:854
│     [23] collect_similar
│        @ ./array.jl:763 [inlined]
│     [24] map
│        @ ./abstractarray.jl:3285 [inlined]
│     [25] test_ambiguities_impl(packages::Vector{Base.PkgId}, options::@NamedTuple{recursive::Bool}, exspecs::Vector{Pair{Base.PkgId, String}}, skipdetails::Bool)
│        @ Aqua ~/.julia/packages/Aqua/Fxre9/src/ambiguities.jl:194
│     [26] top-level scope
│        @ none:8
│     [27] eval
│        @ ./boot.jl:385 [inlined]
│     [28] exec_options(opts::Base.JLOptions)
│        @ Base ./client.jl:291
│     [29] _start()
│        @ Base ./client.jl:552
└ @ Base loading.jl:1301

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions