Replies: 4 comments 2 replies
-
|
Beta Was this translation helpful? Give feedback.
-
I've seen this behavior of Python before. I think what happens in reality has nothing to do with the file read. It is actually a problem of out-of-memory in Python. It's just that Python is known for not handling out-of-memory errors well, so Python can e.g. hang. Please try to increase Finally, Python is known to require large stacks. By default, Gramine creates stacks of 256KB, so try to increase it e.g. like this: |
Beta Was this translation helpful? Give feedback.
-
I attempted to read a 266M file with the following configuration: Sys. brk.max_ Size="2G" But it still cannot be read, why is this? My machine only has 64GB of memory, so enclave_ Size setting 16G |
Beta Was this translation helpful? Give feedback.
-
@dimakuv Sorry, the words have been automatically converted
|
Beta Was this translation helpful? Give feedback.
-
Small file reading test is normal
A large file (250M), a regular text file, failed to read with the following error. It has been stuck here and has not continued
this is my manifest:
fs.mounts = [
{ path = "/lib", uri = "file:{{ gramine.runtimedir() }}" },
{ path = "{{ arch_libdir }}", uri = "file:{{ arch_libdir }}" },
{ path = "/usr/{{ arch_libdir }}", uri = "file:/usr/{{ arch_libdir }}" },
{% for path in python.get_sys_path(entrypoint) %}
{ path = "{{ path }}", uri = "file:{{ path }}" },
{% endfor %}
{ path = "{{ entrypoint }}", uri = "file:{{ entrypoint }}" },
{ type = "tmpfs", path = "/tmp" },
{ path = "/data", uri = "file:/home/gramine-test-app/read-write/wrfile/data/" },
{ path = "/res", uri = "file:/home/gramine-test-app/read-write/wrfile/res/" },
{ path = "/res-enc", uri = "file:/home/gramine-test-app/read-write/wrfile/res-enc/", type = "encrypted", key_name = "_sgx_mrenclave" },
]
sys.enable_extra_runtime_domain_names_conf = true
sgx.debug = true
sgx.edmm_enable = {{ 'true' if env.get('EDMM', '0') == '1' else 'false' }}
sgx.enclave_size = "16G"
sgx.remote_attestation = "dcap"
sgx.trusted_files = [
"file:{{ gramine.libos }}",
"file:{{ entrypoint }}",
"file:{{ gramine.runtimedir() }}/",
"file:{{ arch_libdir }}/",
"file:/usr/{{ arch_libdir }}/",
{% for path in python.get_sys_path(entrypoint) %}
"file:{{ path }}{{ '/' if path.is_dir() else '' }}",
{% endfor %}
"file:scripts/",
]
sgx.allowed_files = [
"file:/home/gramine-test-app/read-write/wrfile/data/",
"file:/home/gramine-test-app/read-write/wrfile/res/",
"file:/home/gramine-test-app/read-write/wrfile/res-enc/",
]
Beta Was this translation helpful? Give feedback.
All reactions