Skip to content

Sandbox state is not correctly restored under certain error conditions #710

@jprendes

Description

@jprendes

I tried making the test a bit more complex, where the guest tries to access an mmap buffer that hasn't been mapped by the host.
That guest function call fails with Err(Error("MMIO access address 0x100000000")) as expected, but then the sandbox seem to be left in a bad state even after the state is restored from the last snapshot.

Subsequent call (a simple PrintOutput call in this case) fails with

Err(GuestAborted(8, "panicked at /home/jprendes/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/flatbuffers-25.2.10/src/endian_scalar.rs:142:5:\ninsufficient capacity for emplace_scalar, needed 1 got 0"))

I think there must be some sandbox state we aren't correctly restoring after a guest call fails with certain modes.

Originally posted by @jprendes in #709 (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