Skip to content

Commit 43f6398

Browse files
authored
Merge pull request #25569 from JuliaLang/cjf/logging-backtraces
Attach backtraces explicitly in error logging
2 parents a70e6c3 + 07e51f9 commit 43f6398

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/cluster.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,7 @@ function terminate_all_workers()
10741074
try
10751075
rmprocs(workers(); waitfor=5.0)
10761076
catch _ex2
1077-
@error "Unable to terminate all workers" exception=_ex2
1077+
@error "Unable to terminate all workers" exception=_ex2,catch_backtrace()
10781078
end
10791079
end
10801080
end

src/process_messages.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function deliver_result(sock::IO, msg, oid, value)
8989
catch e
9090
# terminate connection in case of serialization error
9191
# otherwise the reading end would hang
92-
@error "Fatal error on process $(myid())" exception=e
92+
@error "Fatal error on process $(myid())" exception=e,catch_backtrace()
9393
wid = worker_id_from_socket(sock)
9494
close(sock)
9595
if myid()==1
@@ -210,7 +210,7 @@ function message_handler_loop(r_stream::IO, w_stream::IO, incoming::Bool)
210210
# If unhandleable error occurred talking to pid 1, exit
211211
if wpid == 1
212212
if isopen(w_stream)
213-
@error "Fatal error on process $(myid())" exception=e
213+
@error "Fatal error on process $(myid())" exception=e,catch_backtrace()
214214
end
215215
exit(1)
216216
end
@@ -341,7 +341,7 @@ function connect_to_peer(manager::ClusterManager, rpid::Int, wconfig::WorkerConf
341341
send_connection_hdr(w, true)
342342
send_msg_now(w, MsgHeader(), IdentifySocketMsg(myid()))
343343
catch e
344-
@error "Error on $(myid()) while connecting to peer $rpid, exiting" exception=e
344+
@error "Error on $(myid()) while connecting to peer $rpid, exiting" exception=e,catch_backtrace()
345345
exit(1)
346346
end
347347
end

0 commit comments

Comments
 (0)