Skip to content

Sandbox disallowed syscall 318 (getrandom) #881

Closed

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

Details
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

Activity

  1. added theissue type on Sep 10, 2025
  2. jprendes commented on Sep 10, 2025

    @jprendes
    Contributor

    On ArchLinux I'm getting syscall 16, IOCTL, it happens when using the default HostPrint, when it's trying to detect is it's a terminal to decide to use colors or not.

  3. added
    lifecycle/confirmedBug is verified or proposal seems reasonable
    and removed on Oct 1, 2025
  4. added this to the v0.11.0 milestone on Oct 1, 2025
  5. dblnz commented on Oct 23, 2025

    @dblnz
    ContributorAuthor

    Without the seccomp feature removed by #970 this won't happen any more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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