Skip to content

Problem running with SGX #9

@WHMHammer

Description

@WHMHammer

The Run with SGX page says "use the command python3.6 runserver.py --sgx [true]," which doesn't work, and shows:

usage: runserver.py [-h] [-w WORKING_DIR] [-c FUNCTION_CMD]
                    [-l {DEBUG,INFO,WARNING,ERROR,CRITICAL}]
                    [host] [port]
runserver.py: error: unrecognized arguments: --sgx

The documentation from the repo says "use the command ./runserver.py -c 'graphene-sgx/pal_loader graphene-sgx/manifest'," which successfully starts the server. However, when I run test_hello_world, it shows the following error:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/home/ubuntu/497/install/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "./runserver.py", line 33, in run
    self.instance= self.handler.handle_requests()
  File "/home/ubuntu/497/bento/bento/server/core/handler.py", line 122, in handle_requests
    self._handle_execute_request(request)
  File "/home/ubuntu/497/bento/bento/server/core/handler.py", line 153, in _handle_execute_request
    new_instance= instance_mngr.create(exec_data)
  File "/home/ubuntu/497/bento/bento/server/core/instance_mngr.py", line 31, in create
    new_instance= Instance(function_id, exec_data)
  File "/home/ubuntu/497/bento/bento/server/core/instance_mngr.py", line 75, in __init__
    self._execute(exec_data)
  File "/home/ubuntu/497/bento/bento/server/core/instance_mngr.py", line 89, in _execute
    self.function_proc= subprocess.Popen(cmd, stdout=outbuff, stdin=subprocess.PIPE, stderr=errbuff)
  File "/home/ubuntu/497/install/lib/python3.6/subprocess.py", line 729, in __init__
    restore_signals, start_new_session)
  File "/home/ubuntu/497/install/lib/python3.6/subprocess.py", line 1364, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'graphene-sgx/pal_loader': 'graphene-sgx/pal_loader'

I found that bento/bento/server/graphene-sgx/pal_loader is a symbolic link to /home/vanilla/sgx/graphene/Runtime/pal_loader, so I changed it to a symbolic link to graphene/Runtime/pal_loader, where graphene is the cloned graphene repo. I started the server and run test_hello_world again. This time it shows the following error:

ERROR:  (29c5c548-5876-41ad-bcf7-c05b246b13ef) Execution error:
 Running from repository is broken. Please install Graphene using Meson.
See https://graphene.readthedocs.io/en/latest/building.html for details.

DEBUG:  (29c5c548-5876-41ad-bcf7-c05b246b13ef) function dead
ERROR:  failed to recv header

I followed all the instructions in the quickstart of the graphene documentation when installing it, and the build was successful. How shall I solve the problem and run bento with SGX support? Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions