From a77e18319a5b7b58ac2f18655dbadde2035be28b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Kowalczyk?= Date: Mon, 8 Feb 2021 21:57:50 +0100 Subject: [PATCH 1/4] [LibOS] Error out on anonymous shared mappings in mmap syscall MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit LibOS can't implement such a combination of flags because PAL doesn't support shared mappings. I'm not sure about the non-anonymous shared case, as it currently works on Linux PAL, but only by an accident? (at least it seems...) Signed-off-by: MichaƂ Kowalczyk --- LibOS/shim/src/sys/shim_mmap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/LibOS/shim/src/sys/shim_mmap.c b/LibOS/shim/src/sys/shim_mmap.c index cb12cdaf32..8f6ffa8429 100644 --- a/LibOS/shim/src/sys/shim_mmap.c +++ b/LibOS/shim/src/sys/shim_mmap.c @@ -77,6 +77,8 @@ void* shim_do_mmap(void* addr, size_t length, int prot, int flags, int fd, off_t if (flags & MAP_ANONYMOUS) { switch (flags & MAP_TYPE) { case MAP_SHARED: + /* PAL API doesn't support anonymous shared memory. */ + return (void*)-ENOSYS; case MAP_PRIVATE: break; default: From 5b67047d4f3bee5f5d55d5f50a4d000f86843d38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Kowalczyk?= Date: Mon, 8 Feb 2021 22:52:54 +0100 Subject: [PATCH 2/4] fixup! [LibOS] Error out on anonymous shared mappings in mmap syscall --- LibOS/shim/test/ltp/ltp.cfg | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/LibOS/shim/test/ltp/ltp.cfg b/LibOS/shim/test/ltp/ltp.cfg index 96306e3d5e..389db47caa 100644 --- a/LibOS/shim/test/ltp/ltp.cfg +++ b/LibOS/shim/test/ltp/ltp.cfg @@ -676,6 +676,10 @@ skip = yes [futex_cmp_requeue01] skip = yes +# uses anonymous shared mappings (which are not supported) +[futex_cmp_requeue02] +skip = yes + # always fails to open /proc/PID/stat, but the whole test fails only sometimes [futex_wait02] skip = yes From 5dbf2a6afe30e5a8420198a8d437d6b35781b56a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Kowalczyk?= Date: Mon, 8 Feb 2021 23:48:17 +0100 Subject: [PATCH 3/4] [DO NOT MERGE] testing which apps fail... --- .ci/lib/stage-clean-check.jenkinsfile | 2 +- .ci/lib/stage-test-direct.jenkinsfile | 18 +++++++++--------- .ci/lib/stage-test-sgx.jenkinsfile | 18 +++++++++--------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.ci/lib/stage-clean-check.jenkinsfile b/.ci/lib/stage-clean-check.jenkinsfile index b4aeb19443..cf2f265ab6 100644 --- a/.ci/lib/stage-clean-check.jenkinsfile +++ b/.ci/lib/stage-clean-check.jenkinsfile @@ -21,7 +21,7 @@ stage('clean-check') { make -C Examples/memcached distclean make -C Examples/redis distclean make -C Examples/lighttpd distclean - make -C Examples/nginx distclean + #make -C Examples/nginx distclean make -C Examples/apache distclean make -C Examples/blender distclean make -C Examples/r distclean diff --git a/.ci/lib/stage-test-direct.jenkinsfile b/.ci/lib/stage-test-direct.jenkinsfile index a94566e78f..fc8f5f3b53 100644 --- a/.ci/lib/stage-test-direct.jenkinsfile +++ b/.ci/lib/stage-test-direct.jenkinsfile @@ -79,15 +79,15 @@ stage('test-direct') { LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh 127.0.0.1:8003 ''' } - timeout(time: 10, unit: 'MINUTES') { - sh ''' - cd Examples/nginx - make -j8 all - make start-graphene-server & - sleep 1 - LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh 127.0.0.1:8002 - ''' - } + // timeout(time: 10, unit: 'MINUTES') { + // sh ''' + // cd Examples/nginx + // make -j8 all + // make start-graphene-server & + // sleep 1 + // LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh 127.0.0.1:8002 + // ''' + // } timeout(time: 20, unit: 'MINUTES') { sh ''' cd Examples/apache diff --git a/.ci/lib/stage-test-sgx.jenkinsfile b/.ci/lib/stage-test-sgx.jenkinsfile index ff2170cd5d..852adb4366 100644 --- a/.ci/lib/stage-test-sgx.jenkinsfile +++ b/.ci/lib/stage-test-sgx.jenkinsfile @@ -72,15 +72,15 @@ stage('test-sgx') { LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh 127.0.0.1:8003 ''' } - timeout(time: 15, unit: 'MINUTES') { - sh ''' - cd Examples/nginx - make ${MAKEOPTS} - make ${MAKEOPTS} start-graphene-server & - sleep 30 - LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh 127.0.0.1:8002 - ''' - } + // timeout(time: 15, unit: 'MINUTES') { + // sh ''' + // cd Examples/nginx + // make ${MAKEOPTS} + // make ${MAKEOPTS} start-graphene-server & + // sleep 30 + // LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh 127.0.0.1:8002 + // ''' + // } timeout(time: 25, unit: 'MINUTES') { sh ''' cd Examples/apache From 36f90a6c8968f54131d2e5a071a27ef65a5482e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Kowalczyk?= Date: Tue, 9 Feb 2021 00:15:29 +0100 Subject: [PATCH 4/4] [DO NOT MERGE] testing which apps fail... --- .ci/lib/stage-clean-check.jenkinsfile | 2 +- .ci/lib/stage-test-direct.jenkinsfile | 20 ++++++++++---------- .ci/lib/stage-test-sgx.jenkinsfile | 20 ++++++++++---------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.ci/lib/stage-clean-check.jenkinsfile b/.ci/lib/stage-clean-check.jenkinsfile index cf2f265ab6..730a119c54 100644 --- a/.ci/lib/stage-clean-check.jenkinsfile +++ b/.ci/lib/stage-clean-check.jenkinsfile @@ -22,7 +22,7 @@ stage('clean-check') { make -C Examples/redis distclean make -C Examples/lighttpd distclean #make -C Examples/nginx distclean - make -C Examples/apache distclean + #make -C Examples/apache distclean make -C Examples/blender distclean make -C Examples/r distclean make -C Pal/src PAL_HOST=Skeleton clean diff --git a/.ci/lib/stage-test-direct.jenkinsfile b/.ci/lib/stage-test-direct.jenkinsfile index fc8f5f3b53..0373531dde 100644 --- a/.ci/lib/stage-test-direct.jenkinsfile +++ b/.ci/lib/stage-test-direct.jenkinsfile @@ -88,16 +88,16 @@ stage('test-direct') { // LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh 127.0.0.1:8002 // ''' // } - timeout(time: 20, unit: 'MINUTES') { - sh ''' - cd Examples/apache - make -j8 all - make start-graphene-server & - sleep 1 - LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh 127.0.0.1:8001 - LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh https://127.0.0.1:8443 - ''' - } + // timeout(time: 20, unit: 'MINUTES') { + // sh ''' + // cd Examples/apache + // make -j8 all + // make start-graphene-server & + // sleep 1 + // LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh 127.0.0.1:8001 + // LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh https://127.0.0.1:8443 + // ''' + // } timeout(time: 5, unit: 'MINUTES') { sh ''' cd Examples/blender diff --git a/.ci/lib/stage-test-sgx.jenkinsfile b/.ci/lib/stage-test-sgx.jenkinsfile index 852adb4366..dedaf7d032 100644 --- a/.ci/lib/stage-test-sgx.jenkinsfile +++ b/.ci/lib/stage-test-sgx.jenkinsfile @@ -81,16 +81,16 @@ stage('test-sgx') { // LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh 127.0.0.1:8002 // ''' // } - timeout(time: 25, unit: 'MINUTES') { - sh ''' - cd Examples/apache - make ${MAKEOPTS} - make ${MAKEOPTS} start-graphene-server & - sleep 30 - LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh 127.0.0.1:8001 - LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh https://127.0.0.1:8443 - ''' - } + // timeout(time: 25, unit: 'MINUTES') { + // sh ''' + // cd Examples/apache + // make ${MAKEOPTS} + // make ${MAKEOPTS} start-graphene-server & + // sleep 30 + // LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh 127.0.0.1:8001 + // LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh https://127.0.0.1:8443 + // ''' + // } timeout(time: 5, unit: 'MINUTES') { sh ''' cd Examples/blender