Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update test_deflate_on_oom test #4880

Merged

Conversation

JackThomson2
Copy link
Contributor

@JackThomson2 JackThomson2 commented Oct 29, 2024

Updated the deflate on oom test to attempt to increase stability of the test.

Making the a balloon less aggressive size, but allocating a larger chunk of memory, we are still able to test the functionality of the balloon device (it will deflate if the flag is enabled and not if disabled.) With this setup it means the guest is less likely to crash and cause the test to fail

I ran the flaky test look as seen here: https://github.com/firecracker-microvm/firecracker/tree/main/tests#how-to-reproduce-intermittent-aka-flaky-tests for over an hour on my machine with no failures

Changes

Altered configuration of the balloon deflate on oom tests

Reason

Attempt to fix deflate on oom flaky test

License Acceptance

By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following Developer
Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md.

PR Checklist

  • If a specific issue led to this PR, this PR closes the issue.
  • The description of changes is clear and encompassing.
  • Any required documentation changes (code and docs) are included in this
    PR.
  • API changes follow the Runbook for Firecracker API changes.
  • User-facing changes are mentioned in CHANGELOG.md.
  • All added/changed functionality is tested.
  • New TODOs link to an issue.
  • Commits meet
    contribution quality standards.

  • This functionality cannot be added in rust-vmm.

Updated the deflate on oom test to increase stability of the test.
Making the balloon smaller and the allocation larger.

Signed-off-by: Jack Thomson <[email protected]>
Copy link

codecov bot commented Oct 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.05%. Comparing base (579ff75) to head (979bd95).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4880   +/-   ##
=======================================
  Coverage   84.05%   84.05%           
=======================================
  Files         251      251           
  Lines       28096    28096           
=======================================
  Hits        23616    23616           
  Misses       4480     4480           
Flag Coverage Δ
5.10-c5n.metal 84.68% <ø> (ø)
5.10-m5n.metal 84.66% <ø> (-0.01%) ⬇️
5.10-m6a.metal 83.96% <ø> (-0.01%) ⬇️
5.10-m6g.metal 80.73% <ø> (ø)
5.10-m6i.metal 84.66% <ø> (ø)
5.10-m7g.metal 80.73% <ø> (ø)
6.1-c5n.metal 84.68% <ø> (ø)
6.1-m5n.metal 84.66% <ø> (-0.01%) ⬇️
6.1-m6a.metal 83.96% <ø> (ø)
6.1-m6g.metal 80.73% <ø> (ø)
6.1-m6i.metal 84.65% <ø> (-0.01%) ⬇️
6.1-m7g.metal 80.73% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JackThomson2 JackThomson2 marked this pull request as ready for review October 29, 2024 15:50
@JackThomson2 JackThomson2 added the Status: Awaiting review Indicates that a pull request is ready to be reviewed label Oct 29, 2024
@ShadowCurse ShadowCurse merged commit 4f3d8cd into firecracker-microvm:main Oct 29, 2024
7 of 8 checks passed
Copy link
Contributor

@Manciukic Manciukic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran the flaky test look as seen here: https://github.com/firecracker-microvm/firecracker/tree/main/tests#how-to-reproduce-intermittent-aka-flaky-tests for over an hour on my machine with no failures

how many failures were there before the change?

# get a lower reading than the initial one.
initial_rss = get_stable_rss_mem_by_pid(firecracker_pid)
inflate_size = 256 - int(initial_rss / 1024) + 10
inflate_size = 256 - (int(initial_rss / 1024) + 50)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this changes the sign of the offset, meaning we are inflating 60MiB less rather than 40MiB more as the comment suggests. Or am I misreading?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah intended to be 60mb less now as I think we want to test if the balloon will deflate on the oom kiiler. So we allocate more memory now which will trigger the oom killer and check if the balloon behaves as we expect.

I think I'd read the comment wrong, I'd read it as its the initial memory usage + 10 (now 50) taken away from overall guest memory

@JackThomson2
Copy link
Contributor Author

I ran the flaky test look as seen here: https://github.com/firecracker-microvm/firecracker/tree/main/tests#how-to-reproduce-intermittent-aka-flaky-tests for over an hour on my machine with no failures

how many failures were there before the change?

With the previous setup it would fail on my machine within a couple of iterations, but was fairly random

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Awaiting review Indicates that a pull request is ready to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants