Skip to content

test: intermittent unit (linux) failure in abort-leak webfetch memory test #21172

@gqcdm

Description

@gqcdm

Description

unit (linux) intermittently fails in GitHub Actions on packages/opencode/test/memory/abort-leak.test.ts with:

memory: abort controller leak > webfetch does not leak memory over many invocations

This does not currently look like a deterministic regression from the reporting branch itself. The same PR later passed on re-run without touching the webfetch / abort / memory-test path, and another unrelated PR also failed earlier on the same test.

Observed failing run on PR #21085:

Relevant failing log excerpt:

  • Baseline: 88.22 MB
  • After 50 fetches: 142.01 MB
  • Growth: 53.79 MB
  • Expected threshold in test: < 5 MB

Another unrelated PR also failed on the same test:

The same PR later passed on re-run:

Additional context:

  • packages/opencode/src/util/abort.ts already uses controller.abort.bind(controller).
  • The companion test compare closure vs bind pattern directly was still passing in the failing runs.
  • The reporting branch did not modify packages/opencode/src/tool/webfetch.ts, packages/opencode/src/util/abort.ts, or packages/opencode/test/memory/abort-leak.test.ts.

Plugins

None

OpenCode version

opencode package version in repo: 1.3.15

Steps to reproduce

  1. Open a PR against anomalyco/opencode and let the test workflow run.
  2. Watch the unit (linux) job in .github/workflows/test.yml.
  3. On intermittent failing runs, the failure appears in packages/opencode/test/memory/abort-leak.test.ts on memory: abort controller leak > webfetch does not leak memory over many invocations.
  4. Re-run the failed job or workflow. In at least one observed case, the same logical change later passed without code changes to the memory-test path.

Screenshot and/or share link

Failing run:

Passing re-run:

Operating System

GitHub Actions Linux runner: blacksmith-4vcpu-ubuntu-2404 / Ubuntu 24.04 environment

Terminal

bash in GitHub Actions runner

Metadata

Metadata

Assignees

Labels

coreAnything pertaining to core functionality of the application (opencode server stuff)linux

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions