Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

Python3 Error when running pytorch example under graphene sgx docker mode #2173

Closed
DRyan1995 opened this issue Feb 19, 2021 · 3 comments
Closed

Comments

@DRyan1995
Copy link

DRyan1995 commented Feb 19, 2021

Description of the problem

Got a python3 trusted file error when running the pytorch sgx example, see below:

graphene/Tools/gsc/test$ make test-12-ubuntu18.04
touch result.txt
docker run  --device=/dev/gsgx --device=/dev/isgx -v /var/run/aesmd/aesm.socket:/var/run/aesmd/aesm.socket -v${PWD}/result.txt:/graphene/Examples/result.txt gsc-ubuntu18.04-pytorch pytorchexample.py
+ '[' -z '' ']'
+ GSC_PAL=Linux-SGX
+ /graphene/python/graphene-sgx-get-token -output /entrypoint.token -sig /entrypoint.sig
Attributes:
    mr_enclave:  dee426c9859782bedc9a3279920ab0990bad00a014259e8883c3034d19fa7e0a
    mr_signer:   5f68a5e286653617cdeed0b0d3c51c633516c4397ca15999d689b85bbdd2f0e0
    isv_prod_id: 0
    isv_svn:     0
    attr.flags:  0600000000000000
    attr.xfrm:   1f00000000000000
    misc_select: 00000000
    misc_mask:   00000000
    modulus:     f3b9a7f8d4f270bf0c270dfdeb0f0468...
    exponent:    3
    signature:   05badcc1606deeafa394031f918ff946...
    date:        2021-02-19
+ /graphene/Runtime/pal-Linux-SGX /graphene/Runtime/libpal-Linux-SGX.so init /entrypoint pytorchexample.py
Accessing file:/python3 is denied (Operation denied). This file is not trusted or allowed. Trusted files should be regular files (seekable).
Accessing file:/python3 is denied (Operation denied). This file is not trusted or allowed. Trusted files should be regular files (seekable).
Accessing file:/python3 is denied (Operation denied). This file is not trusted or allowed. Trusted files should be regular files (seekable).
ERROR: Failed to load /python3. This may be caused by the binary being non-PIE, in which case Graphene requires a specially-crafted memory layout. You can enable it by adding 'sgx.nonpie_binary = 1' to the manifest.
Makefile:184: recipe for target 'test-12-ubuntu18.04' failed
make: *** [test-12-ubuntu18.04] Error 13

Steps to reproduce

Run make test-12-ubuntu18.04 under graphene/Tools/gsc/test

I am using the latest graphene driver master branch (commit 4386dbeb1260d8743ea3a5fbe4fc5fd61322008c) and graphene master branch (commit 36ccd3ea4c957c8ad8cb92cf0ba3697a3ab90e8b) fyi.

PLEASE ENSURE THAT THE ISSUE REPRODUCES ON THE CURRENT MASTER BRANCH

Expected results

Actual results

@dimakuv
Copy link

dimakuv commented Feb 19, 2021

This will be fixed by #2165.

Could you try this PR and reply if this works for you?

@DRyan1995
Copy link
Author

@dimakuv for sure

@DRyan1995
Copy link
Author

it worked! @dimakuv Thank you for your in-time response!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants