VM steps lose /src (#65): virtiofsd addresses the worker's source filesystem by file handle, which it cannot honour once the host evicts the inode #66
Open
opened 2026-11-13 23:09:35 +00:00 by xemmerling
·
0 comments
No Branch/Tag specified
main
dev/schema-step-order
t-join-release
t-work-booking
t-ahead-deadlock-wip
t-hotfix-9ae
t-width-work
t-id-token-renew
t-claim-unkept
t-resume-live
t-run-record
t-all-lockfiles
t-relay-offset
t-blame-event
t-freer-links
t-load-tests
t-jobserver2
t-starved-timeout
t-client-pack
t-offline-config
t-test-plan
t-told-resume2
t-jobserver
t-told-resume
t-outbound2
t-crash-open-bench
t-told-once
guest-never-below-given
admit-page-cache-active
pooled-admission
driver-give-back
no-sizes
one-driver-per-check
archive/vm-root-share
archive/build-out-kept
archive/cargo-perf
archive/virtiofs-readdir-alloc
archive/vm-outputs-stream
archive/stable-verify-priority
archive/agents-1
archive/stack-parallel
archive/cpu-admission
archive/narrow-from-every-log
archive/old-t
archive/worker-store-gc
archive/failing-builds-kept
archive/vm-cargo-home
archive/lifecycle
archive/bench-own-cores
archive/place-test-binaries-nocopy
archive/vm-net-upload-stall
archive/booking-current-use
archive/archive-dep-out-dirs
archive/any-arch-shards
archive/prepare-stall-progress-ns20
archive/s2
archive/next-set-20
archive/store-full-waits
archive/fetch-caps-by-node
archive/vm-step-phases
archive/arm-only-for-arm
archive/deploy-all-workers
archive/lifecycle-staging
archive/lifecycle-1-wire
archive/fast-gate
archive/cargo-key-narrow
archive/log-leads-followup
archive/gate-limit
archive/prepare-stall-vm-bytes
archive/lifecycle-2-ends
archive/cache-hits-bind
archive/failing-reused
archive/oci-archive-direct
archive/prepare-stall-progress
archive/test-quarantine
archive/crash-safe-on-18
archive/build-script-etxtbsy
archive/old-release
archive/next-set-19c
archive/wait-reasons
archive/cache-put-best-effort
archive/hang-not-t-time
archive/shard-test-results
archive/vm-carry-on-17
archive/check-test-filter
archive/artifact-path-beneath
archive/stall-room-xfs
archive/build-dir-no-recopy
archive/cache-hits-link
archive/outputs-no-follow-on-copy
archive/outputs-no-follow
archive/next-set-19
archive/hang-detect
archive/stable-verify-stable-plan
archive/freer-target-only
archive/lease-pricing-narrow
archive/vm-outputs-once
archive/queue-place-starved
archive/publish-reads
archive/disk-warning-scratch
archive/outputs-no-copy
archive/wd-probe-3min
archive/watchdog-on-d65
archive/log-leads-with-excerpt
archive/queue-place
archive/prep-watchdog-progress
archive/cache-put-stack-room
archive/cache-put-stack
archive/place-by-pace
archive/nested-sync-helper
archive/next-set-18y
archive/archive-bins-by-env-19
archive/next-set-18
archive/disk-want-held
archive/young-booking-back
archive/flaky-tests-1027b
archive/next-set-17
archive/prep-start-at-close
archive/unpack-error-on-17
archive/server-memory-high
archive/vm-start-held
archive/vm-carry-on-14
archive/space-trim-registry-room
archive/file-cache-ns16
archive/unpack-error-final
archive/crash-safe-worker
archive/server-space-trim
archive/status-big-runs
archive/nested-tmp-volatile
archive/publish-refresh
archive/gc-cache-quiet-reads
archive/next-set-16
archive/vm14-proof
archive/csw-node-kill
archive/unpack-link
archive/vm-tests-15
archive/seccomp-allow-field
archive/flaky-tests-1027-ns15
archive/shard-fail-fast
archive/server-node-check
archive/live-log-restart
archive/unpack-no-orphans
archive/flaky-tests-1027
archive/fetch-share-images
archive/fetch-images-red4
archive/forget-cached
archive/put-file-once-ns15
archive/recheck-rank-15
archive/fetch-images-red3
archive/unpack-no-orphans-red2
archive/fetch-io-pass-followups
archive/sandbox-no-fallback-ns15
archive/unpack-no-orphans-red
archive/archive-bins-by-env-ns15
archive/ns15-proof
archive/next-set-15
archive/archive-bins-by-env
archive/vm-guest-panic-15
archive/sandbox-no-fallback
archive/recheck-rank
archive/placement-ahead-bound
archive/carry-keeps-listing
archive/registry-parallel-pull
archive/sandbox-tests-15
archive/attempt-log-live-15
archive/follow-progress-16
archive/follow-progress-15
archive/ns15-archive-base
archive/fetch-io-max-on-13
archive/fetch-images-red2
archive/transient-build-fail-15
archive/test-ended-early-15
archive/archive-keep-cleanup
archive/main-merge-14
archive/sandbox-clone3-fallback
archive/vm-carry-on-13
archive/fetch-io-sweep-15
archive/vm-root-disk-fixes
archive/vm-guest-panic
archive/follow-progress-14
archive/archive-keep-on-demand
archive/vm-exit-unseen
archive/file-cache-share
archive/bwrap-root-userns
archive/transient-build-fail
archive/fetch-io-max
archive/file-cache-guard-11
archive/fetch-io-sweep
archive/archive-build-dir-skip
archive/next-set-14
archive/wrapper-one-read
archive/archive-tmp-links
archive/attempt-log-live
archive/fetch-share-and-order
archive/vm-hang-io-wait
archive/vm-carry-fixes
archive/image-cancel
archive/test-ended-early
archive/sim-on-train3-bundle
archive/hits-layer-wip
archive/t-old-putfile
archive/archive-links
archive/stall-on-13
archive/carried-prep-completes
archive/put-file-once
archive/preview-14
archive/follow-progress
archive/gc-reads-dont-protect
archive/admission-replay-people
archive/people-pickup
archive/gc-pass-visible
archive/hits-layer
archive/own-build-priced
archive/compact-stamps-followup
archive/prepare-timing
archive/sim-on-train3
archive/next-set-13
archive/next-set-12b
archive/sim-on-next-set-12
archive/deploy-doc-no-kill
archive/next-set-12
archive/attempt-logs-real
archive/sim-tests-green
archive/shard-label-index
archive/young-booking
archive/next-set-11
archive/data-dir-config-env
archive/vm-sync-not-host-store
archive/attempt-logs
archive/wrapper-ro
archive/tests-wait-on-events
archive/blame-git-optional-needs
archive/job-file-headroom-impl
archive/next-set-10
archive/blame-verdict-fresh-parent
archive/compact-touched-stamps
archive/interactive-incremental-off
archive/follow-lost-lines-counted
archive/evict-test
archive/next-set-trial
archive/keys-cover-output-bytes
archive/file-cache-guard
archive/blame-after-parent
archive/test-filter-matching-nothing-fails
archive/s1-on-d96
archive/draining-node-queues
archive/tprev-checks-prod-next
archive/s1-dead
archive/follow-live-run
archive/guard-stopped-setup-text
archive/io-error-cause
archive/source-layer-whole
archive/clippy-groups
archive/worker-silence-grace
archive/price-touched
archive/prod-next
archive/batch1
archive/s1-on-prod-next
archive/vmcache/sandbox-copyup-pin
archive/s1-xfs-store
archive/warm-script-builds
archive/vmcache/setup-tag-digest
archive/vmcache/setup-should-fixes
archive/vmcache/setup-any-arch
archive/guard-livelock
archive/host-budget
archive/wire-format-test
archive/admission-replay
archive/switch-safe
archive/stall-window
archive/upgrade-carries-preparing
archive/static-init
archive/switch-proof-b
archive/carry-tokens
archive/seals-together
archive/switch-safe-storage
archive/switch-safe-worker
archive/batch-b-prev
archive/vmcache/batch-b
archive/carry-vm-helpers
archive/small-llvm-args-failed-log
archive/batch-a
archive/stall-hotfix
archive/prev-pacing
archive/u-try-wip
archive/u-try
archive/u-try-wip2
archive/flatten-verify
archive/poll-free
archive/flatten-tiers
archive/hotfix-cross
archive/pool-stall
archive/disk-pacing
archive/u-builds-from-graph
archive/mac-idle
archive/ship-direct
archive/vmcache/shards
archive/soft-margin
archive/behind-no-target
archive/filtered-binaries
archive/vmcache/setup-layers
archive/direct-off-prev
archive/probe-budget
archive/vm-helper-exit
archive/jobs-soft-bound
archive/vmcache/vm-disks
archive/vmcache/failure-outputs
archive/narrowed-not-verdict
archive/scratch-direct-off
archive/handover-holds
archive/memory-lines
archive/drain-destroys
archive/pool-size
archive/drain-own-frees
archive/test-schema-drop
archive/deploy-disk
archive/deploy-disk-lines
archive/clone-aware-freeing
archive/absolute-headroom
archive/zfs-pool-size
archive/u-int5
archive/u-load
archive/u-warn
archive/u-steer
archive/revert-stall-once
archive/guard-headroom
archive/u-int3
archive/u-readsets
archive/u-hermetic
archive/mem-virtio
archive/u-buildjobs
archive/u-waits
archive/u-three
archive/u-zfs-stall
archive/u-config
archive/u-lean
archive/u-e2e
archive/u-integrate2
archive/u-jobenv
archive/u-cache-blobs
archive/u-observe2
archive/u-sched-nospread
archive/u-node-bound
archive/u-sched-oom
archive/u-review-store
archive/u-observe
archive/u-review-engine
archive/u-review-srv
archive/u-review-node
archive/u-review-sched
archive/preempt-measured
archive/u-integrate
archive/u-eng
archive/lock-off-runtime
archive/u-vm
archive/u-gone
archive/u-offline
archive/ready-starve
archive/u-notices
archive/heads-never-superseded
archive/u-learn
archive/int
archive/u-graph
archive/u-umount
archive/supersede-followed
archive/preparing-booking
archive/u-xdev
archive/u-env
archive/u-poll
archive/u-wrap
archive/u-room
archive/u-wrap-try
archive/u-fixed
archive/unstall
archive/u-fix3
archive/u-cwd
archive/resume-supersedes
archive/server-heap
archive/u-harness
archive/u-macos
archive/u-node
archive/u-eng2
archive/u-leader
archive/u-cutover
archive/u-cache
archive/u-sched
archive/u-engine
archive/chore/agpl-license
archive/note-x86-disk-room
archive/pass-cost
archive/prod-defects
archive/clippy-false-greens
archive/t-pace-variance-prototype
archive/outputs-reattach
archive/fix-retry-needs
archive/no-supersede-uncached
archive/fix/promoted-view-mtime
archive/rb-merge
archive/ft-sched
archive/ft-node
archive/ft-engine
archive/fx-sim
archive/fx2-mem
archive/fx2-store
archive/fx2-ci
archive/fx-work
archive/fx-ci
archive/fx-sched
archive/fx-req
archive/fx-store
archive/fx-cache
archive/rb-storage
archive/rb-scheduling
archive/rb-sweep
archive/rb-tracking
archive/rb-workers
archive/rb-client
archive/rb-profiles
archive/rebuild
archive/batch-deploy
archive/fix-roll
archive/work
archive/fix-busy
archive/fix-perf
archive/fix-suite
archive/fix-spread
archive/fix-sig
archive/fix-wait
archive/fix-init
archive/sizing
archive/fix-drift
archive/delivery
archive/fix-snap
archive/fix-own
archive/fix-rollout
archive/fix-hang
archive/fix-tree
archive/images
archive/fill
archive/sched-gate-preparing-after
archive/takeover-sim
archive/image-d244b22
archive/image-ce8a09e
archive/image-c9ff4f7
archive/image-489bec9
archive/image-7e07ffb
archive/image-583ea93
archive/image-8e1cd2c
archive/image-fbf0a9c
archive/image-6924e11
archive/image-29cabc3
archive/image-97ebb0e
archive/image-d0e23ac
archive/image-319fce9
archive/image-4f689e1
archive/image-feacbcd
archive/image-d5d9446
archive/image-6b86940
archive/fix/dedup-priority-promotion
archive/image-a5b0fe3
archive/image-462afb1
archive/image-f39d42c
archive/image-6e71fb4
archive/image-0c62329
archive/resources
archive/image-112b6a6
archive/image-8b06530
archive/image-5ae7cd8
archive/fmt-fix-in-t-toml
archive/image-arm64
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set
Reference
tilo/t#66
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
For issue #65 (VM steps lose files of
/srcmid-job). What I read on production and in the code, and the change I intend. Nothing is changed on production yet.What the guest's
/srcis. A running step's virtiofsd for its inputs shares/share; under itl0is an xfs layer directory,l1the job'sguest-networkdirectory on xfs, andl2the FUSE mountt-sourcesthe job's ownt __observeserves (read from the daemon's/proc/<pid>/mountinfo). The daemon is virtiofsd 1.14.0, started as--shared-dir /share --sandbox none --cache always --announce-submounts --xattr --readonly …, with nothing said about file handles.virtiofsd addresses those inodes by file handle. Its default is
--inode-file-handles=prefer(its own help). In every running step'svm-sockets/writable.logit saysFilesystem mounted on "/share/target" …: Filesystem does not support file handles, falling back to O_PATH FDs; in none of the same steps'inputs.logdoes it say so. Inputs daemons with hundreds of open files hold twoO_PATHdescriptors each: no inode is pinned by a descriptor.t-sourceshands out handles it cannot honour. Itsinitasks for passthrough and idmap only, noFUSE_EXPORT_SUPPORT, and every entry has generation 0 (src/node/observe.rs:1029, 1064). The kernel still encodes a handle for such a filesystem, but can open it again only while the inode is in its cache. Once the host has evicted the inode,open_by_handle_atreturns ESTALE. That is the error the guests see on a directory they had read earlier in the same step; a retried walk turns it into "no such file or directory".All three shapes in #65 are that one. The "bulk transfer" errors end in
readdirent /os/usr/lib/firewalld: stale file handle; the python one is ESTALE listing a directory; the third is ENOENT for a name in the tree. Ruled out by readings: descriptors (28 to 421 open against a limit of 1,048,576), an expiry (four failing steps ran 208 s, 274 s, 335 s and 793 s), the worker's in-place upgrades (today's failing jobs ran 03:13-03:19, 11:09-11:13, 20:35-20:49, 21:23-21:28 and 21:38-21:54Z; promotes at 10:56, 15:13, 16:31, 22:08Z). A second reader of6ebaa239found the layers immutable and held for the job's life, and no eviction, forget or sweep int-sourcesitself.Not shown: a reproduction on demand (it would need the host's inode cache dropped under a running guest), and why the reports begin on 11-11. Host memory pressure decides how soon an inode is evicted, and that grew from 11-11.
What I intend, in src/node/observe.rs, building on what is there: ask the kernel for
FUSE_EXPORT_SUPPORTand answer the two lookups it then sends for a handle,.with the inode itself and..with its parent, under the same inode number and generation 0.t-sourceskeeps every inode number for its server's life and never forgets one, so both answers are at hand. It costs no memory and leaves handles in use on the xfs layers. The alternative,--inode-file-handles=neverin src/node/vm.rs, is one line but pins every inode a guest touches on the whole inputs share, the image's root included, in the step's memory.The file is yours; I change nothing that is there. Say so if you would rather have the other fix or do it yourself.
A second fault, yours to place: a guest that cannot read its sources exits non-zero, is judged
Fail(src/node/run/judge.rs:299) andFailis kept (src/jobs/flight.rs:703-705), so the next run on the same inputs repeats the failure without running. Nothing tells this from the code's own failure. Until the first fix is live, an asker has to--force.23:25Z 11-13: reproduced on testing, on
e5835fde(no fix). A VM check added in a scratch clone (never committed) walks and reads/srcsixty times, three seconds apart; meanwhile I write 2 to/proc/sys/vm/drop_cacheson testing's worker every five seconds, which evicts the host's unused dentries and inodes./src(run r5b5e47f6e7): fails after 48 s, at its 14th walk and the fifth host drop, withcat: /src/src/server/nodes/liveness.rs: Stale file handle. Guest of 525 MiB.So the fault needs both halves named above: a node of
/srcthe guest still holds, and the host having evicted its inode. The same check on testing serving the change must pass its sixty walks; I will add that run here.23:39Z 11-13: the change is on main as
6ea02834("node/observe: a handle to a source inode opens again after the host forgot it"). It touches src/node/observe.rs and one sentence of docs/spec.md, nothing of what was there:initalso asks forFUSE_EXPORT_SUPPORT(KERNEL_WANTS), andlookupfirst asksSources::by_handle, which answers.with the inode itself and..with its directory under the inode numbers given before,ESTALEfor an inode never made, records nothing, and underNames::UntilUnitskeeps the entry for no time.6ea02834, the sixty walks with the guest keeping its caches and the host dropping its own. It is queued behind testing's deploy of main's head; I add its result here and promote only if it passes. If it fails I revert on main.6ebaa239) meanwhile: run ra05f4c4543,os-layer-image-x86_64, 23:27:15Z,COPY .cargo … readdirent /.cargo: stale file handleafter 567 s; 20 of the hour's 21 image-chain jobs passed.23:52Z 11-13: the same reproduction passes on testing serving
6ea02834. Run re5d1849a19:60 walks of /src done; the guest kept its caches, 202 s, the host's dentry and inode caches dropped 16 times meanwhile. Without the change the same check failed after 48 s at its 14th walk (r5b5e47f6e7). Read while it ran: its inputs daemon sharesl2as FUSEt-sources, logs no fallback from handles and holds 2O_PATHdescriptors of 32 open files, so the handles were in use and were opened again; testing's worker ran the build6ea02834.I am promoting
6ea02834to production now (it carriese5835fdetoo; no schema step and no node protocol change over6ebaa239, so going back is a plain promote of6ebaa239). After it I read the image chain's outcomes hourly and any failure's log. The second fault above (a failure of this kind kept as the step's answer) is untouched and still yours to place; answers kept from before will repeat until their inputs change or the asker forces.23:54Z 11-13:
6ea02834is on production. Promoted at 23:53:47Z with all four conditions holding (testing on it and it main's head; server and database undisturbed; 105 minutes since the last promote; no person's job queued, p90 wait 5 s). The server restored and followed its jobs within 17 s of starting; the worker fetched the build at 23:54:54Z and re-attached 55 jobs. In the first two minutes 75 jobs ended, none by a cause of t, and 95 started on the new build, 60 of them already ended: the source server's new init and lookups serve every job. Jobs started before the promote keep the source server they had; only jobs started after it get the change. I read the image chain's outcomes over the next hours and add what I find.Result after one hour on production (read 00:54Z 11-14)
The fix (
6ea02834) is on production since 23:53:51Z 11-13, and since 00:22Z insidec2d52b34.os-*jobs), by end timeos-dev-image-lean-x86_64of run rdca525a54e, endedgrown_outafter 263 s: t's own growth. Its rerun with a larger guest passed after 823 s.os-compile-x86_64of run rfb0f5a188a: a program the step built panicked in clap (Command::get_arg_conflicts_with: The passed arg conflicts with an arg unknown to the cmd). That is tilo's own./src. No job failed at setup or was lost, and no VM step failed at its mount.So in the first hour no image-chain job that started after the fix lost
/src. An hour is short against a fault that came in bursts; I will read it again after a few hours of image-chain runs.After four hours (03:54Z 11-14)
The fix stayed in through the promote of
c2d52b34at 00:22Z, which carries it.os-*jobs), by end timeos-assembler-x86_64of run r764fb5c56f. That one was cancelled at 00:56:25Z with its run, which its asker stopped (asked 00:45:59Z,stop= cancel).So in four hours no image-chain job that started after the fix lost
/src. I count the fault as fixed. If a VM step loses/srcagain I will say so here.