You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
docker: the compatibility check's output capture holds memory in proportion to its limit #416
Backend (server/): affected in tooling only. createBoundedOutputCapture in server/src/sv2-app-config-compatibility.ts keeps the start and the end of a check container's output within a character limit. The start it keeps is built from slices of the large string that holds the end, and each slice keeps that whole string alive, so many small writes after a large one hold many copies of it. The check runs only as npm run check:sv2-app-config, in CI on every PR and in the Docker release workflow; the running app never calls it.
Frontend (src/): not affected.
shared/: not affected.
The output comes from the selected sv2-apps images; nothing changes there.
Problem
Reproduced on main at ed7d84b with the Loupe test under Node 24: 512 KiB of output followed by 512 writes of 64 bytes, 544 KiB in all and within the capture's limit of about 1 MiB, exhausts a 128 MiB heap.
Impact
Only an sv2-apps image that prints such output can trigger it, and whoever controls that image already controls the mining containers of everyone who runs it. The effect is a compatibility check that crashes instead of reporting, failing the CI job or the release workflow. Loupe rates it low.
Expected outcome
The memory the output capture holds stays within a small multiple of its limit, whatever sizes the container writes in.
What the capture reports, the start and end of the output and the count of dropped characters, is unchanged.
Loupe findings
project-loupe/audit-sv2-ui#115: the start of the capture keeps slices of large output strings alive
Activity