fix pkg loading from read-only filesystems on unix#61253
Merged
Keno merged 1 commit intoJuliaLang:masterfrom Mar 7, 2026
Merged
fix pkg loading from read-only filesystems on unix#61253Keno merged 1 commit intoJuliaLang:masterfrom
Keno merged 1 commit intoJuliaLang:masterfrom
Conversation
Precompilation files are touched during loading, and if the file is read-only the error is supposed to be ignored. However, only `IOError`s were ignored. On unix `touch` calls `futimes` in the C stdlib and throws `SystemError`.
Member
|
Hi, @nolta!!! |
KristofferC
pushed a commit
that referenced
this pull request
Mar 12, 2026
On our HPC systems `/home` is mounted read-only on the compute nodes,
and if you load a precompiled pkg you'll see errors like the following:
```
julia> using DataFrames
ERROR: SystemError: futimes: Permission denied
Stacktrace:
[1] systemerror(p::Symbol, errno::Int32; extrainfo::Nothing)
@ Base ./error.jl:186
[2] systemerror
@ ./error.jl:185 [inlined]
[3] touch
@ ./filesystem.jl:361 [inlined]
[4] touch(path::String)
@ Base.Filesystem ./file.jl:546
[5] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128, stalecheck::Bool; reasons::Dict{String, Int64}, DEPOT_PATH::Vector{String})
@ Base ./loading.jl:2090
...
```
But touching read-only files is supposed to be fine, according to the
code comments:
https://github.com/JuliaLang/julia/blob/74d12302d74928dbe8c8883bdd395cd3e35481b9/base/loading.jl#L2058-L2064
However, only `IOError`s are ignored. On unix `touch()` calls `futimes`
in the C stdlib and throws `SystemError`:
https://github.com/JuliaLang/julia/blob/74d12302d74928dbe8c8883bdd395cd3e35481b9/base/filesystem.jl#L359-L368
This patch ignores all exceptions thrown when touching precompilation
files.
(cherry picked from commit 8245674)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On our HPC systems
/homeis mounted read-only on the compute nodes, and if you load a precompiled pkg you'll see errors like the following:But touching read-only files is supposed to be fine, according to the code comments:
julia/base/loading.jl
Lines 2058 to 2064 in 74d1230
However, only
IOErrors are ignored. On unixtouch()callsfutimesin the C stdlib and throwsSystemError:julia/base/filesystem.jl
Lines 359 to 368 in 74d1230
This patch ignores all exceptions thrown when touching precompilation files.