From: Martin Quinson Date: Fri, 27 Oct 2023 15:11:39 +0000 (+0200) Subject: Hack to make liveness work on Debian testing X-Git-Tag: v3.35~89^2~43 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/5a48253f252bfe990a421012da93a714145de365 Hack to make liveness work on Debian testing A proper solution would be to make the liveness more robust, and in particular the state equality mechanism. To that extend, we should - change the code so that it computes a distance between states instead of returning a simple boolean "it's different". That way, we could know which states desserve a deeper debugging to understand why equality detection is broken, simply by picking the closest pair of states, that ought to be equal. - Write a bunch of unit tests where we do 2 controled states and compare their detected difference. Maybe, we should trash all this code that is aging (no Dwarf5 support) and is very complex anyway. A simpler way to get the same effects could be to go through the compiler, and have clang generate a binary that is fully introspectable. It sounds like a long and burdensome way to go, however. Hopefuly someone will do a library doing it in the future, so that we just need to use their work. --- diff --git a/src/kernel/activity/MailboxImpl.hpp b/src/kernel/activity/MailboxImpl.hpp index d37e756f1f..9d30a4e13e 100644 --- a/src/kernel/activity/MailboxImpl.hpp +++ b/src/kernel/activity/MailboxImpl.hpp @@ -6,6 +6,7 @@ #ifndef SIMGRID_KERNEL_ACTIVITY_MAILBOX_HPP #define SIMGRID_KERNEL_ACTIVITY_MAILBOX_HPP +#include "simgrid/config.h" /* FIXME: KILLME. This makes the ABI config-dependent, but mandatory for the hack below */ #include "simgrid/s4u/Engine.hpp" #include "simgrid/s4u/Mailbox.hpp" #include "src/kernel/activity/CommImpl.hpp" @@ -19,9 +20,18 @@ class MailboxImpl { s4u::Mailbox piface_; std::string name_; actor::ActorImplPtr permanent_receiver_; // actor to which the mailbox is attached +#if SIMGRID_HAVE_STATEFUL_MC + /* Using deque here is faster in benchmarks, but break the state equality heuristic of Liveness checking on Debian + * testing. This would desserve a proper investiguation, but simply use a single-sided list for the time being. HACK. + */ + std::list comm_queue_; + // messages already received in the permanent receive mode + std::list done_comm_queue_; +#else std::deque comm_queue_; // messages already received in the permanent receive mode std::deque done_comm_queue_; +#endif friend s4u::Engine; friend s4u::Mailbox;