Skip to content

Commit

Permalink
fix #40337, no error info from serialized TaskFailedException (#40395)
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson authored Apr 8, 2021
1 parent d94e168 commit e9a2bb4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 25 deletions.
24 changes: 0 additions & 24 deletions src/clusterserialize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -102,19 +102,6 @@ function serialize(s::ClusterSerializer, t::Core.TypeName)
nothing
end

function serialize(s::ClusterSerializer, t::Task)
serialize_cycle(s, t) && return
if istaskstarted(t) && !istaskdone(t)
error("cannot serialize a running Task")
end
writetag(s.io, TASK_TAG)
serialize(s, t.code)
serialize(s, t.storage)
serialize(s, t._state)
serialize(s, t.result)
serialize(s, t._isexception)
end

function serialize(s::ClusterSerializer, g::GlobalRef)
# Record if required and then invoke the default GlobalRef serializer.
sym = g.name
Expand Down Expand Up @@ -244,17 +231,6 @@ function deserialize(s::ClusterSerializer, t::Type{<:CapturedException})
return CapturedException(capex, bt)
end

function deserialize(s::ClusterSerializer, ::Type{Task})
t = Task(nothing)
deserialize_cycle(s, t)
t.code = deserialize(s)
t.storage = deserialize(s)
t._state = deserialize(s)::UInt8
t.result = deserialize(s)
t._isexception = deserialize(s)
t
end

"""
clear!(syms, pids=workers(); mod=Main)
Expand Down
2 changes: 1 addition & 1 deletion test/distributed_exec.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1675,7 +1675,7 @@ let e = @test_throws RemoteException pmap(1) do _
es = sprint(showerror, e.value)
@test contains(es, ":\nTaskFailedException\nStacktrace:\n")
@test contains(es, "\n\n nested task error:")
@test_broken contains(es, "\n\n nested task error: 42\n")
@test contains(es, "\n\n nested task error: 42\n")
end

# issue #27429, propagate relative `include` path to workers
Expand Down

0 comments on commit e9a2bb4

Please sign in to comment.