JuliaLang / JuliaLang/Distributed.jl

fetch(remotecall(...)) does not throw when nprocs() == 1

Open
#63 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Julia
Stars
55
Forks
19
PR merge metrics
No merged PRs in 30d

Description

julia> using Distributed

julia> fetch(remotecall(error, default_worker_pool(), "hello"))
RemoteException(1, CapturedException(ErrorException("hello"), Any[(error(::String) at error.jl:33, 1), ((::Distributed.var"#137#138"{typeof(error),Tuple{String},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}})() at remotecall.jl:350, 1), (run_work_thunk(::Distributed.var"#137#138"{typeof(error),Tuple{String},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}}, ::Bool) at process_messages.jl:79, 1), (run_work_thunk at process_messages.jl:88 [inlined], 1), ((::Distributed.var"#96#98"{Distributed.RemoteValue,Distributed.var"#137#138"{typeof(error),Tuple{String},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}}})() at task.jl:333, 1)]))

julia> addprocs(1)
1-element Array{Int64,1}:
 2

julia> fetch(remotecall(error, default_worker_pool(), "hello"))
ERROR: On worker 2:
hello
error at ./error.jl:33
JuliaLang/julia#103 at /home/takafumi/repos/watch/julia/usr/share/julia/stdlib/v1.4/Distributed/src/process_messages.jl:290
run_work_thunk at /home/takafumi/repos/watch/julia/usr/share/julia/stdlib/v1.4/Distributed/src/process_messages.jl:79
run_work_thunk at /home/takafumi/repos/watch/julia/usr/share/julia/stdlib/v1.4/Distributed/src/process_messages.jl:88
JuliaLang/julia#96 at ./task.jl:333
Stacktrace:
 [1] #remotecall_fetch#143 at /home/takafumi/repos/watch/julia/usr/share/julia/stdlib/v1.4/Distributed/src/remotecall.jl:390 [inlined]
 [2] remotecall_fetch(::Function, ::Distributed.Worker, ::Distributed.RRID) at /home/takafumi/repos/watch/julia/usr/share/julia/stdlib/v1.4/Distributed/src/remotecall.jl:382
 [3] #remotecall_fetch#146 at /home/takafumi/repos/watch/julia/usr/share/julia/stdlib/v1.4/Distributed/src/remotecall.jl:417 [inlined]
 [4] remotecall_fetch at /home/takafumi/repos/watch/julia/usr/share/julia/stdlib/v1.4/Distributed/src/remotecall.jl:417 [inlined]
 [5] call_on_owner at /home/takafumi/repos/watch/julia/usr/share/julia/stdlib/v1.4/Distributed/src/remotecall.jl:490 [inlined]
 [6] fetch(::Future) at /home/takafumi/repos/watch/julia/usr/share/julia/stdlib/v1.4/Distributed/src/remotecall.jl:529
 [7] top-level scope at REPL[4]:1

julia> VERSION
v"1.4.0-DEV.297"

I expect fetch(remotecall(error, default_worker_pool(), "hello")) before and after addprocs(1) behaves similarly.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the two fetch(remotecall(...)) cases from the issue, first with nprocs() == 1 and then after addprocs(1). Start by reading Distributed/src/remotecall.jl around remotecall_fetch and fetch, then follow the process_messages.jl error path. Done means the single-process and worker cases handle the remote error consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
distributed-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.