Repair Woo-to-relay descriptor ownership and regress socket reuse #80

Open
nsaspy wants to merge 3 commits from fix/74-relay-socket-ownership into feat/70-request-scheduler
Owner

Stacked on #74; this is an attempted repair of its full transport/lifecycle blocker, not a replacement for the rate work in #76/#77.

Changes

  • Duplicate the accepted descriptor and detach the original through Woo's close-socket on the owning event-loop thread before handing the duplicate to a relay worker.
  • Snapshot parser-owned request headers and target before handoff; relay workers no longer mutate Woo socket state.
  • Close untransferred descriptors on errors.
  • Add real-socket repeated descriptor reuse and server restart regression coverage, registered alongside the unchanged HTTP/SSE/binary/backpressure suite.
  • Exact-head, time-bounded Nix full transport workflow.

Evidence boundary

Parent ac26a689c5 failed the full gate after the first HTTP test, with a prolonged hang followed by NIL-not-SOCKET in a Woo callback. Inspection found live Woo watchers/timers/registry entries left behind when worker threads manually closed the original descriptor. The ownership repair is a hypothesis until the full runtime gate passes.

Test definition was committed first at ef35e4f450. Implementation head 75e8c5ca62. No separate behavioral RED execution of the new lifecycle test is claimed. No merge or deployment until the complete real-socket gate is green.

Stacked on #74; this is an attempted repair of its full transport/lifecycle blocker, not a replacement for the rate work in #76/#77. ## Changes - Duplicate the accepted descriptor and detach the original through Woo's close-socket on the owning event-loop thread before handing the duplicate to a relay worker. - Snapshot parser-owned request headers and target before handoff; relay workers no longer mutate Woo socket state. - Close untransferred descriptors on errors. - Add real-socket repeated descriptor reuse and server restart regression coverage, registered alongside the unchanged HTTP/SSE/binary/backpressure suite. - Exact-head, time-bounded Nix full transport workflow. ## Evidence boundary Parent ac26a689c56b1cf2b6c4999ad012b9bd2ced8497 failed the full gate after the first HTTP test, with a prolonged hang followed by NIL-not-SOCKET in a Woo callback. Inspection found live Woo watchers/timers/registry entries left behind when worker threads manually closed the original descriptor. The ownership repair is a hypothesis until the full runtime gate passes. Test definition was committed first at ef35e4f4504c4aa6ebddf5f3bb0ddf010e0a0b41. Implementation head 75e8c5ca62860d45204d1f4fad626a8204cd4a47. No separate behavioral RED execution of the new lifecycle test is claimed. No merge or deployment until the complete real-socket gate is green.
fix: transfer relay descriptors out of Woo event-loop ownership
Some checks failed
Relay socket ownership / transport (push) Failing after 4s
Relay socket ownership / transport (pull_request) Failing after 3s
Common Lisp proxy contracts / proxy-contracts (pull_request) Failing after 4s
75e8c5ca62
fix: use Linux close-on-exec ABI without an unexported SBCL constant
Some checks failed
Relay socket ownership / transport (push) Failing after 3s
Common Lisp proxy contracts / proxy-contracts (pull_request) Failing after 3s
Relay socket ownership / transport (pull_request) Failing after 3s
a68e294881
Author
Owner

Exact-head result at a68e294881: full transport run 34732332701 / job 103657294117 remains FAILED. Production/test compilation and config/scheduler assertions passed, and the first real HTTP method/path/query test passed, but execution then hung until the 600-second timeout exited 124. The new repeated-socket lifecycle test was not reached. The descriptor ownership change is therefore not a sufficient demonstrated repair. Keep this PR draft and keep #74/#76/#77 unmerged; no transport-green or deployment claim. Next diagnostic boundary is bounded thread backtraces around fixture/proxy teardown and stop/join, without deleting or substituting the real socket tests.

Separate quota telemetry and Qtile work is isolated in #82 and lost-rob0t/dotfiles#237, and does not depend on this unverified transport stack.

Exact-head result at a68e2948817a16355a513c32b743cef91cf9c204: full transport run 34732332701 / job 103657294117 remains FAILED. Production/test compilation and config/scheduler assertions passed, and the first real HTTP method/path/query test passed, but execution then hung until the 600-second timeout exited 124. The new repeated-socket lifecycle test was not reached. The descriptor ownership change is therefore not a sufficient demonstrated repair. Keep this PR draft and keep #74/#76/#77 unmerged; no transport-green or deployment claim. Next diagnostic boundary is bounded thread backtraces around fixture/proxy teardown and stop/join, without deleting or substituting the real socket tests. Separate quota telemetry and Qtile work is isolated in #82 and lost-rob0t/dotfiles#237, and does not depend on this unverified transport stack.
Some checks failed
Relay socket ownership / transport (push) Failing after 3s
Common Lisp proxy contracts / proxy-contracts (pull_request) Failing after 3s
Relay socket ownership / transport (pull_request) Failing after 3s
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/74-relay-socket-ownership:fix/74-relay-socket-ownership
git switch fix/74-relay-socket-ownership

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch feat/70-request-scheduler
git merge --no-ff fix/74-relay-socket-ownership
git switch fix/74-relay-socket-ownership
git rebase feat/70-request-scheduler
git switch feat/70-request-scheduler
git merge --ff-only fix/74-relay-socket-ownership
git switch fix/74-relay-socket-ownership
git rebase feat/70-request-scheduler
git switch feat/70-request-scheduler
git merge --no-ff fix/74-relay-socket-ownership
git switch feat/70-request-scheduler
git merge --squash fix/74-relay-socket-ownership
git switch feat/70-request-scheduler
git merge --ff-only fix/74-relay-socket-ownership
git switch feat/70-request-scheduler
git merge fix/74-relay-socket-ownership
git push origin feat/70-request-scheduler
Sign in to join this conversation.
No description provided.