Skip to content

Init: the wait for the compositor's connected answer has a deadline - #131

Merged
aoinoikaz merged 1 commit into
mainfrom
init-compositor-connect-deadline
Nov 12, 2026
Merged

aoinoikaz merged 1 commit into
mainfrom
init-compositor-connect-deadline

Conversation

@aoinoikaz

Copy link
Copy Markdown
Contributor

await_connected waits for the compositor's answer to COMPOSITOR_CONNECT with no deadline. A compositor that is alive and never answers ends neither of the two ends D19 rule 2 gives the wait, so the console never gets its connection and nothing takes the display from the compositor.

The wait ends COMPOSITOR_CONNECT_DEADLINE_SECONDS, 30, after it begins, whatever else the compositor sends meanwhile. A compositor that has not answered by then counts as one that has ended (display.md D3): the first process logs the miss and ends it with task_kill, and the supervisor starts it again or gives it up as for any end. A missed deadline gives no compositor up by itself. A compile-time check keeps the deadline under the restart period, since a longer one would have a silent compositor started again for ever.

30 seconds is more than six times the slowest answer measured: 4.6 seconds from the compositor's start at 2880 x 1800 under TCG, about a second at 1280 x 800.

A test disk, noanswer.img, carries a flag that makes the compositor answer no connection, and Boot (no answer) checks the miss at each start, one restart, the give-up, and the console taking the display.

Checked: the default, fallback, no-answer, window and test boots under TCG; ci/check-boot.py, 1,038 checks, with 11 deliberate breaks of boot.py each caught; 75 of 75 files against SHA256SUMS.

Not checked locally: the KVM boots and CI's QEMU. A wait that fails for a reason other than the deadline is passed over, as before.

Based on #130, which this follows.

Closes #113

@aoinoikaz
aoinoikaz force-pushed the keys-modifiers-per-keyboard branch from 1d80cfa to 52de68c Compare November 12, 2026 16:44
Base automatically changed from keys-modifiers-per-keyboard to main November 12, 2026 16:44
The first process waits for the compositor's answer to a connection it
issues for at most COMPOSITOR_CONNECT_DEADLINE_SECONDS, 30 seconds, where
it waited for ever. A compositor that has not answered by then counts as
one that has ended: the first process logs nova-init: connection wait
failed status=10 and ends it with task_kill on its process, and the
supervisor reads that end as any other, so the compositor is started
again, or given up if it was restarted within the last minute, and the
console takes the display (display.md D3, D19 rule 2 step 4). No second
way to the fallback is added. The deadline is one time on the clock,
checked after each message passed over, so a compositor that sends
other messages is not waited for beyond it.

Thirty seconds is over six times the slowest start measured, 4.6
seconds from the compositor's start to its answer at 2880 x 1800 under
QEMU's TCG, and stays under the supervisor's restart period, which a
static assertion holds: a compositor that never answers is ended twice
within the period and then given up.

A test disk that carries \NOVA\NOANSWER has the compositor take each
connection request and answer none while it serves on,
COMPOSITOR_OPTION_NO_ANSWER_TEST, and noanswer.img is the test disk with
it. ci/boot.py noanswer requires the wait's line and the compositor's
end with PROCESS_EXIT_KILLED at each of its two starts, the restart, the
give-up and the console's display after it, refuses a connection issued
or a console's window, and then logs in on the console as the fallback
boot does. ci/check-boot.py checks which lines that boot requires,
accepts and refuses.
@aoinoikaz
aoinoikaz force-pushed the init-compositor-connect-deadline branch from e68b942 to 8430cbc Compare November 12, 2026 16:44
@aoinoikaz
aoinoikaz merged commit 3dfc6ab into main Nov 12, 2026
@aoinoikaz
aoinoikaz deleted the init-compositor-connect-deadline branch November 12, 2026 16:45
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.

Init: the wait for the compositor's connected answer has no deadline

1 participant