Code Review
/
vpp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
814e898
)
api: fix dead client scan heap issue
05/23505/2
author
Nathan Skrzypczak
<nathan.skrzypczak@gmail.com>
Thu, 7 Nov 2019 15:00:57 +0000
(16:00 +0100)
committer
Andrew Yourtchenko
<ayourtch@gmail.com>
Fri, 20 Dec 2019 09:15:20 +0000
(09:15 +0000)
Type: fix
On multiworker setup when an app client dies, the
vec_reset_length call fails the assert in
clib_mem_is_heap_object. Same thing might happen for
the clib_warnings
Change-Id: I369f9d2dbe60407c84994a4e8d25f6df7848ca93
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
(cherry picked from commit
5ed3fe3dd4320a7b4080f18de32ef491b5a1c7f0
)
src/vlibmemory/memory_api.c
patch
|
blob
|
history
diff --git
a/src/vlibmemory/memory_api.c
b/src/vlibmemory/memory_api.c
index
34fd956
..
c9eebab
100644
(file)
--- a/
src/vlibmemory/memory_api.c
+++ b/
src/vlibmemory/memory_api.c
@@
-666,14
+666,18
@@
vl_mem_api_dead_client_scan (api_main_t * am, vl_shmem_hdr_t * shm, f64 now)
vec_delete (am->vlib_private_rps, 1, i);
goto found;
}
+ svm_pop_heap (oldheap);
clib_warning ("private rp %llx AWOL", dead_rp);
+ oldheap = svm_push_data_heap (svm);
found:
/* Kill it, accounting for the memfd header page */
+ svm_pop_heap (oldheap);
if (munmap ((void *) virtual_base, virtual_size) < 0)
clib_unix_warning ("munmap");
/* Reset the queue-length-address cache */
vec_reset_length (vl_api_queue_cursizes);
+ oldheap = svm_push_data_heap (svm);
}
else
{