Skip to content

Debug is enabled but there is no output #273

@Rlyown

Description

@Rlyown

Issue description

Hi,

When I run my application, I encounter the following error message. I have set "debug": true in enclave.json, but it didn't work for me.

ERROR: Invalid exception occurred. The enclave is aborting. [openenclave-src/host/sgx/exception.c:oe_host_handle_exception:111]
ERROR: Unhandled in-enclave exception. To get more information, configure the enclave with CapturePFGPExceptions=1 and enable the in-enclave logging. [openenclave-src/host/sgx/linux/exception.c:_host_signal_handler:101]
ERROR: signal: segmentation fault (core dumped)

I also tried https://docs.edgeless.systems/ego/reference/config#advanced-users-tweak-underlying-enclave-configuration, it didn't work too.

This my enclave.json

{
  "exe": "test",
  "key": "private.pem",
  "debug": true,
  "heapSize": 2048,
  "executableHeap": false,
  "productID": 1,
  "securityVersion": 1
}

And this is the enclave.conf.

Debug=1
NumHeapPages=131072
NumStackPages=1024
NumTCS=32
ProductID=1
SecurityVersion=1
CapturePFGPExceptions=1

Could anyone give me some advice to debug this?

To reproduce

Steps to reproduce the behavior:

  1. ego-go build test.go
  2. ego sign
  3. /snap/ego-dev/current/opt/ego/bin/ego-oesign sign -e /snap/ego-dev/current/opt/ego/share/ego-enclave -c enclave.conf -k private.pem --payload test
  4. ego run test
  5. ./test

By the way, in step 4, I got segmentation fault. But in step 5, the application executes normally.

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