-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Restore initial state of DEPOT_PATH
after precompilation workload
#51746
base: master
Are you sure you want to change the base?
Restore initial state of DEPOT_PATH
after precompilation workload
#51746
Conversation
69cc535
to
b8929a0
Compare
DEPOT_PATH
etcDEPOT_PATH
etc
base/loading.jl
Outdated
@@ -2296,17 +2296,44 @@ function include_package_for_output(pkg::PkgId, input::String, depot_path::Vecto | |||
task_local_storage()[:SOURCE_PATH] = source | |||
end | |||
|
|||
original_depot_path = copy(Base.DEPOT_PATH) | |||
original_load_path = copy(Base.LOAD_PATH) | |||
original_env = copy(ENV) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's comment out the ENV
-related checks for now?
AFAICT, changes to ENV
shouldn't affect #49866, right?
This is only affected by what the package does during precompilation, right? It's not affected by anything a package does in its |
Couldn't these just restore the paths instead of erroring if they are mutated? |
I think that would be fine, although I think it would be nice to encourage package authors to clean up at the end of their precompile workload. |
Okay, but these environment variables are just a few out of many. Why not compare the whole |
Atm I think it does not, because the check actually happens too late, e.g. after serialization is done 😆. Need to figure out the correct place to intercept. |
Regarding:
The docs say (https://docs.julialang.org/en/v1/manual/modules/)
So I think there is no danger in interfering with Memo for myself: |
e223b8a
to
70d049f
Compare
An argument in favor for this strategy is that throwing an error after a potential long precompilation load would waste all that precious work. |
@nanosoldier |
The package evaluation job you requested has completed - possible new issues were detected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you detect whether the package changed these values? And then print a warning if they did? (In addition to restoring the original values?)
base/loading.jl
Outdated
|
||
# restore some globals in case they were altered in the precompilation workload | ||
append!(empty!(Base.DEPOT_PATH), depot_path) | ||
append!(empty!(Base.DL_LOAD_PATH), dl_load_path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a comment explaining why it's necessary to restore Base.DL_LOAD_PATH
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None of these except DEPOT_PATH are necessary to aid the relocation.
I thought it would make sense to reset them too, because they are just set like this before running precompilation workload.
PkgEval showed a few hick ups, perhaps some where caused by these.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm. If the only thing that is necessary for the relocation is the DEPOT_PATH, then let's just do that, and get rid of the other stuff?
DEPOT_PATH
etcDEPOT_PATH
after precompilation workload
7f0105d
to
914479b
Compare
I studied the PkgEval, but could not find anything obvious that points at this PR. |
46831fe
to
d3f7672
Compare
Let's do another PkgEval run, now that the PR has been simplified considerably? @nanosoldier |
The package evaluation job you requested has completed - possible new issues were detected. |
Three out of the four crashes were caused by the same LLVM assertion that was dominant in the first PkgEval (not sure if there is already an issue for that) julia: /source/usr/include/llvm/ADT/SmallVector.h:273: T& llvm::SmallVectorTemplateCommon<T, <template-parameter-1-2> >::operator[](llvm::SmallVectorTemplateCommon<T, <template-parameter-1-2> >::size_type) [with T = int; <template-parameter-1-2> = void; llvm::SmallVectorTemplateCommon<T, <template-parameter-1-2> >::reference = int&; llvm::SmallVectorTemplateCommon<T, <template-parameter-1-2> >::size_type = long unsigned int]: Assertion `idx < size()' failed. The error from the fourth pkg Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading.
Testing Running tests...
Instruction does not dominate all uses!
%667 = call token (...) @llvm.julia.gc_preserve_begin({} addrspace(10)* nonnull %658), !dbg !583
call void @llvm.julia.gc_preserve_end(token %667), !dbg !583
Failed to verify function 'julia__addstates!_6216', dumping entire module!
... The skipped tests seem to be problematic and seem to be all related to ERROR: LoadError: Error building `PyCall`:
ERROR: LoadError: ArgumentError: Failed to determine depot from srctext files in cache file /home/pkgeval/.julia/compiled/v1.11/Conda/WZE3U_1qfsV.ji.
- Make sure you have adjusted DEPOT_PATH in case you relocated depots. |
I can't reproduce the
and
|
Let me try also resetting |
@nanosoldier |
The package evaluation job you requested has completed - no new issues were detected. |
Ok, somehow the |
I wonder if its related to the On my machine I have the following inside my Conda's cache file (^@^@^@@depot/packages/Conda/2lg2O/deps/deps.jlÍ^@^@^@^@^@^@^@const ROOTENV = "/home/flo/wd/julia/usr/share/julia/conda/3/x86_64"
const MINICONDA_VERSION = "3"
const USE_MINIFORGE = true
const CONDA_EXE = "/home/flo/wd/julia/usr/share/julia/conda/3/x86_64/bin/conda" which makes it clearly not relocatable. But I don't understand why this shows up only on PkgEval and why resetting |
0dce5a3
to
e5a05ed
Compare
I rebased to see if #51989 fixed the PkgEval skips. @nanosoldier runtests(["SymPy", "ScikitLearn", "Pandas", "QuantumESPRESSOParser","Queryverse","HiQGA","Simplices","IterativeLearningControl","PlotSeis","Scruff","SymFEL","SQLdf","Surprise","IceFloeTracker","ClimatePlots","Garlic","DCEMRI","SciPyDiffEq","CVXOPT","MTH229","PerceptualColourMaps","Gettext","Batsrus","OpenStreetMapXPlot","AnalyticComb","PlotPlants","Retriever","MusicVisualizations","GAlgebra","CometLogger","BundlerIO","CDGRNs","SciMLTutorials","GerryChain","ClimateMARGO","ChargeTransport"]) |
I forgot the backticks. @nanosoldier |
The package evaluation job you requested has completed - no new issues were detected. |
Idea came from JuliaLang/Pkg.jl#3668 (comment)
At least preserving
DEPOT_PATH
through precompilation workload will be essential for #49866.Julia build will now fail, because
Pkg
does not pass that check until JuliaLang/Pkg.jl#3668 is merged.And I guess this will also need a
PkgEval
.cc @vchuravy @DilumAluthge