From 566c00275e9f0f06561e882c7c304f96e3f968a7 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Mon, 1 Aug 2016 10:41:15 +0200 Subject: [PATCH] fix problem 20636 on gforge - 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 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/simix/smx_network.cpp b/src/simix/smx_network.cpp index cbc15eba90..722116e54c 100644 --- a/src/simix/smx_network.cpp +++ b/src/simix/smx_network.cpp @@ -104,7 +104,7 @@ void SIMIX_mbox_remove(smx_mailbox_t mbox, smx_synchro_t synchro) 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->mbox=mbox; XBT_DEBUG("pushing a message into the permanent receive fifo %p, comm %p", mbox, &(other_comm)); }else{ -- 2.20.1