From f242db7697124c32d3dc646961e4aac666239854 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Fri, 24 Mar 2023 23:06:32 +0100 Subject: [PATCH] MC: disable personality() as it fails on CI and is not mandatory --- examples/cpp/mc-bugged2/s4u-mc-bugged2.tesh | 2 +- src/mc/explo/CommunicationDeterminismChecker.cpp | 2 +- src/mc/explo/DFSExplorer.cpp | 3 ++- src/mc/explo/DFSExplorer.hpp | 2 +- src/mc/remote/CheckerSide.cpp | 7 ------- 5 files changed, 5 insertions(+), 11 deletions(-) diff --git a/examples/cpp/mc-bugged2/s4u-mc-bugged2.tesh b/examples/cpp/mc-bugged2/s4u-mc-bugged2.tesh index a104fb8463..9b7b7d1be6 100644 --- a/examples/cpp/mc-bugged2/s4u-mc-bugged2.tesh +++ b/examples/cpp/mc-bugged2/s4u-mc-bugged2.tesh @@ -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) diff --git a/src/mc/explo/CommunicationDeterminismChecker.cpp b/src/mc/explo/CommunicationDeterminismChecker.cpp index cc76198e53..a1a51ce080 100644 --- a/src/mc/explo/CommunicationDeterminismChecker.cpp +++ b/src/mc/explo/CommunicationDeterminismChecker.cpp @@ -327,7 +327,7 @@ Exploration* create_communication_determinism_checker(const std::vector& 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&) { diff --git a/src/mc/explo/DFSExplorer.cpp b/src/mc/explo/DFSExplorer.cpp index 5632d1fff3..2446342f04 100644 --- a/src/mc/explo/DFSExplorer.cpp +++ b/src/mc/explo/DFSExplorer.cpp @@ -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& args, bool with_dpor) : Exploration(args, _sg_mc_termination) +DFSExplorer::DFSExplorer(const std::vector& args, bool with_dpor, bool need_memory_info) + : Exploration(args, need_memory_info || _sg_mc_termination) { if (with_dpor) reduction_mode_ = ReductionMode::dpor; diff --git a/src/mc/explo/DFSExplorer.hpp b/src/mc/explo/DFSExplorer.hpp index 8d63ca4e23..353e00c43e 100644 --- a/src/mc/explo/DFSExplorer.hpp +++ b/src/mc/explo/DFSExplorer.hpp @@ -36,7 +36,7 @@ class XBT_PRIVATE DFSExplorer : public Exploration { static xbt::signal on_log_state_signal; public: - explicit DFSExplorer(const std::vector& args, bool with_dpor); + explicit DFSExplorer(const std::vector& args, bool with_dpor, bool need_memory_info = false); void run() override; RecordTrace get_record_trace() override; std::vector get_textual_trace() override; diff --git a/src/mc/remote/CheckerSide.cpp b/src/mc/remote/CheckerSide.cpp index dcf347a25a..c1f10143ec 100644 --- a/src/mc/remote/CheckerSide.cpp +++ b/src/mc/remote/CheckerSide.cpp @@ -10,7 +10,6 @@ #include "xbt/system_error.hpp" #ifdef __linux__ -#include #include #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 -- 2.20.1