Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix problem 20636 on gforge
authorMartin Quinson <martin.quinson@loria.fr>
Mon, 1 Aug 2016 08:41:15 +0000 (10:41 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Mon, 1 Aug 2016 08:41:20 +0000 (10:41 +0200)
- When a permanent receiver was set, the comm->mailbox was copied from
  the other comm
- But this is a marker of the which mailbox I'm enrolled into.
- So if I'm not pushed into a mailbox queue, then my mailbox field
  must remain clear.

- This problem was probably added during one of the recent
  objectification battle.
- It remained undiscovered so far because it seems to appear only when
  a second task is added to a permanent_receive mailbox.

This is at least my understanding of the problem, I'm not 100% sure.

src/simix/smx_network.cpp

index cbc15eb..722116e 100644 (file)
@@ -104,7 +104,7 @@ void SIMIX_mbox_remove(smx_mailbox_t mbox, smx_synchro_t synchro)
       mbox->comm_queue. erase(it);
       return;
     }
       mbox->comm_queue. erase(it);
       return;
     }
-  xbt_die("Cannot remove this comm that is not part of the mailbox");
+  xbt_die("Cannot remove the comm %p that is not part of the mailbox %s",comm, mbox->name);
 }
 
 /**
 }
 
 /**
@@ -194,7 +194,6 @@ XBT_PRIVATE smx_synchro_t simcall_HANDLER_comm_isend(smx_simcall_t simcall, smx_
       other_comm->dst_proc=mbox->permanent_receiver.get();
       other_comm->ref();
       mbox->done_comm_queue.push_back(other_synchro);
       other_comm->dst_proc=mbox->permanent_receiver.get();
       other_comm->ref();
       mbox->done_comm_queue.push_back(other_synchro);
-      other_comm->mbox=mbox;
       XBT_DEBUG("pushing a message into the permanent receive fifo %p, comm %p", mbox, &(other_comm));
 
     }else{
       XBT_DEBUG("pushing a message into the permanent receive fifo %p, comm %p", mbox, &(other_comm));
 
     }else{