Open tkf opened 4 years ago
I think this is actually caused by the PID being the same between the fetching and error-ing worker, since if you manually use PID 1 it still does not throw even after addprocs:
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.8.2 (2022-09-29)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> using Distributed
julia> fetch(remotecall(error, 1, "hello"))
RemoteException(1, CapturedException(ErrorException("hello"), Any[(error(s::String) at error.jl:35, 1), (#invokelatest#2 at essentials.jl:729 [inlined], 1), (invokelatest at essentials.jl:726 [inlined], 1), (#153 at remotecall.jl:425 [inlined], 1), (run_work_thunk(thunk::Distributed.var"#153#154"{typeof(error), Tuple{String}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}, print_error::Bool) at process_messages.jl:70, 1), (run_work_thunk(rv::Distributed.RemoteValue, thunk::Function) at process_messages.jl:79, 1), ((::Distributed.var"#100#102"{Distributed.RemoteValue, Distributed.var"#153#154"{typeof(error), Tuple{String}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}})() at task.jl:484, 1)]))
julia> addprocs(1)
1-element Vector{Int64}:
2
julia> fetch(remotecall(error, 1, "hello"))
RemoteException(1, CapturedException(ErrorException("hello"), Any[(error(s::String) at error.jl:35, 1), (#invokelatest#2 at essentials.jl:729 [inlined], 1), (invokelatest at essentials.jl:726 [inlined], 1), (#153 at remotecall.jl:425 [inlined], 1), (run_work_thunk(thunk::Distributed.var"#153#154"{typeof(error), Tuple{String}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}, print_error::Bool) at process_messages.jl:70, 1), (run_work_thunk(rv::Distributed.RemoteValue, thunk::Function) at process_messages.jl:79, 1), ((::Distributed.var"#100#102"{Distributed.RemoteValue, Distributed.var"#153#154"{typeof(error), Tuple{String}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}})() at task.jl:484, 1)]))
Is https://github.com/JuliaLang/julia/issues/37935 just a duplicate of this then?
Yes it looks like it.
I expect
fetch(remotecall(error, default_worker_pool(), "hello"))
before and afteraddprocs(1)
behaves similarly.