From abfd613f60fc563fe8876c59e93a7e5fb36cafe5 Mon Sep 17 00:00:00 2001 From: Don Porter Date: Mon, 1 Apr 2019 12:14:03 -0400 Subject: [PATCH] [Tests, LibOS] Add Apache test in Jenkins-Debug Previously, there was a bug of a stale debugging memory region copied to child as part of parent's checkpoint. This bug manifested in Apache test segfaulting in debug build. This commit fixes the bug and adds Apache to the Jenkins-Debug job. --- Jenkinsfiles/Linux-Debug | 7 +++++++ LibOS/shim/src/bookkeep/shim_vma.c | 3 +++ LibOS/shim/src/shim_debug.c | 1 + 3 files changed, 11 insertions(+) diff --git a/Jenkinsfiles/Linux-Debug b/Jenkinsfiles/Linux-Debug index 54f2a1be..32045e42 100644 --- a/Jenkinsfiles/Linux-Debug +++ b/Jenkinsfiles/Linux-Debug @@ -54,6 +54,13 @@ pipeline { sleep 1 ./benchmark-http.sh `hostname -I|tr -d '[:space:]'`:8000 ''' + sh ''' + cd LibOS/shim/test/apps/apache + make + make start-graphene-server & + sleep 1 + ./benchmark-http.sh `hostname -I|tr -d '[:space:]'`:8001 + ''' } } stage('Deploy') { diff --git a/LibOS/shim/src/bookkeep/shim_vma.c b/LibOS/shim/src/bookkeep/shim_vma.c index 6d6d3432..bc9a9a51 100644 --- a/LibOS/shim/src/bookkeep/shim_vma.c +++ b/LibOS/shim/src/bookkeep/shim_vma.c @@ -675,6 +675,9 @@ int bkeep_munmap (void * addr, size_t length, int flags) int ret = __bkeep_munmap(&prev, addr, addr + length, flags); assert_vma_list(); __restore_reserved_vmas(); + /* DEP 5/20/19: If this is a debugging region we are removing, take it out + * of the checkpoint. Otherwise, it will be restored erroneously after a fork. */ + remove_r_debug(addr); unlock(&vma_list_lock); return ret; } diff --git a/LibOS/shim/src/shim_debug.c b/LibOS/shim/src/shim_debug.c index 5dee7ead..22445368 100644 --- a/LibOS/shim/src/shim_debug.c +++ b/LibOS/shim/src/shim_debug.c @@ -58,6 +58,7 @@ struct gdb_link_map struct gdb_link_map *l_next, *l_prev; }; +/* XXX: What lock protects this? vma_list_lock? */ static struct gdb_link_map * link_map_list = NULL; void clean_link_map_list (void)