Giter Club home page Giter Club logo

Comments (7)

dimakuv avatar dimakuv commented on July 22, 2024

@jinengandhi-intel Could you attach a redis-server.manifest.sgx final manifest file? I wonder what is so special about RHEL/CentOS.

I assume that the difference is in how this final manifest file is generated on Ubuntu vs on RHEL/CentOS.

from graphene.

dimakuv avatar dimakuv commented on July 22, 2024

@jinengandhi-intel Also could you attach redis-server.manifest.sgx file in Ubuntu (where it doesn't fail)?

I want to look at two versions of this redis-server.manifest.sgx file: one in Ubuntu, one in RHEL. Comparing them side by side, we may spot the difference, which will be the root cause of this failure.

from graphene.

jinengandhi-intel avatar jinengandhi-intel commented on July 22, 2024

Manifest SGX file for Ubuntu are attached here. For RHEL, I am awaiting the manifest files from my colleague
R.manifest.sgx.txt

curl.manifest.sgx.txt

from graphene.

aniket-intelx avatar aniket-intelx commented on July 22, 2024

Please find the manifest.sgx files for RHEL attached.
curl.manifest.sgx.txt
R.manifest.sgx.txt
redis-server.manifest.sgx.txt

from graphene.

dimakuv avatar dimakuv commented on July 22, 2024

RHEL manifest files are ~10MB in size... This feels like way too much for the initial 64MB pre-allocated by Graphene.

@aniket-intelx @jinengandhi-intel Can any of you run the failing workload (e.g., redis-server) on RHEL under GDB and find the exact place where the out of PAL memory error happens? I would assume that it happens here: https://github.com/oscarlab/graphene/blob/33a68bc4302891e8c591570942bc39394acefd23/Pal/src/host/Linux-SGX/db_main.c#L683

from graphene.

anjalirai-intel avatar anjalirai-intel commented on July 22, 2024

@dimakuv
Before the mentioned commit the RHEL manifest files for curl is ~16MB in size and it did worked.

@aniket-intelx will be sharing the rest of the details soon

from graphene.

dimakuv avatar dimakuv commented on July 22, 2024

We debugged and the problem is in Graphene's pre-allocated internal PAL memory pool of 64MB.

We fail on toml_parse():

toml_table_t* manifest_root = toml_parse(manifest_addr, errbuf, sizeof(errbuf));

But we read loader.pal_internal_mem_size (which increases the internal PAL memory) only after parsing:

ret = toml_sizestring_in(g_pal_state.manifest_root, "loader.pal_internal_mem_size",

So we get a chicken-and-egg problem.

Easy solution: if we detect that the manifest size is greater than some threshold (I recommend 1MB), then we immediately increase internal PAL memory by additional 64MB.

from graphene.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.