mirror of
https://github.com/wassname/ray.git
synced 2026-07-07 18:21:33 +08:00
Fix core dumps in ExitActor (#8382)
This commit is contained in:
@@ -1917,7 +1917,10 @@ void CoreWorker::HandleCancelTask(const rpc::CancelTaskRequest &request,
|
||||
if (options_.log_dir != "") {
|
||||
RayLog::ShutDownRayLog();
|
||||
}
|
||||
exit(1);
|
||||
// NOTE(hchen): Use `_Exit()` to force-exit this process without doing cleanup.
|
||||
// `exit()` will destruct static objects in an incorrect order, which will lead to
|
||||
// core dumps.
|
||||
_Exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1953,7 +1956,10 @@ void CoreWorker::HandleKillActor(const rpc::KillActorRequest &request,
|
||||
if (options_.log_dir != "") {
|
||||
RayLog::ShutDownRayLog();
|
||||
}
|
||||
exit(1);
|
||||
// NOTE(hchen): Use `_Exit()` to force-exit this process without doing cleanup.
|
||||
// `exit()` will destruct static objects in an incorrect order, which will lead to
|
||||
// core dumps.
|
||||
_Exit(1);
|
||||
} else {
|
||||
Exit(/*intentional=*/true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user