Repository navigation
Description
Split from #4116.
The change bounds the session's stored answers, bounds the export queue and sets MALLOC_ARENA_MAX=2. Only a pod that runs for hours shows whether the working set stays flat and whether the glibc arenas were the cause. Why this part is deferred: it needs the merged image, a rollout, six hours of run and a read of the process maps in the pod. No offline test and no pull request settles it. Acceptance criteria: a pod of the merged image runs 6 hours and does not restart; container_memory_working_set_bytes of container service stays within 100 MiB of its value at the first hour, read in Grafana; the heap mappings of the process do not grow after the first hour, read from /proc/1/smaps; the pull request comments the Grafana panel and the map summary.
Proposed design
Problem statement
The Service working set grew 100 to 150 MiB each hour before the kernel killed the container (#4116). #4116 bounds the stored answers and the export queue. The Deployment sets no MALLOC_ARENA_MAX. Only a pod that runs for hours shows whether the growth stopped. This item records the six-hour live proof and names no cause.
Acceptance criteria
Requirement: Six-hour pod without restart
The live proof MUST show a six-hour-old pod of the merged image of #4116 with restart count 0 for container service.
Scenario: Six-hour age and restart count
- WHEN A person runs
kubectl -n devops describe pod <pod>on the runningroadmap-service-*pod six hours after its start. - THEN The
Start Timeis at least six hours before the read, and theRestart Countof containerserviceis 0.
Requirement: Working set drift within 100 MiB
The live proof MUST show that container_memory_working_set_bytes of container service at the sixth hour is within 100 MiB of its value at the first hour.
Scenario: First-hour and sixth-hour working set
- WHEN A person runs
max by (pod) (container_memory_working_set_bytes{namespace="devops", container="service", pod="<pod>"})in Grafana at the first hour and at the sixth hour. - THEN The absolute difference between the two values is at most 104857600 bytes.
Requirement: Anonymous mapping sum does not grow
The live proof MUST show no growth after the first hour in the sum of Rss over the /proc/1/smaps mappings with Anonymous above zero.
Scenario: First-hour and sixth-hour map sum
- WHEN A person runs
kubectl -n devops exec <pod> -c service -- cat /proc/1/smapsat the first hour and at the sixth hour, and sums theRssof each mapping withAnonymousabove zero. - THEN The sixth-hour sum is not greater than the first-hour sum.
Requirement: Arena variable absent
The live proof MUST show that container service runs with no MALLOC_ARENA_MAX set.
Scenario: Arena variable in the pod spec
- WHEN A person runs
kubectl -n devops get pod <pod> -o yamland reads theenvblock of containerservice. - THEN The
envblock of containerserviceholds noMALLOC_ARENA_MAX.
Requirement: No cause claimed
The live proof MUST record the two map sums as an observation and MUST NOT name the glibc arenas or another single cause of the growth.
Scenario: Evidence comment names no cause
- WHEN A person writes the evidence comment after the sixth-hour read.
- THEN The comment holds both map sums and names no arena or other single cause of the growth.
Requirement: Pending a person after the merge
A person SHALL comment the live evidence on the pull request after the pod of the merged image runs six hours.
Scenario: Six-hour evidence comment
- WHEN The pod of the merged image has run six hours, and the person holds the two working-set values, the two map sums and the
MALLOC_ARENA_MAXstate. - THEN The pull request holds a comment with the link to the
Memory: use, request and limitpanel of thedevops-roadmap-servicedashboard, the first-hour and sixth-hour working-set values, the two map sums, theMALLOC_ARENA_MAXstate andrestartCount=0.
Existing Tool Considered
No alternatives check has run on this issue. Prometheus, Grafana, kubectl and the kernel cover the need. The alert RoadmapServiceMemoryNearLimit reads container_memory_working_set_bytes{namespace="devops", pod=~"roadmap-service-.+", container="service"}. The Memory: use, request and limit panel of the devops-roadmap-service dashboard graphs the same series. /proc/1/smaps of the container holds the process mappings. These tools lack one combined verdict over the restart count, the two working-set values and the map sums. None compares a first-hour value with a sixth-hour value. The change builds no code, so it has no build cost. A new devops k8s roadmap-service-memory-check command would cost about 40k tokens to build, about 5k tokens each year to keep and fix, and about one day of elapsed time for a proof that runs once.
Key questions
- Which open tool reads the working set of container
serviceover six hours?: Prometheus holds the series and Grafana shows it. The alertRoadmapServiceMemoryNearLimitreadscontainer_memory_working_set_bytes{namespace="devops", pod=~"roadmap-service-.+", container="service"}. TheMemory: use, request and limitpanel of thedevops-roadmap-servicedashboard graphs the same series. [sources: k8s/devops/monitoring/prometheus-rules-values.yaml, docs/CLUSTER.md] - Does the Deployment set
MALLOC_ARENA_MAXfor containerservice?: No. Theenvblock of containerserviceholds noMALLOC_ARENA_MAX. The line in the issue body that says fix(service): roadmap-service is OOMKilled after hours #4116 sets the value is stale. [sources: k8s/devops/roadmap-service/deployment.yaml] - Which process does
/proc/1/smapsdescribe in containerservice?: PID 1 is thedevopsentrypoint that runsserve --service --workers 1. The images rundevopsas PID 1 with no init. The Service refuses more than one worker.UvicornStartercallsuvicorn.runin that same process. So the one process of the container holds the mappings. [sources: k8s/devops/roadmap-service/deployment.yaml, src/devops_cli/server/start.py:66] - Should the item add a
devops k8scommand for the six-hour proof, or use Grafana andkubectl?: Use Grafana andkubectl. The proof runs once. The metric and the kernel file cover it. AGENTS.md rule 3 asks for an open tool before new code. (best practice) [sources: AGENTS.md, k8s/devops/monitoring/prometheus-rules-values.yaml, docs/CLUSTER.md]- Chosen: Grafana query and
kubectl exec. The metric and the kernel file cover the proof, and the proof runs once, so it needs no new code. - Rejected: New
devops k8smemory-check command. It adds code that the project keeps and fixes for a proof that runs once. - Rejected: Only the
RoadmapServiceMemoryNearLimitalert. It fires at 85 percent of the limit and shows neither the drift nor the process maps.
- Chosen: Grafana query and
- Does the six-hour run show that the glibc arenas caused the growth?: No. The Deployment sets no arena variable, so the run has no arena setting to test. The proof records the two map sums as an observation and names no cause. (best practice) [sources: k8s/devops/roadmap-service/deployment.yaml]
- Chosen: Record the mappings and name no cause. The Deployment sets no arena limit, so one run cannot separate the arenas from the two bounds of fix(service): roadmap-service is OOMKilled after hours #4116.
- Rejected: Name the arenas as the cause. The proof has no measurement that separates the arenas from other allocations.
- Rejected: Run again with no arena variable. The Deployment sets no such variable, so there is nothing to remove, and a second run adds six hours.
- Which value is the baseline of the 100 MiB tolerance?: The value at the end of the first hour of the pod's run. Start-up allocations are then outside the window. The sixth-hour value is five hours later. (best practice) [sources: docs/CLUSTER.md, k8s/devops/roadmap-service/deployment.yaml]
- Chosen: First-hour value. It skips start-up growth and matches the acceptance criterion of the issue body.
- Rejected: Pod start value. Start-up allocations would count as growth and hide the steady state.
- Rejected: Median of the six hours. A slow rise moves the median and hides the growth.
- Which memory limit does the pod use during the six-hour check?: Container
servicerequests768Miand limits memory to3Gi. At the recorded growth of 100 to 150 MiB each hour, the pod stays below that limit during the six hours. So the kernel does not kill the container and the run is not cut short. [sources: k8s/devops/roadmap-service/deployment.yaml]
Fit
Fits in one pull request.
Suspected block
The pod must run six hours after the rollout of the merged image of #4116 before the sixth-hour readings exist.
Dependencies
Watched files
A commit on the default branch that changes one of these files starts the next refine round.
k8s/devops/roadmap-service/deployment.yaml
Activity
devops-cli-service commentedon Nov 8, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
testprefix of the title gives the type.(service)scope of the title gives the scope.The run confirms that the memory fix holds, but it does not block other work for six hours.The run gives evidence that the Service stops at a flat working set, and users gain stability.It needs a merged image, a rollout, six hours of run and manual reads of Grafana and /proc/1/smaps.Both items address the OOMKilled roadmap Service, but #4116 asks for the fix and the candidate asks for a six-hour runtime verification of that fix.[-]test(service): verify the roadmap Service working set stays flat over six hours[/-][+]test(service): Verify Service working set stays flat for six hours[/+]devops-cli-service commentedon Nov 8, 2026
The job shortened the title of this item. The summary had 64 characters, and the limit is 60. The type and the scope stay.
test(service): verify the roadmap Service working set stays flat over six hourstest(service): Verify Service working set stays flat for six hoursdevops-cli-service commentedon Nov 9, 2026
Refine cannot set this item to Ready at 719cd43 until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.
devops-cli-service commentedon Nov 20, 2026
Owner question: See Suspected block in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 21, 2026
Owner question: See Suspected block in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 26, 2026
Owner question: See Suspected block and Watched files in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 26, 2026
Owner question: See Suspected block and Watched files in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 29, 2026
Owner question: See Suspected block and Watched files in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence