Closed ntk97 closed 2 years ago
During execution of docker command for testing Graphene GSC without Avalon, throws Function not implemented (src/ip.cpp:563) . Unable to locate the file src/ip.cpp file.
Sorry but this is not a Graphene problem. You should be asking Avalon people what this src/ip.cpp
file could be.
Anyways, quick googling lead me to this: https://github.com/zeromq/libzmq/blob/5d8d857540323e2d85c64a7edde1ad5280cad04b/src/ip.cpp#L563. This feels like a right hit, so probably Avalon uses libzmq (ZeroMQ, https://github.com/zeromq/libzmq).
Looking at that code, we see this system call executing: https://github.com/zeromq/libzmq/blob/5d8d857540323e2d85c64a7edde1ad5280cad04b/src/ip.cpp#L561. This is eventfd()
, which is disable in Graphene by default. See https://gramine.readthedocs.io/en/latest/manifest-syntax.html#allowing-eventfd.
So you can try to add this line to your manifest file:
sys.insecure__allow_eventfd = true
Enabling theeventfd()
by adding sys.insecure__allow_eventfd = true
in manifest resolved the issue.
Function not implemented (src/ip.cpp:563) in testing GSC container
Trying to the integrate Avalon with Graphene, while testing the GSC build container with simple client without Avalon.
Steps to reproduce
Build the avalon-python worker base image by following below steps
git clone https://github.com/hyperledger/avalon.git
cd avalon/tc/graphene/python_worker/
docker-compose build
builds the docker image avalon-python-worker-devgit clone https://github.com/gramineproject/graphene.git
cd Tools/gsc
cp config.yaml.template config.yaml
openssl genrsa -3 -out enclave-key.pem 3072
./gsc build --insecure-args avaolon-python-worker-dev test/ubuntu18.04-python3.manifest
./gsc sign-image avalon-python-worker-dev enclave-key.pem
docker run --device=/dev/sgx_enclave -it --entrypoint /bin/bash gsc-avalon-python-worker-dev
Next while testing the above GSC image without Avalon by following the steps
cd avalon/tc/graphene/python_worker/
docker-compose -f docker-compose.yaml -f compose/graphene-sgx.yaml up
During execution of docker command for testing Graphene GSC without Avalon, throws Function not implemented (src/ip.cpp:563) . Unable to locate the file src/ip.cpp file.
Content of graphene-sgx.yaml in the path
avalon/tc/graphene/python_worker/compose/graphene-sgx.yaml
is mentioned belowContent of modified python manifest file in the path
graphene/Tools/gsc/test/ubuntu18.04-python3.manifest
is mentioned below