> [ 0.000000] (0:maestro@) 3: iSend(mbox=0)
> [ 0.000000] (0:maestro@) 1: WaitComm(from 3 to 1, mbox=0, no timeout)
> [ 0.000000] (0:maestro@) Path = 1;2;1;1;2;4;1;1;3;1
-> [ 0.000000] (0:maestro@) Expanded states = 22
-> [ 0.000000] (0:maestro@) Visited states = 56
-> [ 0.000000] (0:maestro@) Executed transitions = 22
+> [ 0.000000] (0:maestro@) 22 unique states visited; 4 backtracks (56 transition replays, 30 states visited overall)
\ No newline at end of file
> [ 0.000000] (0:maestro@) 3: iSend(mbox=0)
> [ 0.000000] (0:maestro@) 1: WaitComm(from 3 to 1, mbox=0, no timeout)
> [ 0.000000] (0:maestro@) Path = 1;3;1;3;1;3;1
-> [ 0.000000] (0:maestro@) Expanded states = 1006
-> [ 0.000000] (0:maestro@) Visited states = 5319
-> [ 0.000000] (0:maestro@) Executed transitions = 1006
\ No newline at end of file
+> [ 0.000000] (0:maestro@) 1006 unique states visited; 350 backtracks (5319 transition replays, 3963 states visited overall)
> [HostB:client:(2) 0.000000] [electric_fence/INFO] Sent!
> [HostC:client:(3) 0.000000] [electric_fence/INFO] Sent!
> [0.000000] [mc_safety/INFO] No property violation found.
-> [0.000000] [mc_safety/INFO] Expanded states = 15
-> [0.000000] [mc_safety/INFO] Visited states = 32
-> [0.000000] [mc_safety/INFO] Executed transitions = 14
+> [0.000000] [mc_safety/INFO] 15 unique states visited; 5 backtracks (32 transition replays, 13 states visited overall)
> [ 0.000000] (0:maestro@) 2: iSend(mbox=0)
> [ 0.000000] (0:maestro@) 1: WaitComm(from 2 to 1, mbox=0, no timeout)
> [ 0.000000] (0:maestro@) Path = 1;3;1;1;2;1
-> [ 0.000000] (0:maestro@) Expanded states = 18
-> [ 0.000000] (0:maestro@) Visited states = 36
-> [ 0.000000] (0:maestro@) Executed transitions = 18
+> [ 0.000000] (0:maestro@) 18 unique states visited; 4 backtracks (36 transition replays, 14 states visited overall)
> rank 1 recv the data
> Sent 0 to rank 1
> [0.000000] [mc_safety/INFO] No property violation found.
-> [0.000000] [mc_safety/INFO] Expanded states = 7
-> [0.000000] [mc_safety/INFO] Visited states = 10
-> [0.000000] [mc_safety/INFO] Executed transitions = 8
+> [0.000000] [mc_safety/INFO] 7 unique states visited; 2 backtracks (10 transition replays, 2 states visited overall)
p Testing the paranoid model
! timeout 60
> [0.000000] [mc_global/INFO] *** DEADLOCK DETECTED ***
> [0.000000] [mc_global/INFO] **************************
> [0.000000] [mc_global/INFO] Counter-example execution trace:
-> [0.000000] [mc_global/INFO] [(1)node-0.simgrid.org (0)] iSend(src=(1)node-0.simgrid.org (0), buff=(verbose only), size=(verbose only))
-> [0.000000] [mc_global/INFO] [(2)node-1.simgrid.org (1)] iSend(src=(2)node-1.simgrid.org (1), buff=(verbose only), size=(verbose only))
-> [0.000000] [mc_record/INFO] Path = 1;2
-> [0.000000] [mc_safety/INFO] Expanded states = 3
-> [0.000000] [mc_safety/INFO] Visited states = 3
-> [0.000000] [mc_safety/INFO] Executed transitions = 2
+> [0.000000] [mc_global/INFO] 1: iSend(mbox=2)
+> [0.000000] [mc_global/INFO] 2: iSend(mbox=0)
+> [0.000000] [Api/INFO] Path = 1;2
+> [0.000000] [mc_safety/INFO] 3 unique states visited; 1 backtracks (3 transition replays, 0 states visited overall)
> Execution failed with code 3.
void SafetyChecker::log_state() // override
{
- XBT_INFO("Expanded states = %ld", State::get_expanded_states());
- XBT_INFO("Visited states = %lu", api::get().mc_get_visited_states());
- XBT_INFO("Executed transitions = %lu", Transition::get_executed_transitions());
+ XBT_INFO("%ld unique states visited; %ld backtracks (%ld transition replays, %ld states visited overall)",
+ State::get_expanded_states(), backtrack_count_, api::get().mc_get_visited_states(),
+ Transition::get_replayed_transitions());
}
void SafetyChecker::run()
void SafetyChecker::backtrack()
{
+ backtrack_count_++;
stack_.pop_back();
api::get().mc_check_deadlock();
class XBT_PRIVATE SafetyChecker : public Checker {
ReductionMode reductionMode_ = ReductionMode::unset;
+ long backtrack_count_ = 0;
public:
explicit SafetyChecker(Session* session);
> [ 0.000000] (0:maestro@) Random([0;5] ~> 3)
> [ 0.000000] (0:maestro@) Random([0;5] ~> 4)
> [ 0.000000] (0:maestro@) Path = 1/3;1/4
-> [ 0.000000] (0:maestro@) Expanded states = 27
-> [ 0.000000] (0:maestro@) Visited states = 68
-> [ 0.000000] (0:maestro@) Executed transitions = 27
+> [ 0.000000] (0:maestro@) 27 unique states visited; 22 backtracks (68 transition replays, 19 states visited overall)
! expect return 6
# because SIMGRID_MC_EXIT_PROGRAM_CRASH = 6
> [ 0.000000] (0:maestro@) Random([0;5] ~> 3)
> [ 0.000000] (0:maestro@) Random([0;5] ~> 4)
> [ 0.000000] (0:maestro@) Path = 1/3;1/4
-> [ 0.000000] (0:maestro@) Expanded states = 27
-> [ 0.000000] (0:maestro@) Visited states = 68
-> [ 0.000000] (0:maestro@) Executed transitions = 27
+> [ 0.000000] (0:maestro@) 27 unique states visited; 22 backtracks (68 transition replays, 19 states visited overall)
> [ 0.000000] (0:maestro@) Stack trace not displayed because you passed --log=no_loc
$ ${bindir:=.}/../../../bin/simgrid-mc ${bindir:=.}/random-bug printf ${platfdir}/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n" --log=xbt_cfg.thresh:warning
> [ 0.000000] (0:maestro@) Behavior: printf
> [ 0.000000] (1:app@Fafard) Error reached
> [ 0.000000] (0:maestro@) No property violation found.
-> [ 0.000000] (0:maestro@) Expanded states = 43
-> [ 0.000000] (0:maestro@) Visited states = 108
-> [ 0.000000] (0:maestro@) Executed transitions = 42
+> [ 0.000000] (0:maestro@) 43 unique states visited; 36 backtracks (108 transition replays, 30 states visited overall)
! expect return 6
# because SIMGRID_MC_EXIT_PROGRAM_CRASH = 6
> [ 0.000000] (0:maestro@) Random([0;5] ~> 3)
> [ 0.000000] (0:maestro@) Random([0;5] ~> 4)
> [ 0.000000] (0:maestro@) Path = 1/3;1/4
-> [ 0.000000] (0:maestro@) Expanded states = 27
-> [ 0.000000] (0:maestro@) Visited states = 68
-> [ 0.000000] (0:maestro@) Executed transitions = 27
+> [ 0.000000] (0:maestro@) 27 unique states visited; 22 backtracks (68 transition replays, 19 states visited overall)
> [ 0.000000] (0:maestro@) Stack trace not displayed because you passed --log=no_loc
> This can be done automatically by setting --cfg=smpi/auto-shared-malloc-thresh to the minimum size wanted size (this can alter execution if data content is necessary)
>
> [0.000000] [mc_safety/INFO] No property violation found.
-> [0.000000] [mc_safety/INFO] Expanded states = 63
-> [0.000000] [mc_safety/INFO] Visited states = 500
-> [0.000000] [mc_safety/INFO] Executed transitions = 484
+> [0.000000] [mc_safety/INFO] 63 unique states visited; 16 backtracks (500 transition replays, 422 states visited overall)