Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cancel the comms of leaving processes instead of destroying them
authorMartin Quinson <martin.quinson@loria.fr>
Wed, 17 Oct 2012 21:25:06 +0000 (23:25 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Wed, 17 Oct 2012 21:29:11 +0000 (23:29 +0200)
This avoids segfaults when a process leaves the simulation before all
its asynchronous comms (included detached ones) end.

This may leak the canceled actions, but that's another bug, in
comm_cancel.

src/simix/smx_process.c

index 357314a..95bf7c7 100644 (file)
@@ -318,7 +318,7 @@ void SIMIX_process_kill(smx_process_t process, smx_process_t issuer) {
 
       case SIMIX_ACTION_COMMUNICATE:
         xbt_fifo_remove(process->comms, process->waiting_action);
-        SIMIX_comm_destroy(process->waiting_action);
+        SIMIX_comm_cancel(process->waiting_action);
         break;
 
         case SIMIX_ACTION_SLEEP: