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

isdir should not query group gid #182

Closed
simeonschaub opened this issue Jan 29, 2025 · 0 comments · Fixed by #184
Closed

isdir should not query group gid #182

simeonschaub opened this issue Jan 29, 2025 · 0 comments · Fixed by #184

Comments

@simeonschaub
Copy link
Contributor

I'm getting the following error when trying to precompile GeoIO on a cluster with many users:

ERROR: LoadError: SystemError: getgrgid: Numerical result out of range
Stacktrace:
  [1] systemerror(p::Symbol, errno::Int32; extrainfo::Nothing)
    @ Base ./error.jl:176
  [2] systemerror
    @ ./error.jl:175 [inlined]
  [3] FilePathsBase.Group(gid::UInt64)
    @ FilePathsBase ~/.julia/packages/FilePathsBase/Laclt/src/libc.jl:125
  [4] Status
    @ ~/.julia/packages/FilePathsBase/Laclt/src/status.jl:21 [inlined]
  [5] stat(fp::FilePathsBase.PosixPath)
    @ FilePathsBase ~/.julia/packages/FilePathsBase/Laclt/src/system.jl:54
  [6] mode
    @ ~/.julia/packages/FilePathsBase/Laclt/src/system.jl:68 [inlined]
  [7] isdir
    @ ~/.julia/packages/FilePathsBase/Laclt/src/system.jl:96 [inlined]
  [8] Parquet2.FileManager(p::FilePathsBase.PosixPath, opts::Parquet2.ReadOptions)
    @ Parquet2 ~/.julia/packages/Parquet2/R3pbE/src/files.jl:127
  [9] Parquet2.Dataset(p::FilePathsBase.PosixPath; kw::@Kwargs{})
    @ Parquet2 ~/.julia/packages/Parquet2/R3pbE/src/dataset.jl:112
 [10] Parquet2.Dataset(p::FilePathsBase.PosixPath)
    @ Parquet2 ~/.julia/packages/Parquet2/R3pbE/src/dataset.jl:110
 [11] Parquet2.Dataset(p::String; kw::@Kwargs{})
    @ Parquet2 ~/.julia/packages/Parquet2/R3pbE/src/dataset.jl:116
 [12] Dataset
    @ ~/.julia/packages/Parquet2/R3pbE/src/dataset.jl:116 [inlined]
 [13] read(::GeoParquet.Parquet2Driver, fn::String; kwargs::@Kwargs{})
    @ GeoParquet ~/.julia/packages/GeoParquet/lUyaD/src/io.jl:50
 [14] read
    @ ~/.julia/packages/GeoParquet/lUyaD/src/io.jl:49 [inlined]
 [15] read(fn::String; driver::Nothing, kwargs::@Kwargs{})
    @ GeoParquet ~/.julia/packages/GeoParquet/lUyaD/src/io.jl:69
 [16] read
    @ ~/.julia/packages/GeoParquet/lUyaD/src/io.jl:66 [inlined]
 [17] load(fname::String; repair::Bool, layer::Int64, lenunit::Nothing, numbertype::Type, kwargs::@Kwargs{})
    @ GeoIO ~/.julia/packages/GeoIO/29FWh/src/load.jl:156
 [18] load(fname::String)
    @ GeoIO ~/.julia/packages/GeoIO/29FWh/src/load.jl:81
 [19] macro expansion
    @ ~/.julia/packages/GeoIO/29FWh/src/precompile.jl:12 [inlined]
 [20] macro expansion
    @ ~/.julia/packages/PrecompileTools/L8A3n/src/workloads.jl:78 [inlined]
 [21] macro expansion
    @ ~/.julia/packages/GeoIO/29FWh/src/precompile.jl:5 [inlined]
 [22] macro expansion
    @ ~/.julia/packages/PrecompileTools/L8A3n/src/workloads.jl:140 [inlined]
 [23] top-level scope
    @ ~/.julia/packages/GeoIO/29FWh/src/precompile.jl:139
 [24] include(mod::Module, _path::String)
    @ Base ./Base.jl:557
 [25] include(x::String)
    @ GeoIO ~/.julia/packages/GeoIO/29FWh/src/GeoIO.jl:5
 [26] top-level scope
    @ ~/.julia/packages/GeoIO/29FWh/src/GeoIO.jl:139
 [27] include
    @ ./Base.jl:557 [inlined]
 [28] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
    @ Base ./loading.jl:2881
 [29] top-level scope
    @ stdin:6
in expression starting at /home/kit/stud/uwgir/.julia/packages/GeoIO/29FWh/src/precompile.jl:3
in expression starting at /home/kit/stud/uwgir/.julia/packages/GeoIO/29FWh/src/GeoIO.jl:5
in expression starting at stdin:

This seems to be a general issue with getgrgid (see also dun/munge#16), but getgrgid should probably not be called at all for a simple isdir query.

The culprit here is that constructing a Status struct tries to create a Group which in turn calls getgrgid. Any reason for

Base.isdir(fp::SystemPath) = isdir(mode(fp))
not to just call isdir(string(fp)) which would avoid the issue?

simeonschaub added a commit to simeonschaub/FilePathsBase.jl that referenced this issue Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant