diff --git a/.github/workflows/pullfrog.yml b/.github/workflows/pullfrog.yml index 5d516c9c..af2bab94 100644 --- a/.github/workflows/pullfrog.yml +++ b/.github/workflows/pullfrog.yml @@ -29,6 +29,38 @@ jobs: with: fetch-depth: 1 persist-credentials: false + # Edited: what the review needs to run the repository's checks and + # tests. The environment admits only main, so the dev shell comes from + # the default branch, not a pull request's head. + - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main + with: + determinate: false + # The agent's shell can reach the daemon and read /etc/nix and + # /nix/receipt.json: keep the job's token out of both, and keep the + # runner user untrusted, since a trusted user's settings, such as a + # post-build-hook, run as root. + github-token: "" + trust-runner-user: false + - name: Put the dev shell's tools on PATH + # bash, not the default shell, for pipefail: a failing print-dev-env + # must fail the step, not write an empty PATH. + shell: bash + env: + # Authenticated fetches of the flake's inputs, for this step only. + NIX_CONFIG: access-tokens = github.com=${{ github.token }} + TOKEN: ${{ github.token }} + run: | + nix print-dev-env --json | + jq -r '.variables.PATH.value' | + tr ':' '\n' | grep '^/nix/store/' | paste -sd: >>"$GITHUB_PATH" + if sudo grep -rqF "$TOKEN" /etc/nix /nix/receipt.json; then + echo "the job token reached Nix's config" >&2 + exit 1 + fi + if ! nix store info --json | jq -e '.trusted == false or .trusted == 0' >/dev/null; then + echo "the Nix daemon trusts the runner user" >&2 + exit 1 + fi - name: Run agent uses: pullfrog/pullfrog@0741f79ecebfa4469a010644d2aed2d96d32d489 # v0.1.127 with: diff --git a/quest/a0/quiche-finished-read-waker.md b/quest/a0/quiche-finished-read-waker.md new file mode 100644 index 00000000..1fa69ec8 --- /dev/null +++ b/quest/a0/quiche-finished-read-waker.md @@ -0,0 +1,23 @@ +# [S] A finished quiche read sometimes still holds its waker + +## Goal + +`a_finished_read_releases_the_poller` in +`rs/web-transport-quiche/tests/ez_wakers.rs` passes every run. It fails about +one run in 200 on `main` (0cb7412), and failed CI's `build` job on +[moq-dev/web-transport#545](https://github.com/moq-dev/web-transport/pull/545), +which changes only a workflow: after the read completes and the test drops its +own `Waker`, `Arc::strong_count` of the poller's waker is 2, not 1. + +## Plan + +Find whether the extra reference is a real retention in the ez read path or +the test racing the driver: the test runs on a two-thread runtime, so a wake +in flight on the driver thread may hold a clone just as the count is read. +Fix the retention if it is one; if it is a transient clone, make the test +wait on the event that releases it rather than reading the count once, +without a sleep or retry. Reproduce with +`for i in $(seq 200); do cargo test -q -p web-transport-quiche --test ez_wakers a_finished_read_releases_the_poller || break; done`. + +Caused by: [moq-dev/web-transport#353](https://github.com/moq-dev/web-transport/pull/353) +added the test and the waker release it checks.