Repository navigation
Conversation
Carry MemAvailable and PSI full avg10 on MemoryPressure, bump PROTOCOL to 6, log the readings behind a memory kill (with killed_by=kernel vs kiri from evidence), deflate the balloon before reporting a macOS memory stop, and attribute operation-issued stops to their op.
This was referenced Nov 18, 2026
Owner
|
@meutex thank you for this pull request. Before we can review and merge it, its commits need to be signed and show as Verified on GitHub. Right now they are not. To fix it:
It also conflicts with We only merge pull requests where every commit is verified. Once that shows, we will pick it up. |
meutex
force-pushed
the
meutex/1794928290-log-memory-kill-numbers
branch
from
November 21, 2026 03:55
f5dd684 to
3932e4a
Compare
Contributor
Author
|
Hi @libracoder , thanks for the clear instructions! I’ve set up commit signing, re-signed all the commits, and force-pushed the branch. Every commit should now show as Verified. Let me know if anything else is needed for the review. |
Owner
Contributor
Author
|
Thanks @libracoder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
As a Kiri user running a Kubernetes cluster in the VM, I want a container that stops for memory to be logged with the figures that explain it — the guest's MemAvailable, the balloon size and the PSI — and attributed to the operation that caused it, so that I can tell a real out-of-memory kill from Kiri's own restart without guessing.
Change
Kiri's daemon currently logs 'container killed for memory' with no figures and no way to tell a real out-of-memory kill from a stop Kiri issued itself during a requested operation, so a Kubernetes node that dies twice in ten minutes cannot be diagnosed. This change makes every memory-driven stop explainable: the log carries the guest's MemAvailable, the balloon's size and the VM's target and ceiling, PSI, the exit code, and whether the kernel or Kiri made the call — while a stop that belongs to restartvm, kiri k8s set or a recreate is logged as that operation. It also guarantees the balloon deflates fully before Kiri stops anything for memory, which gives a cluster squeezed by the balloon (the #210 shape of the problem) every available byte before a kill.
kiri k8s set, or any recreate — is logged with that operation named in the message and keeps its op id, and does not carry the 'killed for memory' message or the memory fields unless the guest reported OOM or memory pressure at that moment.tests/linux-host.shstill passes.cargo fmt --check,cargo clippyandcargo testpass, andtests/e2e.shpasses against a runningkiri daemonon macOS; the Kubernetes path is exercised withK8S=1 tests/e2e.shif it runs in reasonable time.python3 scripts/ui-test.pystill passes with no new entry in tests/ui/parity-allow.txt.Testing
cd /code && cargo fmt --check 2>&1 | grep -E "^Diff in" | sort -u
exit=0
Fixes #474