Repository navigation
Init: the wait for the compositor's connected answer has a deadline - #131
Merged
Merged
Conversation
aoinoikaz
force-pushed
the
keys-modifiers-per-keyboard
branch
from
November 12, 2026 16:44
1d80cfa to
52de68c
Compare
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
force-pushed
the
init-compositor-connect-deadline
branch
from
November 12, 2026 16:44
e68b942 to
8430cbc
Compare
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.
await_connectedwaits for the compositor's answer toCOMPOSITOR_CONNECTwith 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 withtask_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 ofboot.pyeach caught; 75 of 75 files againstSHA256SUMS.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