From 787df74be0ea7a594018b98dedfe49ea0912e8ac Mon Sep 17 00:00:00 2001 From: "Hui, Chunyang" Date: Wed, 18 Nov 2020 12:48:19 +0000 Subject: [PATCH] Fix Python test malloc failure on SGX machine Using tcmalloc could consume more heap. Enlarging kernel heap allocation can fix this. Also print result for Python test. --- .github/workflows/demo_test.yml | 3 +++ .github/workflows/hw_mode_test.yml | 3 +++ demos/python/run_python_on_occlum.sh | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/demo_test.yml b/.github/workflows/demo_test.yml index 2220870d..55d79424 100644 --- a/.github/workflows/demo_test.yml +++ b/.github/workflows/demo_test.yml @@ -396,3 +396,6 @@ jobs: - name: Run python support test run: docker exec python_support_test bash -c "cd /root/occlum/demos/python; SGX_MODE=SIM ./run_python_on_occlum.sh" + + - name: Check result + run: docker exec python_support_test bash -c "cd /root/occlum/demos/python/occlum_instance; cat smvlight.dat" diff --git a/.github/workflows/hw_mode_test.yml b/.github/workflows/hw_mode_test.yml index 5ce5944f..3b624b17 100644 --- a/.github/workflows/hw_mode_test.yml +++ b/.github/workflows/hw_mode_test.yml @@ -297,6 +297,9 @@ jobs: - name: Run python support test run: docker exec python_support_test bash -c "cd /root/occlum/demos/python; ./run_python_on_occlum.sh" + - name: Check result + run: docker exec python_support_test bash -c "cd /root/occlum/demos/python/occlum_instance; cat smvlight.dat" + - name: Clean the environment run: docker stop python_support_test diff --git a/demos/python/run_python_on_occlum.sh b/demos/python/run_python_on_occlum.sh index 441ac9dd..27e272b3 100755 --- a/demos/python/run_python_on_occlum.sh +++ b/demos/python/run_python_on_occlum.sh @@ -35,7 +35,7 @@ if [ ! -d "image/lib/python3.7" ];then cp -rf ../dataset image cp -f ../demo.py image new_json="$(jq '.resource_limits.user_space_size = "320MB" | - .resource_limits.kernel_space_heap_size = "192MB" | + .resource_limits.kernel_space_heap_size = "256MB" | .process.default_mmap_size = "256MB"' Occlum.json)" && \ echo "${new_json}" > Occlum.json occlum build