Skip to content

perf(storage): release frame input buffers per goroutine#2869

Merged
ValentaTomas merged 1 commit into
valenta/storage-upload-copy-reductionfrom
lev-frame-input-cleanup
May 31, 2026
Merged

perf(storage): release frame input buffers per goroutine#2869
ValentaTomas merged 1 commit into
valenta/storage-upload-copy-reductionfrom
lev-frame-input-cleanup

Conversation

@levb
Copy link
Copy Markdown
Contributor

@levb levb commented May 30, 2026

Move buffer ownership into the compression goroutine: the goroutine that reads bufPtr also returns it to inputPool via defer when it exits. Drops frame.input, part.releaseInputBuffers, and the explicit release calls in the read/upload loops.

The previous checkpoint design held every part's input buffers until p.compress.Wait() returned in the upload loop, so buffers stayed pinned across the GCS upload latency. The pool kept missing and calling New, leaving allocations on par with or worse than no pool at all. Now, per-goroutine release caps the pool's working set at workers+1 regardless of stream length, so allocations and peak heap actually shrink.

Adds compress_upload_pool_demo_test.go (delete before merge) that mirrors the pre-PR-2863 and PR #2863 designs verbatim and runs them side-by-side with the real compressStream from this branch on 256 MiB and 1 GiB inputs with a simulated 500 ms per-part upload latency.

go test -run TestPoolLifecycleDemo -v -timeout=10m -count=1 ./packages/shared/pkg/storage/ 2>&1
=== RUN   TestPoolLifecycleDemo
=== RUN   TestPoolLifecycleDemo/256MiB
    compress_upload_pool_demo_test.go:473: input=256 MiB, frame=2048 KiB, part=50 MiB, workers=4, upload_delay=500ms
    compress_upload_pool_demo_test.go:524: main         (no pool)         : total_alloc=  668.0 MiB  mallocs=  2037  heap_inuse_after=  837.9 MiB
    compress_upload_pool_demo_test.go:524: tomas (PR #2863, checkpoint)  : total_alloc=  689.5 MiB  mallocs=  2281  heap_inuse_after=  953.7 MiB
    compress_upload_pool_demo_test.go:524: this branch (per-goroutine)   : total_alloc=  370.2 MiB  mallocs=  1430  heap_inuse_after=  638.6 MiB
    compress_upload_pool_demo_test.go:527: ---
    compress_upload_pool_demo_test.go:528: tomas vs main:  total_alloc   +21.6 MiB  mallocs  +244  heap_inuse  +115.9 MiB
    compress_upload_pool_demo_test.go:532: branch vs main: total_alloc  -297.8 MiB  mallocs  -607  heap_inuse  -199.2 MiB
    compress_upload_pool_demo_test.go:536: branch vs tomas:total_alloc  -319.4 MiB  mallocs  -851  heap_inuse  -315.1 MiB
=== RUN   TestPoolLifecycleDemo/1024MiB
    compress_upload_pool_demo_test.go:473: input=1024 MiB, frame=2048 KiB, part=50 MiB, workers=4, upload_delay=500ms
    compress_upload_pool_demo_test.go:524: main         (no pool)         : total_alloc= 2341.9 MiB  mallocs=  4794  heap_inuse_after= 2986.0 MiB
    compress_upload_pool_demo_test.go:524: tomas (PR #2863, checkpoint)  : total_alloc= 2417.5 MiB  mallocs=  5895  heap_inuse_after= 3462.5 MiB
    compress_upload_pool_demo_test.go:524: this branch (per-goroutine)   : total_alloc= 1334.3 MiB  mallocs=  4367  heap_inuse_after= 2396.1 MiB
    compress_upload_pool_demo_test.go:527: ---
    compress_upload_pool_demo_test.go:528: tomas vs main:  total_alloc   +75.6 MiB  mallocs +1101  heap_inuse  +476.5 MiB
    compress_upload_pool_demo_test.go:532: branch vs main: total_alloc -1007.7 MiB  mallocs  -427  heap_inuse  -589.9 MiB
    compress_upload_pool_demo_test.go:536: branch vs tomas:total_alloc -1083.3 MiB  mallocs -1528  heap_inuse -1066.4 MiB
--- PASS: TestPoolLifecycleDemo (6.48s)
    --- PASS: TestPoolLifecycleDemo/256MiB (2.20s)
    --- PASS: TestPoolLifecycleDemo/1024MiB (4.29s)
PASS
ok  	github.com/e2b-dev/infra/packages/shared/pkg/storage	6.956s

Move buffer ownership into the compression goroutine: the goroutine that
reads bufPtr also returns it to inputPool via defer when it exits. Drops
frame.input, part.releaseInputBuffers, and the explicit release calls in
the read/upload loops.

The previous checkpoint design held every part's input buffers until
p.compress.Wait() returned in the upload loop, so buffers stayed pinned
across the GCS upload latency. The pool kept missing and
calling New, leaving allocations on par with or worse than no pool at
all. Per-goroutine release caps the pool's working set at workers+1
regardless of stream length, so allocations and peak heap actually
shrink.

Adds compress_upload_pool_demo_test.go (delete before merge) that mirrors
the pre-PR-2863 and PR #2863 designs verbatim and runs them side-by-side
with the real compressStream from this branch on 256 MiB and 1 GiB
inputs with a simulated 500 ms per-part upload latency.

```
go test -run TestPoolLifecycleDemo -v -timeout=10m -count=1 ./packages/shared/pkg/storage/ 2>&1
=== RUN   TestPoolLifecycleDemo
=== RUN   TestPoolLifecycleDemo/256MiB
    compress_upload_pool_demo_test.go:473: input=256 MiB, frame=2048 KiB, part=50 MiB, workers=4, upload_delay=500ms
    compress_upload_pool_demo_test.go:524: main         (no pool)         : total_alloc=  668.0 MiB  mallocs=  2037  heap_inuse_after=  837.9 MiB
    compress_upload_pool_demo_test.go:524: tomas (PR #2863, checkpoint)  : total_alloc=  689.5 MiB  mallocs=  2281  heap_inuse_after=  953.7 MiB
    compress_upload_pool_demo_test.go:524: this branch (per-goroutine)   : total_alloc=  370.2 MiB  mallocs=  1430  heap_inuse_after=  638.6 MiB
    compress_upload_pool_demo_test.go:527: ---
    compress_upload_pool_demo_test.go:528: tomas vs main:  total_alloc   +21.6 MiB  mallocs  +244  heap_inuse  +115.9 MiB
    compress_upload_pool_demo_test.go:532: branch vs main: total_alloc  -297.8 MiB  mallocs  -607  heap_inuse  -199.2 MiB
    compress_upload_pool_demo_test.go:536: branch vs tomas:total_alloc  -319.4 MiB  mallocs  -851  heap_inuse  -315.1 MiB
=== RUN   TestPoolLifecycleDemo/1024MiB
    compress_upload_pool_demo_test.go:473: input=1024 MiB, frame=2048 KiB, part=50 MiB, workers=4, upload_delay=500ms
    compress_upload_pool_demo_test.go:524: main         (no pool)         : total_alloc= 2341.9 MiB  mallocs=  4794  heap_inuse_after= 2986.0 MiB
    compress_upload_pool_demo_test.go:524: tomas (PR #2863, checkpoint)  : total_alloc= 2417.5 MiB  mallocs=  5895  heap_inuse_after= 3462.5 MiB
    compress_upload_pool_demo_test.go:524: this branch (per-goroutine)   : total_alloc= 1334.3 MiB  mallocs=  4367  heap_inuse_after= 2396.1 MiB
    compress_upload_pool_demo_test.go:527: ---
    compress_upload_pool_demo_test.go:528: tomas vs main:  total_alloc   +75.6 MiB  mallocs +1101  heap_inuse  +476.5 MiB
    compress_upload_pool_demo_test.go:532: branch vs main: total_alloc -1007.7 MiB  mallocs  -427  heap_inuse  -589.9 MiB
    compress_upload_pool_demo_test.go:536: branch vs tomas:total_alloc -1083.3 MiB  mallocs -1528  heap_inuse -1066.4 MiB
--- PASS: TestPoolLifecycleDemo (6.48s)
    --- PASS: TestPoolLifecycleDemo/256MiB (2.20s)
    --- PASS: TestPoolLifecycleDemo/1024MiB (4.29s)
PASS
ok  	github.com/e2b-dev/infra/packages/shared/pkg/storage	6.956s
```
@codecov
Copy link
Copy Markdown

codecov Bot commented May 30, 2026

❌ 3 Tests Failed:

Tests completed Failed Passed Skipped
2698 3 2695 7
View the full list of 6 ❄️ flaky test(s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestAssignmentOrderingLatestWins

Flake rate in main: 42.23% (Passed 725 times, Failed 530 times)

Stack Traces | 45.1s run time
=== RUN   TestAssignmentOrderingLatestWins
=== PAUSE TestAssignmentOrderingLatestWins
=== CONT  TestAssignmentOrderingLatestWins
    template_tags_test.go:522: Build failed: {<nil> An internal error occurred. Please try again or contact support with the build ID. <nil>}
--- FAIL: TestAssignmentOrderingLatestWins (45.08s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateBuildRUN

Flake rate in main: 42.29% (Passed 726 times, Failed 532 times)

Stack Traces | 0s run time
=== RUN   TestTemplateBuildRUN
=== PAUSE TestTemplateBuildRUN
=== CONT  TestTemplateBuildRUN
--- FAIL: TestTemplateBuildRUN (0.00s)
github.com/e2b-dev/infra/tests/integration/internal/tests/api/templates::TestTemplateBuildRUN/Single_RUN_command

Flake rate in main: 42.29% (Passed 726 times, Failed 532 times)

Stack Traces | 45.8s run time
=== RUN   TestTemplateBuildRUN/Single_RUN_command
=== PAUSE TestTemplateBuildRUN/Single_RUN_command
=== CONT  TestTemplateBuildRUN/Single_RUN_command
    build_template_test.go:133: test-ubuntu-run: [info] Building template j9feagdvbs57jr3jlbzp/7c105795-89ff-48f1-a128-e94892d2e47c
    build_template_test.go:133: test-ubuntu-run: [info] [base] FROM ubuntu:22.04 [853db866ee97500d93b96c12372d9b297568ba646efed473c099998ba016e737]
    build_template_test.go:133: test-ubuntu-run: [info] Base Docker image size: 30 MB
    build_template_test.go:133: test-ubuntu-run: [info] Creating file system and pulling Docker image
    build_template_test.go:133: test-ubuntu-run: [info] Uncompressing layer sha256:40d16f30db405106ef8074779bdf41f012465c2a785bbeaa2eab9f2081099b47 30 MB
    build_template_test.go:133: test-ubuntu-run: [info] Uncompressing layer sha256:ecebc6dd54a34fd88738edb5a665321feee72945deacf931c91702fda01a73b3 16 MB
    build_template_test.go:133: test-ubuntu-run: [info] Uncompressing layer sha256:8c4b1b28875140ed3abacaf16ad0d696f6bef912f52d2148f261a23e3349465b 168 B
    build_template_test.go:133: test-ubuntu-run: [info] Layers extracted
    build_template_test.go:133: test-ubuntu-run: [info] Root filesystem structure: bin, boot, dev, etc, home, lib, lib32, lib64, libx32, media, mnt, opt, proc, root, run, sbin, srv, sys, tmp, usr, var
    build_template_test.go:133: test-ubuntu-run: [error] Build failed: An internal error occurred. Please try again or contact support with the build ID.
    build_template_test.go:166: Build failed: {<nil> An internal error occurred. Please try again or contact support with the build ID. <nil>}
--- FAIL: TestTemplateBuildRUN/Single_RUN_command (45.82s)
github.com/e2b-dev/infra/tests/integration/internal/tests/orchestrator::TestSandboxMemoryIntegrity

Flake rate in main: 57.74% (Passed 732 times, Failed 1000 times)

Stack Traces | 67.2s run time
=== RUN   TestSandboxMemoryIntegrity
=== PAUSE TestSandboxMemoryIntegrity
=== CONT  TestSandboxMemoryIntegrity
    sandbox_memory_integrity_test.go:27: Build completed successfully
--- FAIL: TestSandboxMemoryIntegrity (67.17s)
github.com/e2b-dev/infra/tests/integration/internal/tests/orchestrator::TestSandboxMemoryIntegrity/tmpfs_hash

Flake rate in main: 57.85% (Passed 722 times, Failed 991 times)

Stack Traces | 230s run time
=== RUN   TestSandboxMemoryIntegrity/tmpfs_hash
=== PAUSE TestSandboxMemoryIntegrity/tmpfs_hash
=== CONT  TestSandboxMemoryIntegrity/tmpfs_hash
    sandbox_memory_integrity_test.go:70: Command [bash] output: event:{start:{pid:1252}}
    sandbox_memory_integrity_test.go:70: Command [bash] output: event:{data:{stdout:"Total memory: 985 MB\nUsed memory before tmpfs mount: 189 MB\nFree memory before tmpfs mount: 795 MB\nMemory to use in integrity test (60% of free, min 64MB): 477 MB\n"}}
    sandbox_memory_integrity_test.go:70: Command [bash] output: event:{data:{stderr:"477+0 records in\n477+0 records out\n500170752 bytes (500 MB, 477 MiB) copied, 2.13918 s, 234 MB/s\n"}}
    sandbox_memory_integrity_test.go:70: Command [bash] output: event:{data:{stderr:"\tCommand being timed: \"dd if=/dev/urandom of=/mnt/testfile bs=1M count=477\"\n\tUser time (seconds): 0.00\n\tSystem tim"}}
    sandbox_memory_integrity_test.go:70: Command [bash] output: event:{data:{stderr:"e (seconds): 2.09\n\t"}}
    sandbox_memory_integrity_test.go:70: Command [bash] output: event:{data:{stderr:"Percent of"}}
    sandbox_memory_integrity_test.go:70: Command [bash] output: event:{data:{stderr:" CPU thi"}}
    sandbox_memory_integrity_test.go:70: Command [bash] output: event:{data:{stderr:"s job got: 97%\n\tElapsed (wall clock) time (h:mm:ss or m:ss): 0:02.14\n\tAverage shared text size "}}
    sandbox_memory_integrity_test.go:70: Command [bash] output: event:{data:{stderr:"(kbytes): 0"}}
    sandbox_memory_integrity_test.go:70: Command [bash] output: event:{data:{stderr:"\n\tAverag"}}
    sandbox_memory_integrity_test.go:70: Command [bash] output: event:{data:{stderr:"e unsha"}}
    sandbox_memory_integrity_test.go:70: Command [bash] output: event:{data:{stderr:"red data"}}
    sandbox_memory_integrity_test.go:70: Command [bash] output: event:{data:{stderr:" size (kbytes): 0\n\tAverage stack size (kbytes): 0\n\tAverage total size (kbytes):"}}
    sandbox_memory_integrity_test.go:70: Command [bash] output: event:{data:{stderr:" 0\n\tMaximu"}}
    sandbox_memory_integrity_test.go:70: Command [bash] output: event:{data:{stderr:"m resid"}}
    sandbox_memory_integrity_test.go:70: Command [bash] output: event:{data:{stderr:"ent set "}}
    sandbox_memory_integrity_test.go:70: Command [bash] output: event:{data:{stderr:"size (k"}}
    sandbox_memory_integrity_test.go:70: Command [bash] output: event:{data:{stderr:"bytes):"}}
    sandbox_memory_integrity_test.go:70: Command [bash] output: event:{data:{stderr:" 2724\n\tAverage resident set size (kbytes): 0\n\tMajor (requiring I/O) page "}}
    sandbox_memory_integrity_test.go:70: Command [bash] output: event:{data:{stderr:"faults: "}}
    sandbox_memory_integrity_test.go:70: Command [bash] output: event:{data:{stderr:"2\n\tMinor"}}
    sandbox_memory_integrity_test.go:70: Command [bash] output: event:{data:{stderr:" (recla"}}
    sandbox_memory_integrity_test.go:70: Command [bash] output: event:{data:{stderr:"iming a"}}
    sandbox_memory_integrity_test.go:70: Command [bash] output: event:{data:{stderr:" frame)"}}
    sandbox_memory_integrity_test.go:70: Command [bash] output: event:{data:{stderr:" page f"}}
    sandbox_memory_integrity_test.go:70: Command [bash] output: event:{data:{stderr:"aults: 347\n\tVoluntary context switches: 3\n\tInvoluntary context switches: 31\n\tSwaps: 0\n\tFile system inputs: 176\n\tFile system outputs: 0\n\tSocket messages sent: 0\n\tSocket messages received: 0\n\tSignals delivered: 0\n\tPage size (bytes): 4096\n\tExit status: 0\n"}}
    sandbox_memory_integrity_test.go:70: Command [bash] output: event:{data:{stdout:"Used memory after tmpfs mount and file fill: 671 MB\n"}}
    sandbox_memory_integrity_test.go:70: Command [bash] output: event:{end:{exited:true  status:"exit status 0"}}
    sandbox_memory_integrity_test.go:70: Command [bash] completed successfully in sandbox i3l9znzsaslm8dit24fjs
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
    sandbox_memory_integrity_test.go:80: Command [bash] output: event:{start:{pid:1268}}
Executing command bash in sandbox i4k280fsn3kthhc6u7dcy (user: root)
    sandbox_memory_integrity_test.go:80: Command [bash] output: event:{data:{stdout:"77d087e5a03fb55e2425c867ccbe07e0cde2ba94b8dc2e98c17deeba436311ef\n"}}
    sandbox_memory_integrity_test.go:80: Command [bash] output: event:{end:{exited:true  status:"exit status 0"}}
    sandbox_memory_integrity_test.go:80: Command [bash] completed successfully in sandbox i3l9znzsaslm8dit24fjs
Executing command bash in sandbox i4k280fsn3kthhc6u7dcy (user: root)
    sandbox_memory_integrity_test.go:80: Command [bash] output: event:{start:{pid:1271}}
    sandbox_memory_integrity_test.go:80: Command [bash] output: event:{data:{stdout:"77d087e5a03fb55e2425c867ccbe07e0cde2ba94b8dc2e98c17deeba436311ef\n"}}
    sandbox_memory_integrity_test.go:80: Command [bash] output: event:{end:{exited:true  status:"exit status 0"}}
    sandbox_memory_integrity_test.go:80: Command [bash] completed successfully in sandbox i3l9znzsaslm8dit24fjs
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
    sandbox_memory_integrity_test.go:80: Command [bash] output: event:{start:{pid:1274}}
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
Executing command bash in sandbox i3l9znzsaslm8dit24fjs (user: root)
    sandbox_memory_integrity_test.go:110: 
        	Error Trace:	.../tests/orchestrator/sandbox_memory_integrity_test.go:81
        	            				.../hostedtoolcache/go/1.26.3.../src/runtime/asm_amd64.s:1771
        	Error:      	Received unexpected error:
        	            	failed to execute command bash in sandbox i3l9znzsaslm8dit24fjs: unavailable: HTTP status 502 Bad Gateway
    sandbox_memory_integrity_test.go:110: 
        	Error Trace:	.../tests/orchestrator/sandbox_memory_integrity_test.go:78
        	            				.../tests/orchestrator/sandbox_memory_integrity_test.go:110
        	Error:      	Condition never satisfied
        	Test:       	TestSandboxMemoryIntegrity/tmpfs_hash
--- FAIL: TestSandboxMemoryIntegrity/tmpfs_hash (230.13s)
github.com/e2b-dev/infra/tests/integration/internal/tests/proxies::TestSandboxAutoResumeViaProxy

Flake rate in main: 43.63% (Passed 726 times, Failed 562 times)

Stack Traces | 13.5s run time
=== RUN   TestSandboxAutoResumeViaProxy
=== PAUSE TestSandboxAutoResumeViaProxy
=== CONT  TestSandboxAutoResumeViaProxy
    auto_resume_test.go:116: 
        	Error Trace:	.../tests/proxies/auto_resume_test.go:116
        	Error:      	Received unexpected error:
        	            	Get "http://localhost:3002": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
        	Test:       	TestSandboxAutoResumeViaProxy
--- FAIL: TestSandboxAutoResumeViaProxy (13.53s)
Executing command cat in sandbox itxs6gp4t9dkvh0bkoxph (user: root)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors buffer management in the stream compression process to release input buffers per-goroutine via defer. I have no feedback to provide.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7352e31615

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/shared/pkg/storage/compress_upload_pool_demo_test.go
@ValentaTomas ValentaTomas merged commit 616cf63 into valenta/storage-upload-copy-reduction May 31, 2026
47 checks passed
@ValentaTomas ValentaTomas deleted the lev-frame-input-cleanup branch May 31, 2026 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants