Replacing Vec
with SmallVec
causes CMBC's memory usage to grow unboundedly during post-processing
#2944
Labels
[C] Bug
This is a bug. Something isn't working.
[E] Performance
Track performance improvement (Time / Memory / CPU)
T-User
Tag user issues / requests
Hi all,
Over at Firecracker we recently had to make some changes to our virtio code (which is covered by kani harnesses). As part of this, we replaced a
Vec
with aSmallVec
for performance reasons (as descriptor chains heuristically are "short", so by using a SmallVec we can avoid an allocation most of the time). However, the harnesses at https://github.com/firecracker-microvm/firecracker/blob/main/src/vmm/src/devices/virtio/iovec.rs#L714 started timing out in our CI after that. Investigating manually showed that after the Symex step, Kani seemingly gets stuck in its post-processing phase, where CMBC just slowly uses more and more RAM until the system locks up.To reproduce, remove the
cfg
directives at https://github.com/firecracker-microvm/firecracker/blob/036d9906a09ed759597ee88bab6c1278e4fd7655/src/vmm/src/devices/virtio/iovec.rs#L28-L31 and try to run the iovec harnesses.Command line invocation:
Kani version: 0.41.0
The text was updated successfully, but these errors were encountered: