1
1
openmpi/opal/mca/rcache/base
Nathan Hjelm ab8ed177f5 rcache: fix deadlock in multi-threaded environments
This commit fixes several bugs in the registration cache code:

 - Fix a programming error in the grdma invalidation function that can
   cause an infinite loop if more than 100 registrations are
   associated with a munmapped region. This happens because the
   mca_rcache_base_vma_find_all function returns the same 100
   registrations on each call. This has been fixed by adding an
   iterate function to the vma tree interface.

 - Always obtain the vma lock when needed. This is required because
   there may be other threads in the system even if
   opal_using_threads() is false. Additionally, since it is safe to do
   so (the vma lock is recursive) the vma interface has been made
   thread safe.

 - Avoid calling free() while holding a lock. This avoids race
   conditions with locks held outside the Open MPI code.

Fixes open-mpi/ompi#1654.

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
2016-05-17 09:02:40 -06:00
..
base.h opal/memory: move initialization to first rcache creation 2016-04-13 17:21:46 -06:00
help-rcache-base.txt rcache: fix leave_pinned failure path 2016-04-26 14:39:23 -06:00
Makefile.am rcache/base: add missing file to tarball 2016-04-19 11:03:38 -06:00
rcache_base_create.c rcache: fix leave_pinned failure path 2016-04-26 14:39:23 -06:00
rcache_base_frame.c opal/memory: move initialization to first rcache creation 2016-04-13 17:21:46 -06:00
rcache_base_mem_cb.c opal: rework mpool and rcache frameworks 2016-03-14 10:50:41 -06:00
rcache_base_mem_cb.h opal: rework mpool and rcache frameworks 2016-03-14 10:50:41 -06:00
rcache_base_vma_tree.c rcache: fix deadlock in multi-threaded environments 2016-05-17 09:02:40 -06:00
rcache_base_vma_tree.h rcache: fix deadlock in multi-threaded environments 2016-05-17 09:02:40 -06:00
rcache_base_vma.c rcache: fix deadlock in multi-threaded environments 2016-05-17 09:02:40 -06:00
rcache_base_vma.h rcache: fix deadlock in multi-threaded environments 2016-05-17 09:02:40 -06:00