Skip to content

Sandbox disallowed syscall 318 (getrandom) #881

@dblnz

Description

@dblnz

What happened?

The sandbox crashes when enabling trace level Trace for hyperlight-host and running tracing-otlp example.
This happens in other circumstances when using the Trace log level for hyperlight-host.

What did you expect to happen?

The expected behavior is for the sandbox to run and produce correct Trace spans/events.

Steps to reproduce the behavior

$ RUST_LOG='info,hyperlight_host=trace,hyperlight_host::sandbox=info,hyperlight_host::hypervisor=info,hyperlight_host::sandbox=info,hyperlight_guest=info,hyperlight_guest_bin=info' cargo run --example tracing-otlp
   Compiling hyperlight-host v0.9.0 (/home/dblnz/workspace/msft/hyperlight/src/hyperlight_host)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 6.29s
     Running `target/debug/examples/tracing-otlp`
Press enter to exit...
[ERROR][HYPERLIGHT] Handling disallowed syscall
[ERROR][HYPERLIGHT] Disallowed Syscall: 318
[1]    447480 segmentation fault (core dumped)  RUST_LOG= cargo run --example tracing-otlp

Hyperlight Version

0.9.0

OS version

On Linux:
$ cat /etc/os-release
PRETTY_NAME="Ubuntu 24.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.3 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo

$ uname -a
Linux laptop 6.6.87.2-microsoft-standard-WSL2 #1 SMP PREEMPT_DYNAMIC Thu Jun  5 18:30:46 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

On Windows:
C:\> cmd /c ver
# paste output here

Additional Information

This issues seems to be created by the tracing crate when it tries to generate a random ID.

Image

Metadata

Metadata

Labels

lifecycle/confirmedBug is verified or proposal seems reasonable

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions