Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Improve an error message
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 29 May 2012 21:19:02 +0000 (23:19 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 29 May 2012 21:19:02 +0000 (23:19 +0200)
There is good chances that the bug is in the user code (like calling
msg_comm_test twice or something similar), and there is nothing we can
do reliably from simgrid land if the user land builds such crap.

See also
https://gforge.inria.fr/tracker/index.php?func=detail&aid=14327&group_id=12&atid=165

src/simix/smx_network.c

index a21f74e..da59e87 100644 (file)
@@ -205,9 +205,9 @@ void SIMIX_comm_destroy(smx_action_t action)
             action, action->comm.refcount, (int)action->state);
 
   if (action->comm.refcount <= 0) {
-       xbt_backtrace_display_current();
-    xbt_die("the refcount of comm %p is already 0 before decreasing it. "
-            "That's a bug!", action);
+    xbt_backtrace_display_current();
+    xbt_die("The refcount of comm %p is already 0 before decreasing it. "
+            "That's a bug! If you didn't test and/or wait the same communication twice in your code, then the bug is SimGrid's...", action);
   }
   action->comm.refcount--;
   if (action->comm.refcount > 0)