Repository navigation
Conversation
…l fast on a foreign owner Two fbuild builds that both report 2.5.44 derived different daemon ports (a wheel built before the #1700 port-window change: 60903; a dev build after it: 19142). The version-blind root-owner lock lets only one daemon run, so while the wheel's daemon was busy building, the dev CLI spawned three daemons that each exited with 'root-owner.lock busy' and then reported 'daemon did not become healthy after 3 spawn attempts' (~65 s). 'fbuild daemon status' already followed root-owner.json, so it showed the busy owner, while build/deploy did not. - get_daemon_port: after the endpoint port file, use the live owner claim's port when version, mode and cache root match. - ensure_direct_daemon_running: when a live owner of another version/identity holds the cache root on a different port, fail at once naming its pid/version/port/exe instead of doomed respawns.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 41 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…); use NormalizedPath in OwnerClaim tests (ban_std_pathbuf)
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A
fbuild deployfailed twice (~65 s each) withdaemon did not become healthy after 3 spawn attemptswhilefbuild daemon statusshowed a healthy daemon on port 60903 busy building another project.Root cause (from ~/.fbuild/prod/daemon/daemon.log)
Not a slow
/health. Both clients reported 2.5.44, but one was a PyPI wheel built before the #1700 port-window change (default port 60903, binds 0.0.0.0) and the other a dev build after it (default port 19142). The CLI polled 19142, found nothing, and spawned daemons that each loggedfatal: another fbuild-daemon owns the cache root (root-owner.lock busy)and exited. After three spawns it reported the busy owner as unhealthy.fbuild daemonsubcommands already route throughroot-owner.json, which is whystatusshowed the owner while build/deploy did not.Fix
fbuild_paths::get_daemon_port: after the endpoint port file, use the port inroot-owner.jsonwhen the claim's pid is a livefbuild-daemonand its version, mode and cache root match ours (pure helperadoptable_owner_port, unit-tested).ensure_direct_daemon_running: if a live owner of another version or identity holds the cache root on a different port, fail at once with its pid, version, port and exe instead of spawning daemons that cannot start.Evidence
soldr cargo test -p fbuild-paths --lib owner: 13 passed (2 new)soldr cargo test -p fbuild-cli --bin fbuild foreign_root_owner: 1 passed (new)-D warningsis clean on both cratestarget/debug/fbuild build tests/platform/uno -e uno(2.5.45) now fails in 0.09 s withthe fbuild cache root is owned by another fbuild-daemon (pid 522668, version 2.5.44, mode prod, port 60903, exe .../fastled2/.venv/bin/fbuild-daemon) .... Before, it took about 34-65 s and ended with the generic unhealthy-daemon error.Follow-up: same-version builds with different port derivation can still evict each other through the mtime restart check when the owner is idle. This was already true before this change.