Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of https://framagit.org/simgrid/simgrid
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 12 Feb 2019 13:07:48 +0000 (14:07 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 12 Feb 2019 13:07:48 +0000 (14:07 +0100)
17 files changed:
ChangeLog
examples/deprecated/msg/CMakeLists.txt
examples/s4u/CMakeLists.txt
examples/s4u/platform-failures/s4u-platform-failures.tesh
examples/s4u/platform-failures/s4u-platform-failures_d.xml [moved from examples/s4u/platform-failures/s4u-masterworker-failures_d.xml with 100% similarity]
include/simgrid/simix.hpp
src/kernel/context/Context.cpp
src/simix/ActorImpl.cpp
src/simix/smx_host.cpp
src/simix/smx_io.cpp
src/simix/smx_network.cpp
src/simix/smx_synchro.cpp
src/surf/xml/simgrid.dtd
src/surf/xml/simgrid_dtd.c
tools/CMakeLists.txt
tools/jenkins/Sanitizers.sh
tools/sanitizers.supp [new file with mode: 0644]

index c8e96e3..e086474 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -709,7 +709,7 @@ SimGrid (3.14) Released December 24. 2016
  * VM I/O related things:
    - Ignored parameter of vm_create: core_nb, disk_path and disk_size.
    - Unimplemented save/restore methods
- * MSG_as_router_get_property_value() was redundent with
+ * MSG_as_router_get_property_value() was redundant with
    MSG_environment_as_get_property_value().
    - Removed MSG_as_router_*propert*() functions
    - Added MSG_environment_as_set_property_value() for consistency
@@ -803,7 +803,7 @@ SimGrid (3.13) stable; urgency=low
      flops that a <host>, <peer>, <cluster> or <cabinet> can deliver per second.
    - In <trace_connect>, attribute kind="POWER" is now kind="SPEED".
    - In <host> and <link>, attributes availability and state are gone.
-     It was redundent with state and availability traces, and with peak values.
+     It was redundant with state and availability traces, and with peak values.
    - In <cluster>, attributes availability_file and state_file are gone.
      It was too complex and unused.
    - Kill <gpu>. Was not doing anything.
index f16b786..b8b6bef 100644 (file)
@@ -73,8 +73,6 @@ foreach(x app-masterworker cloud-masterworker
                              ${CMAKE_HOME_DIRECTORY}/examples/deprecated/msg/${x}/${x}.tesh)
 endforeach()
 
-set_tesh_properties(msg-platform-failures "raw;boost" WILL_FAIL TRUE) # FIXME
-
 foreach (x trace-categories trace-route-user-variables trace-link-user-variables trace-masterworker trace-process-migration trace-host-user-variables)
   ADD_TESH(msg-${x} --setenv bindir=${CMAKE_BINARY_DIR}/examples/deprecated/msg/${x}
                    --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/deprecated/msg/${x} 
index 049bbde..6327f60 100644 (file)
@@ -31,8 +31,6 @@ foreach (example actor-create actor-daemon actor-exiting actor-join actor-kill
                                    ${CMAKE_HOME_DIRECTORY}/examples/s4u/${example}/s4u-${example}.tesh)
 endforeach()
 
-set_tesh_properties(s4u-platform-failures "raw;boost" WILL_FAIL TRUE) # FIXME
-
 # Multi-files examples
 ######################
 
@@ -137,7 +135,7 @@ set(xml_files     ${xml_files}    ${CMAKE_CURRENT_SOURCE_DIR}/actor-create/s4u-a
                                   ${CMAKE_CURRENT_SOURCE_DIR}/energy-boot/platform_boot.xml
                                   ${CMAKE_CURRENT_SOURCE_DIR}/io-file-remote/s4u-io-file-remote_d.xml
                                   ${CMAKE_CURRENT_SOURCE_DIR}/platform-properties/s4u-platform-properties_d.xml
-                                  ${CMAKE_CURRENT_SOURCE_DIR}/platform-failures/s4u-masterworker-failures_d.xml
+                                  ${CMAKE_CURRENT_SOURCE_DIR}/platform-failures/s4u-platform-failures_d.xml
                                   ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm-split_d.xml
                                   ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm_d.xml
                                   ${CMAKE_CURRENT_SOURCE_DIR}/replay-storage/s4u-replay-storage_d.xml
index d62264c..0b757a6 100644 (file)
@@ -3,7 +3,7 @@
 p Testing a simple master/worker example application handling failures TCP crosstraffic DISABLED
 
 ! output sort 19
-$ $SG_TEST_EXENV ${bindir:=.}/s4u-platform-failures$EXEEXT --log=xbt_cfg.thres:critical --log=no_loc ${platfdir}/small_platform_failures.xml ${srcdir:=.}/s4u-masterworker-failures_d.xml --cfg=path:${srcdir} --cfg=network/crosstraffic:0 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --log=surf_cpu.t:verbose
+$ $SG_TEST_EXENV ${bindir:=.}/s4u-platform-failures$EXEEXT --log=xbt_cfg.thres:critical --log=no_loc ${platfdir}/small_platform_failures.xml ${srcdir:=.}/s4u-platform-failures_d.xml --cfg=path:${srcdir} --cfg=network/crosstraffic:0 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --log=surf_cpu.t:verbose
 > [  0.000000] (0:maestro@) Cannot launch actor 'worker' on failed host 'Fafard'
 > [  0.000000] (1:master@Tremblay) Got 5 workers and 20 tasks to process
 > [  0.000000] (1:master@Tremblay) Send a message to worker-0
@@ -110,7 +110,7 @@ $ $SG_TEST_EXENV ${bindir:=.}/s4u-platform-failures$EXEEXT --log=xbt_cfg.thres:c
 p Testing a simple master/worker example application handling failures. TCP crosstraffic ENABLED
 
 ! output sort 19
-$ $SG_TEST_EXENV ${bindir:=.}/s4u-platform-failures$EXEEXT --log=xbt_cfg.thres:critical --log=no_loc ${platfdir}/small_platform_failures.xml ${srcdir:=.}/s4u-masterworker-failures_d.xml --cfg=path:${srcdir} "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --log=surf_cpu.t:verbose
+$ $SG_TEST_EXENV ${bindir:=.}/s4u-platform-failures$EXEEXT --log=xbt_cfg.thres:critical --log=no_loc ${platfdir}/small_platform_failures.xml ${srcdir:=.}/s4u-platform-failures_d.xml --cfg=path:${srcdir} "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --log=surf_cpu.t:verbose
 > [  0.000000] (0:maestro@) Cannot launch actor 'worker' on failed host 'Fafard'
 > [  0.000000] (1:master@Tremblay) Got 5 workers and 20 tasks to process
 > [  0.000000] (1:master@Tremblay) Send a message to worker-0
index b01db14..7cabe4f 100644 (file)
@@ -65,7 +65,8 @@ template <class F> typename std::result_of<F()>::type simcall(F&& code)
   return result.get();
 }
 
-XBT_PUBLIC const std::vector<smx_actor_t>& process_get_runnable();
+XBT_ATTRIB_DEPRECATED_v325("Please manifest if you actually need this function.")
+    XBT_PUBLIC const std::vector<smx_actor_t>& process_get_runnable();
 
 // What's executed as SIMIX actor code:
 typedef std::function<void()> ActorCode;
index 2b846cf..9d66f8c 100644 (file)
@@ -92,8 +92,6 @@ void Context::stop()
     watched_hosts.insert(actor_->host_->get_cname());
   }
 
-  actor_->finished_ = true;
-
   // Execute the termination callbacks
   smx_process_exit_status_t exit_status = (actor_->context_->iwannadie) ? SMX_EXIT_FAILURE : SMX_EXIT_SUCCESS;
   while (not actor_->on_exit.empty()) {
index 71605ce..eb14cb6 100644 (file)
@@ -316,7 +316,7 @@ void ActorImpl::throw_exception(std::exception_ptr e)
       if (std::find(begin(simix_global->process_to_run), end(simix_global->process_to_run), this) ==
               end(simix_global->process_to_run) &&
           this != SIMIX_process_self()) {
-        XBT_DEBUG("Inserting %s in the to_run list", get_cname());
+        XBT_DEBUG("Inserting [%p] %s in the to_run list", this, get_cname());
         simix_global->process_to_run.push_back(this);
       }
     }
@@ -379,7 +379,7 @@ ActorImplPtr ActorImpl::create(std::string name, simgrid::simix::ActorCode code,
 
   /* Now insert it in the global process list and in the process to run list */
   simix_global->process_list[actor->pid_] = actor;
-  XBT_DEBUG("Inserting %s(%s) in the to_run list", actor->get_cname(), host->get_cname());
+  XBT_DEBUG("Inserting [%p] %s(%s) in the to_run list", actor, actor->get_cname(), host->get_cname());
   simix_global->process_to_run.push_back(actor);
   intrusive_ptr_add_ref(actor);
 
@@ -444,7 +444,7 @@ smx_actor_t SIMIX_process_attach(const char* name, void* data, const char* hostn
 
   /* Now insert it in the global process list and in the process to run list */
   simix_global->process_list[actor->pid_] = actor;
-  XBT_DEBUG("Inserting %s(%s) in the to_run list", actor->get_cname(), host->get_cname());
+  XBT_DEBUG("Inserting [%p] %s(%s) in the to_run list", actor, actor->get_cname(), host->get_cname());
   simix_global->process_to_run.push_back(actor);
   intrusive_ptr_add_ref(actor);
 
@@ -517,7 +517,7 @@ void SIMIX_process_throw(smx_actor_t actor, xbt_errcat_t cat, int value, const c
       if (std::find(begin(simix_global->process_to_run), end(simix_global->process_to_run), actor) ==
               end(simix_global->process_to_run) &&
           actor != SIMIX_process_self()) {
-        XBT_DEBUG("Inserting %s in the to_run list", actor->get_cname());
+        XBT_DEBUG("Inserting [%p] %s in the to_run list", actor, actor->get_cname());
         simix_global->process_to_run.push_back(actor);
       }
     }
@@ -684,7 +684,9 @@ void SIMIX_process_yield(smx_actor_t self)
   }
 }
 
-/** @brief Returns the list of processes to run. */
+/** @brief Returns the list of processes to run.
+ * @deprecated
+ */
 const std::vector<smx_actor_t>& simgrid::simix::process_get_runnable()
 {
   return simix_global->process_to_run;
index 53fd30c..597021e 100644 (file)
@@ -124,12 +124,14 @@ void SIMIX_execution_finish(smx_activity_t synchro)
       default:
         xbt_die("Internal error in SIMIX_execution_finish: unexpected synchro state %d", (int)exec->state_);
     }
-    /* Fail the process if the host is down */
-    if (simcall->issuer->host_->is_off())
-      simcall->issuer->context_->iwannadie = true;
 
     simcall->issuer->waiting_synchro = nullptr;
     simcall_execution_wait__set__result(simcall, exec->state_);
-    SIMIX_simcall_answer(simcall);
+
+    /* Fail the process if the host is down */
+    if (simcall->issuer->host_->is_off())
+      simcall->issuer->context_->iwannadie = true;
+    else
+      SIMIX_simcall_answer(simcall);
   }
 }
index 2898422..24947e8 100644 (file)
@@ -53,11 +53,10 @@ void SIMIX_io_finish(smx_activity_t synchro)
         xbt_die("Internal error in SIMIX_io_finish: unexpected synchro state %d", static_cast<int>(synchro->state_));
     }
 
-    if (simcall->issuer->host_->is_off()) {
-      simcall->issuer->context_->iwannadie = true;
-    }
-
     simcall->issuer->waiting_synchro = nullptr;
-    SIMIX_simcall_answer(simcall);
+    if (simcall->issuer->host_->is_off())
+      simcall->issuer->context_->iwannadie = true;
+    else
+      SIMIX_simcall_answer(simcall);
   }
 }
index e3cc204..ed7189c 100644 (file)
@@ -624,9 +624,6 @@ void SIMIX_comm_finish(smx_activity_t synchro)
       }
     }
 
-    if (simcall->issuer->host_->is_off())
-      simcall->issuer->context_->iwannadie = true;
-
     simcall->issuer->waiting_synchro = nullptr;
     simcall->issuer->comms.remove(synchro);
     if(comm->detached){
@@ -643,7 +640,10 @@ void SIMIX_comm_finish(smx_activity_t synchro)
       }
     }
 
-    SIMIX_simcall_answer(simcall);
+    if (simcall->issuer->host_->is_off())
+      simcall->issuer->context_->iwannadie = true;
+    else
+      SIMIX_simcall_answer(simcall);
   }
 }
 
index 4658773..7fd7af1 100644 (file)
@@ -65,16 +65,15 @@ void SIMIX_synchro_finish(smx_activity_t synchro)
   smx_simcall_t simcall = synchro->simcalls_.front();
   synchro->simcalls_.pop_front();
 
-  if (synchro->state_ != SIMIX_SRC_TIMEOUT) {
-    if (synchro->state_ == SIMIX_FAILED)
-      simcall->issuer->context_->iwannadie = true;
-    else
-      THROW_IMPOSSIBLE;
-  }
-
   SIMIX_synchro_stop_waiting(simcall->issuer, simcall);
   simcall->issuer->waiting_synchro = nullptr;
-  SIMIX_simcall_answer(simcall);
+
+  if (synchro->state_ != SIMIX_SRC_TIMEOUT) {
+    xbt_assert(synchro->state_ == SIMIX_FAILED);
+    simcall->issuer->context_->iwannadie = true;
+  } else {
+    SIMIX_simcall_answer(simcall);
+  }
   XBT_OUT();
 }
 
index 50f1fc6..65543dc 100644 (file)
@@ -27,7 +27,7 @@ To upgrade your files, use the tool simgrid_update_xml
    - In <trace_connect>, attribute kind="POWER" is now kind="SPEED".
 
    - In <host> and <link>, attributes availability and state are gone.
-     It was redundent with state and availability profiles, and with peak values.
+     It was redundant with state and availability profiles, and with peak values.
 
    - In <cluster>, cannot set the availability nor state profiles.
      This was too complex and unused.
index 36a715e..9456793 100644 (file)
@@ -9363,7 +9363,7 @@ FAIL("Premature EOF: `</peer>' expected.");
   *      that a <host>, <peer>, <cluster> or <cabinet> can deliver per second.
   *    - In <trace_connect>, attribute kind="POWER" is now kind="SPEED".
   *    - In <host> and <link>, attributes availability and state are gone.
-  *      It was redundent with state and availability traces, and with peak values.
+  *      It was redundant with state and availability traces, and with peak values.
   *    - In <cluster>, cannot set the availability nor state profiles.
   *      This was too complex and unused.
   *    - The DOCTYPE points to the right URL (this file).
index 32308f6..821c0f2 100644 (file)
@@ -10,5 +10,6 @@ set(bin_files ${bin_files}    ${CMAKE_CURRENT_SOURCE_DIR}/fix-paje-trace.sh
                               ${CMAKE_CURRENT_SOURCE_DIR}/MSG_visualization/trace2fig.pl          PARENT_SCOPE)
 
 set(txt_files ${txt_files}    ${CMAKE_CURRENT_SOURCE_DIR}/pkg-config/simgrid.pc.in
+                              ${CMAKE_CURRENT_SOURCE_DIR}/sanitizers.supp
                               ${CMAKE_CURRENT_SOURCE_DIR}/simgrid.supp
                               ${CMAKE_CURRENT_SOURCE_DIR}/simgrid2vite.sed                        PARENT_SCOPE)
index 99806e2..b41839a 100755 (executable)
@@ -28,6 +28,7 @@ fi
 
 if [ "${SANITIZER}" = "address" ]
 then
+    export ASAN_OPTIONS="suppressions=$WORKSPACE/tools/sanitizers.supp"
     SANITIZER_OPTIONS="-Denable_address_sanitizer=ON -Denable_undefined_sanitizer=OFF -Denable_thread_sanitizer=OFF"
 elif [ "${SANITIZER}" = "thread" ]
 then
diff --git a/tools/sanitizers.supp b/tools/sanitizers.supp
new file mode 100644 (file)
index 0000000..e68e23a
--- /dev/null
@@ -0,0 +1,4 @@
+# Address sanitizer suppressions for stuff that we cannot control
+
+# ignore libunwind cruft
+interceptor_via_lib:libunwind.so