diff --git a/libafl/src/events/centralized.rs b/libafl/src/events/centralized.rs index c628d3f99f..37635675f6 100644 --- a/libafl/src/events/centralized.rs +++ b/libafl/src/events/centralized.rs @@ -290,7 +290,7 @@ where ) -> Result<(), Error> { if !self.is_main { // secondary node - let is_nt = match &mut event { + let is_nt_or_heartbeat = match &mut event { Event::NewTestcase { input: _, client_config: _, @@ -304,9 +304,14 @@ where *forward_id = Some(ClientId(self.inner.mgr_id().0 as u32)); true } + Event::UpdateExecStats { + time: _, + executions: _, + phantom: _, + } => true, _ => false, }; - if is_nt { + if is_nt_or_heartbeat { return self.forward_to_main(&event); } } diff --git a/libafl/src/events/launcher.rs b/libafl/src/events/launcher.rs index 94a72aa068..1b7bcb70d4 100644 --- a/libafl/src/events/launcher.rs +++ b/libafl/src/events/launcher.rs @@ -533,10 +533,12 @@ where self.shmem_provider.post_fork(false)?; handles.push(child.pid); #[cfg(feature = "std")] - log::info!("centralized broker spawned"); + log::info!("PID: {:#?} centralized broker spawned", std::process::id()); } ForkResult::Child => { log::info!("{:?} PostFork", unsafe { libc::getpid() }); + #[cfg(feature = "std")] + log::info!("PID: {:#?} I am centralized broker", std::process::id()); self.shmem_provider.post_fork(true)?; let mut broker: CentralizedLlmpEventBroker = diff --git a/libafl_bolts/src/llmp.rs b/libafl_bolts/src/llmp.rs index c83bee229e..cfa56e32c1 100644 --- a/libafl_bolts/src/llmp.rs +++ b/libafl_bolts/src/llmp.rs @@ -2272,7 +2272,7 @@ where { self.clients_to_remove.push(i); #[cfg(feature = "llmp_debug")] - println!("Client #{i} timed out. Removing."); + log::info!("Client #{:#?} timed out. Removing.", client_id); } } new_messages = has_messages; @@ -2284,7 +2284,8 @@ where // After brokering, remove all clients we don't want to keep. for i in self.clients_to_remove.iter().rev() { - log::debug!("Client #{i} disconnected."); + let client_id = self.llmp_clients[*i].id; + log::info!("Client #{:#?} disconnected.", client_id); self.llmp_clients.remove(*i); } self.clients_to_remove.clear();