JuliaCI / PkgEval.jl

Keeping tabs on the julia ecosystem
Other
28 stars 18 forks source link

Better TOCTOU protection for procfs helpers. #180

Closed maleadt closed 1 year ago

maleadt commented 1 year ago

Fixes:

Nov 30 21:27:46 amdci8 bash[97812]:       From worker 2:        Error in Timer:
Nov 30 21:27:47 amdci8 bash[97812]:       From worker 2:        IOError: getpid: no such process (ESRCH)
Nov 30 21:27:47 amdci8 bash[97812]:       From worker 2:        Stacktrace:
Nov 30 21:27:47 amdci8 bash[97812]:       From worker 2:         [1] getpid
Nov 30 21:27:47 amdci8 bash[97812]:       From worker 2:           @ ./process.jl:620 [inlined]
Nov 30 21:27:47 amdci8 bash[97812]:       From worker 2:         [2] (::PkgEval.var"#recursive_kill#58")(proc::Base.Process, sig::Int64)
Nov 30 21:27:47 amdci8 bash[97812]:       From worker 2:           @ PkgEval /storage/pkgeval/dev/PkgEval/src/evaluate.jl:152
Nov 30 21:27:47 amdci8 bash[97812]:       From worker 2:         [3] #53
Nov 30 21:27:47 amdci8 bash[97812]:       From worker 2:           @ /storage/pkgeval/dev/PkgEval/src/evaluate.jl:164 [inlined]
Nov 30 21:27:47 amdci8 bash[97812]:       From worker 2:         [4] macro expansion
Nov 30 21:27:47 amdci8 bash[97812]:       From worker 2:           @ ./asyncevent.jl:281 [inlined]
Nov 30 21:27:47 amdci8 bash[97812]:       From worker 2:         [5] (::Base.var"#666#667"{PkgEval.var"#53#60"{PkgEval.var"#recursive_kill#58", Base.Process}, Timer})()
Nov 30 21:34:29 amdci8 bash[97812]:       From worker 2:           @ Base ./task.jl:134Running tests: 9210 remaining (ETA: 5:07:56)
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:        Error in Timer:
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:        SystemError: opening file "/proc/111656/task/111656/children": No such file or directory
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:        Stacktrace:
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:          [1] systemerror(p::String, errno::Int32; extrainfo::Nothing)
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:            @ Base ./error.jl:176
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:          [2] #systemerror#80
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:            @ ./error.jl:175 [inlined]
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:          [3] systemerror
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:            @ ./error.jl:175 [inlined]
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:          [4] open(fname::String; lock::Bool, read::Nothing, write::Nothing, create::Nothing, truncate::Nothing, append::Nothing)
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:            @ Base ./iostream.jl:293
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:          [5] open
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:            @ ./iostream.jl:275 [inlined]
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:          [6] open(f::Base.var"#387#388"{String}, args::String; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:            @ Base ./io.jl:382
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:          [7] open
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:            @ ./io.jl:381 [inlined]
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:          [8] read
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:            @ ./io.jl:462 [inlined]
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:          [9] process_children(pid::Int64)
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:            @ PkgEval /storage/pkgeval/dev/PkgEval/src/evaluate.jl:85
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:         [10] cpu_time(pid::Int64)
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:            @ PkgEval /storage/pkgeval/dev/PkgEval/src/evaluate.jl:107
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:         [11] (::Base.MappingRF{typeof(PkgEval.cpu_time), Base.BottomRF{typeof(Base.add_sum)}})(acc::Float64, x::Int64)
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:            @ Base ./reduce.jl:95
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:         [12] _foldl_impl(op::Base.MappingRF{typeof(PkgEval.cpu_time), Base.BottomRF{typeof(Base.add_sum)}}, init::Float64, itr::Vector{Int64})
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:            @ Base ./reduce.jl:58
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:         [13] foldl_impl(op::Base.MappingRF{typeof(PkgEval.cpu_time), Base.BottomRF{typeof(Base.add_sum)}}, nt::Float64, itr::Vector{Int64})
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:            @ Base ./reduce.jl:48
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:         [14] mapfoldl_impl(f::typeof(PkgEval.cpu_time), op::typeof(Base.add_sum), nt::Float64, itr::Vector{Int64})
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:            @ Base ./reduce.jl:44
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:         [15] _mapreduce_dim(f::Function, op::Function, nt::Float64, A::Vector{Int64}, #unused#::Colon)
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:            @ Base ./reducedim.jl:362
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:         [16] #mapreduce#765
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:            @ ./reducedim.jl:357 [inlined]
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:         [17] #_sum#775
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:            @ ./reducedim.jl:999 [inlined]
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:         [18] #sum#773
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:            @ ./reducedim.jl:995 [inlined]
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:         [19] cpu_time(pid::Int64)
Nov 30 19:39:58 amdci8 bash[97812]:       From worker 2:            @ PkgEval /storage/pkgeval/dev/PkgEval/src/evaluate.jl:107