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

Many packages asserts with: Assertion oldentry->max_world == ~(size_t)0 && "method cannot be added at the same time as method deleted"' failed. #50451

Closed
KristofferC opened this issue Jul 7, 2023 · 3 comments · Fixed by #50540 or #50578
Labels
bug Indicates an unexpected problem or unintended behavior packages Package management and loading
Milestone

Comments

@KristofferC
Copy link
Member

Many packages now assert with something similar to:

WARNING: Method definition constructorof(Type{var"#s1"} where var"#s1"<:(IntervalSets.Interval{L, R, T} where T)) where {L, R} in module ConstructionBaseIntervalSetsExt at /home/pkgeval/.julia/packages/ConstructionBase/pAlst/ext/ConstructionBaseIntervalSetsExt.jl:6 overwritten in module ConstructionBaseExtras at /home/pkgeval/.julia/packages/ConstructionBaseExtras/cy4E1/src/intervalsets.jl:3.
julia: /source/src/gf.c:1486: get_intersect_visitor: Assertion `oldentry->max_world == ~(size_t)0 && "method cannot be added at the same time as method deleted"' failed.

Example PkgEval log: https://s3.amazonaws.com/julialang-reports/nanosoldier/pkgeval/by_hash/c9a32f4_vs_e4ee485/ConstructionBaseExtras.primary.log

I think this happens when a method is overwritten but I didn't check all cases.

@KristofferC KristofferC added the compiler:codegen Generation of LLVM IR and native code label Jul 7, 2023
@KristofferC KristofferC added this to the 1.10 milestone Jul 7, 2023
@maleadt
Copy link
Member

maleadt commented Jul 13, 2023

MWE, requiring actual packages and extensions, and running with assertions enabled:

ConstructionBase.jl, defining the constructorof method

module ConstructionBase
constructorof() = nothing
end

StaticArrays.jl, an empty package to trigger a package extension

module StaticArrays
end

ConstructionBaseStaticArraysExt.jl, the extension that defines constructorof(::Type{<:Integer}):

module ConstructionBaseStaticArraysExt
using ConstructionBase
ConstructionBase.constructorof(::Type) = nothing
ConstructionBase.constructorof(::Type{<:Integer}) = nothing
end

Finally, main.jl, also defining constructorof(::Type{<:Integer}) and crashing when loading StaticArrays -> ConstructionBaseStaticArraysExt

using ConstructionBase
ConstructionBase.constructorof(::Type{<:Integer}) = nothing
using StaticArrays

@maleadt maleadt added packages Package management and loading bug Indicates an unexpected problem or unintended behavior and removed compiler:codegen Generation of LLVM IR and native code labels Jul 13, 2023
vtjnash added a commit that referenced this issue Jul 13, 2023
github-merge-queue bot pushed a commit that referenced this issue Jul 13, 2023
Fixes #50451. Fortunately, this wasn't anything more than an unnecessary
assertion.
@maleadt
Copy link
Member

maleadt commented Jul 15, 2023

Not fixed; the assertion has now just changed to:

Failed to precompile EasyJobsBase [db8ca866-b61f-4bd1-a9b9-75c107d645d4] to "/home/pkgeval/.julia/compiled/v1.11/EasyJobsBase/jl_mX2s9D".
julia: /source/src/gf.c:1486: get_intersect_visitor: Assertion `oldentry->max_world != closure->newentry->min_world && "method cannot be added at the same time as method deleted"' failed.

e.g. https://s3.amazonaws.com/julialang-reports/nanosoldier/pkgeval/by_date/2023-07/14/SimpleWorkflows.primary.log

It also looks like more package trigger the new form of that assertion now?

@maleadt maleadt reopened this Jul 15, 2023
KristofferC pushed a commit that referenced this issue Jul 17, 2023
Fixes #50451

(cherry picked from commit f4f1ecf)
@vtjnash
Copy link
Member

vtjnash commented Jul 17, 2023

The Pkg.precompile code now intentionally suppresses a lot of essential information, which seems to be a severe regression to me, but the PR to fix it is sitting idle (JuliaLang/Pkg.jl#3536). Running this manually results in:

  1 dependency had warnings during precompilation:
┌ Thinkers [6d80a3f9-a943-41fa-97b3-3004c0daf7a3]
│  WARNING: Method definition (::Type{Thinkers.TimeLimitedThunk})(Any, Any) in module Thinkers at /home/vtjnash/.julia/packages/Thinkers/AFzBt/src/TimeLimitedThunk.jl:9 overwritten at /home/vtjnash/.julia/packages/Thinkers/AFzBt/src/TimeLimitedThunk.jl:15.
│    ** incremental compilation may be fatally broken for this module **
└  

And this is exactly (half of) the reason it prints this error. I can push a fix to make that error more clear though.

vtjnash added a commit that referenced this issue Jul 19, 2023
Previously, this was only a WARNING message, which was often missed
during CI runs.

Closes #50451
KristofferC pushed a commit that referenced this issue Jul 24, 2023
Previously, this was only a WARNING message, which was often missed
during CI runs.

Closes #50451

(cherry picked from commit de2c37a)
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 packages Package management and loading
Projects
None yet
3 participants