feat(launcher): parse oom signal (#404)

This commit is contained in:
OlivierDehaene 2023-06-02 14:17:27 +02:00 committed by GitHub
parent 62fc401030
commit 83b84486ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -410,9 +410,14 @@ fn shard_manager(
let mut wait_time = Instant::now(); let mut wait_time = Instant::now();
loop { loop {
// Process exited // Process exited
if p.poll().is_some() { if let Some(exit_status) = p.poll() {
let mut err = String::new(); let mut err = String::new();
p.stderr.take().unwrap().read_to_string(&mut err).unwrap(); p.stderr.take().unwrap().read_to_string(&mut err).unwrap();
if let ExitStatus::Signaled(signal) = exit_status {
tracing::error!("Shard process was signaled to shutdown with signal {signal}");
}
status_sender status_sender
.send(ShardStatus::Failed((rank, err))) .send(ShardStatus::Failed((rank, err)))
.unwrap(); .unwrap();