Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error: dlopen failed: /usr/lib/x86_64-linux-gnu/libsgx_dcap_ql.so.1 #2

Open
v13s opened this issue Mar 2, 2021 · 6 comments
Open

Comments

@v13s
Copy link

v13s commented Mar 2, 2021

I am using Standard DC1s_v2 (1 vcpus, 4 GiB memory) VM on AZURE with Linux (ubuntu 20.04) Gen 2 (pro-20_04-lts-gen2) image.
Following steps were performed in order:

Commands


git clone https://github.com/R3Conclave/cordacon-conclave-tutorial.git

./gradlew clean
./gradlew host:shadowJar

cp host/build/libs/host-all.jar /opt
chmod 777 -R host-all.jar

java -jar host-all.jar 8080

Following error was received after last command (java -jar):

dlopen failed: /usr/lib/x86_64-linux-gnu/libsgx_dcap_ql.so.1
dlopen failed: /usr/lib/x86_64-linux-gnu/libdcap_quoteprov.so.1

A fatal error has been detected by the Java Runtime Environment:

SIGSEGV (0xb) at pc=0x00007fa650f8f300, pid=27865, tid=27866

JRE version: OpenJDK Runtime Environment (11.0.10+9) (build 11.0.10+9-Ubuntu-0ubuntu1.20.04)
Java VM: OpenJDK 64-Bit Server VM (11.0.10+9-Ubuntu-0ubuntu1.20.04, mixed mode, sharing, tiered, compressed oops, serial gc, linux-amd64)
Problematic frame:
C [libjvm_host.so+0x25300] r3::conclave::dcap::QuotingAPI::~QuotingAPI()+0x26

Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P %E" (or dumping to /home/blockadmin/core.27865)

An error report file with more information is saved as:
/home/blockadmin/hs_err_pid27865.log

If you would like to submit a bug report, please visit:
https://bugs.launchpad.net/ubuntu/+source/openjdk-lts
The crash happened outside the Java Virtual Machine in native code.
See problematic frame for where to report the bug.

Aborted (core dumped)


@shamsasari : Does the SGX VM need any further configuration before we can use it? Like SGX build or installation etc?

Request your help with the same.

@shamsasari
Copy link
Contributor

@deniszhereschinr3 any ideas?

@shamsasari
Copy link
Contributor

Can you confirm you followed the steps in https://docs.conclave.net/azure.html.

@deniszhereschinr3
Copy link

DCAP libs and QuoteProvider are not installed.
And this repo is using Conclave SDK Beta 4.
The issue is addressed at is is addressed at Conclave SDK v1.0
i'll update this repo to use v1.

@v13s
Copy link
Author

v13s commented Mar 12, 2021

I tried using the ConclaveSDK v1.0, but it doesn't have
com.r3.conclave.mail.Curve25519KeyPairGenerator
com.r3.conclave.mail.MutableMail
com.r3.conclave.host.EnclaveHost.MailCallbacks

@shamsasari @deniszhereschinr3 any suggestions there?

@deniszhereschinr3
Copy link

@v13s Glad you got the same results I have - yes, the Mail API has changed. We are working on it.

Meanwhile you can still use Beta4 with extra bits installed on your box:

Add 01.org to apt for SGX packages

echo "deb [arch=amd64] https://download.01.org/intel-sgx/sgx_repo/ubuntu bionic main" >> /etc/apt/sources.list.d/intel-sgx.list
wget -qO - https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | apt-key add -
apt-get update

Install SGX runtime components

apt-get install -y -q libsgx-quote-ex libsgx-urts

Install SGX DCAP SDK

apt-get install -y -q libsgx-dcap-ql libsgx-dcap-ql-dev

install Azure plugin (this should work on Ubuntu 20)

wget https://packages.microsoft.com/ubuntu/18.04/prod/pool/main/a/az-dcap-client/az-dcap-client_1.6_amd64.deb
dpkg -i az-dcap-client_1.6_amd64.deb

symlink

ln -s /usr/lib/libdcap_quoteprov.so /usr/lib/x86_64-linux-gnu/libdcap_quoteprov.so.1

@v13s
Copy link
Author

v13s commented Mar 13, 2021

thanks @deniszhereschinr3 it works!! I did the steps you mentioned and it worked.

Since I am using Azure SGX compliant server, can I run it in secure mode? I tried setting default mode to 'release' in host/build.gradle file but it failed. It works with both 'debug' and 'simulation' mode.

Any help would be highly appreciated.

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

No branches or pull requests

3 participants