Skip to content

supervisor: a worker's ready line is found wherever it sits in its log, not in the first page only (#105) - #117

Merged
linuxnow merged 2 commits into
mainfrom
fix/105-second-worker-503
Oct 19, 2026
Merged

linuxnow merged 2 commits into
mainfrom
fix/105-second-worker-503

Conversation

@linuxnow

Copy link
Copy Markdown
Contributor

The daemon looked for a worker's ready! only in the first 4 KB of its log. lilv writes a warning line for every entry of LV2_PATH that is no bundle before mod-host says ready, and the whole tests/ directory is 37 such entries, 5334 bytes of them: the marker sat past the page, the daemon waited out ready_timeout_ms and answered resp -503 for every worker given the whole set. An own worker starts because its world is one linked bundle, which writes nothing. That is the second worker of the issue: the pool one, and the one for a URI no bundle names.

log_has_ready now reads the whole log a page at a time, with the tail of each page kept in front of the next so a marker split across two reads is still found.

Tests:

  • tests/fake-host takes FAKE_WARN_BEFORE_READY=<n>: n lilv-shaped warning lines on stderr before its ready line.
  • a_worker_that_warns_more_than_a_page_before_ready_still_starts (make test-daemon): 64 lines, add answers resp 0 within the ready timeout, and the positive control reads the marker's offset in the worker's log past 4096. Red before the fix with the issue's line: add fake:a 0 -> 'resp -503', wanted 'resp 0'.
  • make sabotage gains "the ready marker is looked for in the first page of the worker's log only" (the loop reads one page), and it is caught:
    ok sabotage caught: the ready marker is looked for in the first page of the worker's log only -> a_worker_that_warns_more_than_a_page_before_ready_still_starts red
  • make sabotage with the full worker environment on the desk: 187 caught, 0 skipped, one survivor that is the desk's and main's alike (the unapplied nice, sabotage: "a nice the daemon could not apply is not logged" survives where the nice applies #116).
  • CI runs the JACK step with LV2_DIR=$PWD/tests, the issue's own reproduce, instead of the one-bundle copy it fell back to. On the desk, make test-jack with that world: 11 ok, among them mod_host_scenarios_pass_unchanged_with_an_lv2_worker and lv2_own_worker_sees_one_bundle_and_replays_after_a_kill, both red before ('add urn:no:such:plugin 4': got 'resp -503', want 'resp -101'; add … 1 pool:l -> 'resp -503'). make test: 171 ok.

Codes: none added, none removed. WORKER_SPAWN (-503) keeps its meaning, the worker is not up; it is no longer answered for a worker that is up behind a noisy world.

Closes #105

…g, not in the first page only (#105)

lilv writes a warning line for every entry of LV2_PATH that is no bundle before mod-host says ready; the whole
tests/ directory is 37 such entries, 5334 bytes of them, so the marker sat past the 4 KB the daemon read, the
start waited out ready_timeout_ms and every worker given the whole set answered -503. An own worker's world is
one linked bundle, which writes nothing: that is why only the second worker failed. log_has_ready reads the whole
log a page at a time, the tail of each page kept in front of the next.

tests/fake-host takes FAKE_WARN_BEFORE_READY=<n>; the daemon test starts a worker behind 64 such lines and reads
the marker's offset past 4096 as its positive control; the sabotage reads one page and is caught; CI's JACK step
takes the whole tests/ directory as the world, the issue's own reproduce.
@linuxnow
linuxnow merged commit 57ada37 into main Oct 19, 2026
35 checks passed
@linuxnow
linuxnow deleted the fix/105-second-worker-503 branch October 19, 2026 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A second mod-host LV2 worker fails to start (resp -503) when LV2_DIR is the whole tests/ directory

1 participant