Skip to content

Confusing ERROR tracing when not actually an error #497

@ludfjig

Description

@ludfjig

https://github.com/ludfjig/hyperlight/blob/31bfc5a2f54e88d29e29388ac0a908d25f97fc19/src/hyperlight_common/src/flatbuffer_wrappers/guest_error.rs#L199

causes any failures to be logged with ERROR level. However, we use this function unconditionally to check whether an error occured or not here https://github.com/ludfjig/hyperlight/blob/31bfc5a2f54e88d29e29388ac0a908d25f97fc19/src/hyperlight_host/src/func/guest_err.rs#L28

Thus the function returning an Err does not necessarily mean an actual error occured.

The issue can be reproduced by running for example cargo run --package hyperlight-host --example logging and observing the error logs related to "pop_buffer_into". (NOT the executioncancelledbyhost errors)

  • The short term fix would be to remove the instrument macro on the functions that unconditionally return an error in the happy code path.
  • The long term fix would be to change the way we check if an error occured.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions