From: Martin Quinson Date: Tue, 3 Apr 2018 14:19:47 +0000 (+0200) Subject: sensible error messages when ending the daemons result in a deadlock (fix #258) X-Git-Tag: v3.20~533 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/48b4bddb91d8a8a9dc21eb81ccdb01e7d05fa19c sensible error messages when ending the daemons result in a deadlock (fix #258) --- diff --git a/src/simix/smx_global.cpp b/src/simix/smx_global.cpp index cdad122f8a..447f55cdbe 100644 --- a/src/simix/smx_global.cpp +++ b/src/simix/smx_global.cpp @@ -543,10 +543,19 @@ void SIMIX_run() TRACE_end(); - XBT_CRITICAL("Oops ! Deadlock or code not perfectly clean."); - SIMIX_display_process_status(); - simgrid::s4u::onDeadlock(); - xbt_abort(); + if (simix_global->process_list.size() <= simix_global->daemons.size()) { + XBT_CRITICAL("Oops! Daemon actors cannot do any blocking activity (communications, synchronization, etc) " + "once the simulation is over. Please fix your on_exit() functions."); + SIMIX_display_process_status(); + simgrid::s4u::onDeadlock(); + xbt_abort(); + + } else { + XBT_CRITICAL("Oops! Deadlock or code not perfectly clean."); + SIMIX_display_process_status(); + simgrid::s4u::onDeadlock(); + xbt_abort(); + } } simgrid::s4u::onSimulationEnd(); }