Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
No need to answer to simcall when host is off.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 11 Feb 2019 15:07:12 +0000 (16:07 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 11 Feb 2019 15:07:12 +0000 (16:07 +0100)
These changes should fix tests platform-failures where some processes were
duplicated in process_to_run[], leading to runtime errors with boost and raw
contexts.

The error could be seen with a "xbt_assert(next_context != this);" just before
"this->swap_into(next_context);" in SwappedContext::suspend().

examples/deprecated/msg/CMakeLists.txt
examples/s4u/CMakeLists.txt
src/simix/smx_host.cpp
src/simix/smx_io.cpp
src/simix/smx_network.cpp
src/simix/smx_synchro.cpp

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()
 
                              ${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} 
 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 cebbebf..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()
 
                                    ${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
 ######################
 
 # Multi-files examples
 ######################
 
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_);
     }
       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_);
 
     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_));
     }
 
         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;
     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){
     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();
 
   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_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();
 }
 
   XBT_OUT();
 }