Skip to content

Commit 86fba83

Browse files
dulinrileymeta-codesync[bot]
authored andcommitted
Enhance logging message when supervision events are not handled (#1685)
Summary: Pull Request resolved: #1685 In cases where a supervision event happens very early in a proc lifecycle, before the ProcMeshAgent sets the coordinator port, we end up dropping the event details. Add these to logs so they are seen. Before we would see: ``` proc tcp:hostname:port,service: could not propagate supervision event: coordinator port is not set for proc tcp:hostname:port,service: crashing ``` Now we will also see the original supervision event which caused that crash. Reviewed By: amirafzali Differential Revision: D85676924 fbshipit-source-id: 9c3f694be1b9dc25a51728ac313e4504482121e6
1 parent d9b1030 commit 86fba83

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

hyperactor/src/proc.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -394,16 +394,17 @@ impl Proc {
394394

395395
fn handle_supervision_event(&self, event: ActorSupervisionEvent) {
396396
let result = match self.state().supervision_coordinator_port.get() {
397-
Some(port) => port.send(event).map_err(anyhow::Error::from),
397+
Some(port) => port.send(event.clone()).map_err(anyhow::Error::from),
398398
None => Err(anyhow::anyhow!(
399399
"coordinator port is not set for proc {}",
400-
self.proc_id()
400+
self.proc_id(),
401401
)),
402402
};
403403
if let Err(err) = result {
404404
tracing::error!(
405-
"proc {}: could not propagate supervision event: {:?}: crashing",
405+
"proc {}: could not propagate supervision event {} due to error: {:?}: crashing",
406406
self.proc_id(),
407+
event,
407408
err
408409
);
409410

0 commit comments

Comments
 (0)