Repository navigation
Layer 1 microVM: a php-fpm that refuses to start says why in the launcher's log (#87) - #92
Merged
Merged
Conversation
…r's log (#87) When php-fpm's master exits, the guest's init reads the rest of its output, reports its exit (code or signal, at boot or while serving) to the host's log and the console, and waits for the host to acknowledge those lines before it stops. The log's sender starts first in the boot, so a failed boot is reported there too. The launcher's stop line quotes the guest's last lines instead of only pointing at console.log. test/ext-vault.sh 5b checks the reason in the launcher's log alone.
# Conflicts: # ext/fpm/src/guest.rs # ext/fpm/src/guestlog.rs # ext/fpm/src/vm.rs
…aped and labelled (#87 review) The launcher's stop lines quoted the guest's last log lines as they were, inside a securecore-fpm: line, so a guest line could close the quote or start what reads as a launcher line. Each is now quoted and escaped (Rust's debug escaping: quotes, newlines, control characters), last in the line, after "the guest's last log lines, as the guest wrote them (quoted):".
Member
Author
Review fixes (#87 review), in bba3dae (after merging #91's fixes in 0d4897a)
ext-vault 5b's check ( Evidence
-claude |
# Conflicts: # ext/fpm/src/guestlog.rs # ext/fpm/src/vm.rs
Member
Author
|
Round-3 verification fixes for this PR (K2, S1, K4, K5, N1, K3, N3, the docs and a reload fix) are tabled here: #95 (comment) -claude |
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.
Fixes #87: when php-fpm refuses to start in the guest, the launcher's log says why. Stacked on #91 (#86), which it needs: the reason goes over #86's acknowledged log channel. This PR targets
claude/microvm-log-86.Root cause (two parts)
error_log = /dev/stderr, and the guest's/devis a bare devtmpfs. udev makes/dev/stderr,/dev/stdout,/dev/stdinand/dev/fdon a normal system, and the guest has no udev, so those links didn't exist.NOTICE: PHP message: ….What changed
The
/devlinks.securecore-initcreates/dev/fdand/dev/std{in,out,err}(pointing into/proc/self/fd) right after mounting devtmpfs.A reported exit. When php-fpm's master exits, init:
php-fpm exited at boot, before it served (exit code N)(orwhile serving, orkilled by signal N) to the host's log, and php-fpm's last 20 lines plus that line to the console;A failed boot step is reported the same way. The log sender now starts before anything else in the boot.
The launcher's stop line quotes the guest. Each VM's
Inboxkeeps the guest's last 6 lines. Both "Firecracker exited before php-fpm answered" and "Firecracker exited (while serving)" quote them, instead of only pointing at console.log. When the guest said nothing, the launcher says so.test/ext-vault.sh5b reads only the launcher's log on the microVM (it no longer appends console.log). It also checks that the launcher's own stop line quotesphp-fpm exited at boot … (exit code.Evidence ([xps]; flock + sudo, logged, exit codes checked; fresh projects
sc86-*/sc86m-*)With this PR (and #91 under it), all eight suites pass on the microVM target:
The launcher's log for 5b now has the guest's lines and its own stop line, which quotes them:
a_wait_status_says_the_exit_code_or_the_signal,a_guest_that_stops_at_boot_is_quoted, andInbox::recentinthe_host_logs_each_frame_once_and_counts_what_is_missing.-D warnings(linux target): clean.Revert proof
FAIL opcache: the log explains the refusal. The launcher's only line wasFirecracker exited (exit status: 0) before php-fpm answered; see …/console.log./dev/stderrlink (an intermediate build of this PR), the launcher gotguest: securecore-init: php-fpm exited at boot, before it served (exit code 254)but not the extension's own words, and 5b still failed. Both parts are needed.closes #87
-claude