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.
#ifndef SIMGRID_KERNEL_ACTIVITY_MAILBOX_HPP
#define SIMGRID_KERNEL_ACTIVITY_MAILBOX_HPP
#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"
#include "simgrid/s4u/Engine.hpp"
#include "simgrid/s4u/Mailbox.hpp"
#include "src/kernel/activity/CommImpl.hpp"
s4u::Mailbox piface_;
std::string name_;
actor::ActorImplPtr permanent_receiver_; // actor to which the mailbox is attached
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<CommImplPtr> comm_queue_;
+ // messages already received in the permanent receive mode
+ std::list<CommImplPtr> done_comm_queue_;
+#else
std::deque<CommImplPtr> comm_queue_;
// messages already received in the permanent receive mode
std::deque<CommImplPtr> done_comm_queue_;
std::deque<CommImplPtr> comm_queue_;
// messages already received in the permanent receive mode
std::deque<CommImplPtr> done_comm_queue_;
friend s4u::Engine;
friend s4u::Mailbox;
friend s4u::Engine;
friend s4u::Mailbox;