Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Try to fix a failure about mutex freed too early in RMA
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Mon, 13 Nov 2023 20:44:26 +0000 (21:44 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Mon, 13 Nov 2023 20:44:26 +0000 (21:44 +0100)
src/kernel/activity/MutexImpl.hpp
src/smpi/mpi/smpi_win.cpp

index 51ef640..75cb5d6 100644 (file)
@@ -100,7 +100,8 @@ public:
   {
     if (mutex->refcount_.fetch_sub(1) == 1) {
       xbt_assert(mutex->ongoing_acquisitions_.empty(), "The destroyed mutex still had ongoing acquisitions");
-      xbt_assert(mutex->owner_ == nullptr, "The destroyed mutex is still owned by %s", mutex->owner_->get_cname());
+      xbt_assert(mutex->owner_ == nullptr, "The destroyed mutex is still owned by actor %s",
+                 mutex->owner_->get_cname());
       delete mutex;
     }
   }
index 7b33c80..b6d1f34 100644 (file)
@@ -97,6 +97,8 @@ int Win::del(Win* win){
   }
   if (win->allocated_)
     xbt_free(win->base_);
+  if (win->mut_->get_owner() != nullptr)
+    win->mut_->unlock();
 
   F2C::free_f(win->f2c_id());
   win->cleanup_attr<Win>();