Skip to content

test(cli): transfer socket descriptor ownership - #12465

Merged
mudler merged 1 commit into
mudler:masterfrom
ci-forks:fix/ci-socket-test-fd
Oct 4, 2026
Merged

mudler merged 1 commit into
mudler:masterfrom
ci-forks:fix/ci-socket-test-fd

Conversation

@localai-org-maint-bot

Copy link
Copy Markdown
Collaborator

Description

Fix repeated Linux coverage failures on gallery PRs, including #12464 and #12457. The socket activation test gives two os.File objects ownership of one descriptor. The helper closes it, then the original file's finalizer can close a reused coverage metadata descriptor (bad file descriptor).

Duplicate the descriptor for the activation helper and explicitly close the original file.

Notes for Reviewers

A standalone reproduction using the actual activation helper fails before this change and keeps the reused descriptor open after it. The socket activation Ginkgo specs pass with coverage in an isolated harness. Full repository coverage CI remains to be verified; the coverage baseline is unchanged.

Signed commits

  • Human DCO sign-off
  • Documentation not applicable: test-only change

Duplicate the socket descriptor before handing it to the activation helper.
Close the original file to prevent its finalizer from closing a reused
coverage descriptor after the helper closes its own file wrapper.

Assisted-by: Codex:gpt-6
@mudler
mudler merged commit 4a72b2a into mudler:master Oct 4, 2026
68 of 69 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants