Problem with Enclave Creation in simulation mode
Ubuntu 16.04 LTE Non-Intel processor on computer Intel SGX installed
Results of running /src/bin/testnet/teechain_deposits.sh:
~/Desktop/Teechain-master/src/bin/testnet$ ./teechain_deposits.sh
Mounting a RAM disk for server output in test directory!
~/Desktop/Teechain-master/src ~/Desktop/Teechain-master/src/bin/testnet
Starting two ghost teechain enclaves...
Spawning enclave ALICE listening on port 10001 in bin/testnet/test/alice.txt
Spawning enclave BOB listening on port 10002 in bin/testnet/test/bob.txt
Waiting until enclaves are initialized ...!.........................................................................................................................................................................................................
So far the enclave is not being created and the teechain_deposits.sh is stuck in this loop.
I see that because the alice.txt nor bob.txt has not added "Enclave created", then line 42 fails to break out of the while loop.
I tried manually executing line 49 to see what happens (./teechain primary -p $ALICE_PORT) and I received:
./teechain: error while loading shared libraries: libsgx_urts_sim.so: cannot open shared object file: No such file or directory
Which leads me to believe that there is possibly something wrong with my installation/configuration of the Intel SGX simulation mode.
I will provide updates as I continue looking at this, any further insight would be appreciated.
The SGX tests worked properly:
user@computer:~/Desktop/linux-sgx-sgx_2.1/SampleCode/LocalAttestation$ ./app
Available Enclaves
Enclave1 - EnclaveID ef800000002
Enclave2 - EnclaveID ef800000003
Enclave3 - EnclaveID ef800000004
Secure Channel Establishment between Source (E1) and Destination (E2) Enclaves successful !!!
Enclave to Enclave Call between Source (E1) and Destination (E2) Enclaves successful !!!
Message Exchange between Source (E1) and Destination (E2) Enclaves successful !!!
Secure Channel Establishment between Source (E1) and Destination (E3) Enclaves successful !!!
Enclave to Enclave Call between Source (E1) and Destination (E3) Enclaves successful !!!
Message Exchange between Source (E1) and Destination (E3) Enclaves successful !!!
Secure Channel Establishment between Source (E2) and Destination (E3) Enclaves successful !!!
Enclave to Enclave Call between Source (E2) and Destination (E3) Enclaves successful !!!
Message Exchange between Source (E2) and Destination (E3) Enclaves successful !!!
Secure Channel Establishment between Source (E3) and Destination (E1) Enclaves successful !!!
Enclave to Enclave Call between Source (E3) and Destination (E1) Enclaves successful !!!
Message Exchange between Source (E3) and Destination (E1) Enclaves successful !!!
Close Session between Source (E1) and Destination (E2) Enclaves successful !!!
Close Session between Source (E1) and Destination (E3) Enclaves successful !!!
Close Session between Source (E2) and Destination (E3) Enclaves successful !!!
Close Session between Source (E3) and Destination (E1) Enclaves successful !!!
Hit a key....
However, when running teechain_send.sh I receive seg faults:
user@computer:~/Desktop/Teechain-master/src/bin/testnet$ ./teechain_send.sh
Mounting a RAM disk for server output in test directory!
~/Desktop/Teechain-master/src ~/Desktop/Teechain-master/src/bin/testnet
Starting two ghost teechain enclaves...
Spawning enclave ALICE listening on port 10001 in bin/testnet/test/alice.txt
./teechain_send.sh: line 34: 4204 Segmentation fault (core dumped) ./teechain ghost -d -p $ALICE_PORT > $ALICE_LOG 2>&1
Spawning enclave BOB listening on port 10002 in bin/testnet/test/bob.txt
./teechain_send.sh: line 38: 4208 Segmentation fault (core dumped) ./teechain ghost -d -p $BOB_PORT > $BOB_LOG 2>&1
Waiting until enclaves are initialized ...!.....................^C
The computer I am running this on has 8GB of ram, I recall reading that the seg faults are usually due to too little ram.