hero_admin_lib: admin/web binaries hang pre-main against latest hero_rpc #12
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_website_framework#12
Loading…
Add table
Add a link
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?
Symptom
Every scaffolded
_adminor_serverbinary that depends onhero_admin_lib(currently pinned to89f041897633d6a6ca4af2c804147ae2c829e423in downstream Cargo.lock files) hangs at startup with zero stdout/stderr when invoked with any argument set, including--info. The binary process exists inps, sits at 0% CPU forever in macOSUEstate, and is unkillable except via reboot. Same behaviour reproducible on two different Hero service repos (hero_service + recipe_server reference).In contrast, a peer
_webbinary in the same workspace — sameservice_base!()macro, samevalidate_service_toml+handle_info_flagstartup boilerplate, just without thehero_admin_libdep — works perfectly (--infoprints the embeddedservice.tomland exits 0).What's been ruled out
otool -Lshows the same dylib set as the working_webbinary.service_base!()issue: the macro just declaresconst SERVICE_TOML+const BUILD_NR(no runtime side effects).#[tokio::main(flavor = "current_thread")]. Also reproducible with a syncfn main() { eprintln!("hi"); exit(0); }in the same crate — zero output. So the hang is in pre-main static initialization, beforemain()runs.hero_service_web, a hand-rolled hello-world) start fine concurrently.What's left as a hypothesis
Something in
hero_admin_lib's dep tree runs a pre-main static initializer (actor!macro or distributed-slice registration in a transitive C-FFI dep) that blocks on a system resource. Likely candidates worth probing first:hero_admin_lib::middleware::base_path_middlewareandhero_admin_lib::routes— anything that touchesrust-embedfor the embedded asset blob (shared_static_handler).hero_admin_lib::socket::admin_socket_path— the helper that resolves$HERO_SOCKET_DIRviaherolib_core::base::resolve_socket_dir. Could be hitting a deadlock withhero_procif hero_proc was registered against a different socket dir.axum-serverortower-httpmiddleware that mounts middleware at static-init time.Reproduction
Meanwhile:
Newer hero_admin_lib (
f3c5b07a) — different breakcargo update -p hero_admin_libto the current tip surfaces a different problem: ~25 compile errors in scaffolded admin/main.rs files against the newer hero_admin_lib API (route signature changes, removed helpers). The two issues are independent — the hang is in89f04189, the API drift is inf3c5b07a. Both need triage; a unified fix that lets scaffolded admin/main.rs (per hero_rpc generator template) start cleanly against the latest hero_admin_lib is the win.Why this matters
With
_adminhanging:lab service <name> --startcan't lifecycle-manage the service (lab calls<bin> --infofirst to read service.toml metadata; that hangs forever)./<svc>/js/client.js, admin pages embed<script type="module">to call it browser-side) can't be tested in a real browser session.Downstream demos that depend on admin starting (the hero_service template, every UI dashboard) are blocked.
Asks for the triage agent
origin/development, build a tiny admin binary that just hashero_admin_libas a dep + a syncmainthat prints "hi". Confirm it hangs.hero_admin_lib/Cargo.tomlto find the offending transitive crate (likely something with a ctor or FFI initializer).ui_emit.rs+scaffold.rsto track the new API).Related: hero_rpc#142 SDK pipeline reversal and the hero_rpc2 + hero_rpc_openrpc fold issue tracked in
lhumina_code/hero_rpc(see latest issue list).