Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
MC: disable personality() as it fails on CI and is not mandatory
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Fri, 24 Mar 2023 22:06:32 +0000 (23:06 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Fri, 24 Mar 2023 22:06:32 +0000 (23:06 +0100)
examples/cpp/mc-bugged2/s4u-mc-bugged2.tesh
src/mc/explo/CommunicationDeterminismChecker.cpp
src/mc/explo/DFSExplorer.cpp
src/mc/explo/DFSExplorer.hpp
src/mc/remote/CheckerSide.cpp

index a104fb8..9b7b7d1 100644 (file)
@@ -16,4 +16,4 @@ $ ${bindir:=.}/../../../bin/simgrid-mc --cfg=model-check/sleep-set:true ${bindir
 > [0.000000] [mc_explo/INFO]   3: iSend(mbox=0)
 > [0.000000] [mc_explo/INFO]   1: WaitComm(from 3 to 1, mbox=0, no timeout)
 > [0.000000] [mc_explo/INFO] You can debug the problem (and see the whole details) by rerunning out of simgrid-mc with --cfg=model-check/replay:'1;3;1;1;3;3;1'
-> [0.000000] [mc_dfs/INFO] DFS exploration ended. 2091 unique states visited; 529 backtracks (8359 transition replays, 5739 states visited overall)
+> [0.000000] [mc_dfs/INFO] DFS exploration ended. 1958 unique states visited; 447 backtracks (7150 transition replays, 4745 states visited overall)
index cc76198..a1a51ce 100644 (file)
@@ -327,7 +327,7 @@ Exploration* create_communication_determinism_checker(const std::vector<char*>&
 
   XBT_DEBUG("********* Start communication determinism verification *********");
 
-  auto base      = new DFSExplorer(args, with_dpor);
+  auto base      = new DFSExplorer(args, with_dpor, true);
   auto extension = new CommDetExtension(*base);
 
   DFSExplorer::on_exploration_start([extension](RemoteApp const&) {
index 5632d1f..2446342 100644 (file)
@@ -297,7 +297,8 @@ void DFSExplorer::backtrack()
   } // If no backtracing point, then the stack is empty and the exploration is over
 }
 
-DFSExplorer::DFSExplorer(const std::vector<char*>& args, bool with_dpor) : Exploration(args, _sg_mc_termination)
+DFSExplorer::DFSExplorer(const std::vector<char*>& args, bool with_dpor, bool need_memory_info)
+    : Exploration(args, need_memory_info || _sg_mc_termination)
 {
   if (with_dpor)
     reduction_mode_ = ReductionMode::dpor;
index 8d63ca4..353e00c 100644 (file)
@@ -36,7 +36,7 @@ class XBT_PRIVATE DFSExplorer : public Exploration {
   static xbt::signal<void(RemoteApp&)> on_log_state_signal;
 
 public:
-  explicit DFSExplorer(const std::vector<char*>& args, bool with_dpor);
+  explicit DFSExplorer(const std::vector<char*>& args, bool with_dpor, bool need_memory_info = false);
   void run() override;
   RecordTrace get_record_trace() override;
   std::vector<std::string> get_textual_trace() override;
index dcf347a..c1f1014 100644 (file)
@@ -10,7 +10,6 @@
 #include "xbt/system_error.hpp"
 
 #ifdef __linux__
-#include <sys/personality.h>
 #include <sys/prctl.h>
 #endif
 
@@ -49,12 +48,6 @@ XBT_ATTRIB_NORETURN static void run_child_process(int socket, const std::vector<
   sigemptyset(&mask);
   xbt_assert(sigprocmask(SIG_SETMASK, &mask, nullptr) >= 0, "Could not unblock signals");
   xbt_assert(prctl(PR_SET_PDEATHSIG, SIGHUP) == 0, "Could not PR_SET_PDEATHSIG");
-
-  // Make sure that the application process layout is not randomized, so that the info we gather is stable over re-execs
-  if (personality(ADDR_NO_RANDOMIZE) == -1) {
-    XBT_ERROR("Could not set the NO_RANDOMIZE personality");
-    throw xbt::errno_error();
-  }
 #endif
 
   // Remove CLOEXEC to pass the socket to the application