Repository navigation
Test build: launcher for Linux ARM and the Jetson (do not merge) - #65
Merged
Merged
Conversation
The Jetson uses glibc 2.35, and the bundled fpm binary is x86. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the Ubuntu 22.04 arm64 jobs, and poll Linux status from Node so the page CSP allows the check. Co-authored-by: Cursor <cursoragent@cursor.com>
Version 26.16.1 already downloads fpm-1.17.0-ruby-3.4.3-linux-arm64v8, so the system fpm install is obsolete. Co-authored-by: Cursor <cursoragent@cursor.com>
…is absent. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…us file is absent." This reverts commit bb7d4b6.
Windows Update stays one command. The Linux test fails until that restart lands. Co-authored-by: Cursor <cursoragent@cursor.com>
A closed window leaves Home and the tray. Update and Undo stop Home, run the command, and start Home again. Co-authored-by: Cursor <cursoragent@cursor.com>
The update controller does not hold the listen socket. Its child does. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
A descendant socket or a reused pid was treated as this Home, so Quit and stop left a retained Home running. Co-authored-by: Cursor <cursoragent@cursor.com>
The Mac branch stores that record under .elastos-launcher. The Linux Electron test still opened the runtime data file, so both Linux e2e jobs failed. Co-authored-by: Cursor <cursoragent@cursor.com>
A host pid and a process group are no longer signal targets, and a gateway on 127.0.0.1:8090 is left running. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the Mac identity check before a Darwin signal. Linux still signals only a confirmed update controller. Co-authored-by: Cursor <cursoragent@cursor.com>
The Windows restart of a 127.0.0.1 gateway stays tested. Linux still does not signal that gateway. Co-authored-by: Cursor <cursoragent@cursor.com>
Runtime smoke run 42449751731 reports a foreign program at localhost:8090 after Home is ready. installedGatewayKind returns null when the command does not start with the proved kernel path. This test fails on that result. Co-authored-by: Cursor <cursoragent@cursor.com>
macOS proves Home with the kernel path from the bundled helper. A gateway command does not have to start with that path. Linux still signals only the recorded update controller, and it does not adopt a gateway on 127.0.0.1:8090. Co-authored-by: Cursor <cursoragent@cursor.com>
… check. A pid reused after the start-time and exe reads received kill by pid number. The pidfd is opened first, and TERM and KILL both use that fd. If pidfd is unavailable, Stop does not signal. Co-authored-by: Cursor <cursoragent@cursor.com>
Repeated Stop after a send error or a timeout must return the helper, the FIFO directory, and the descriptors to the counts from before the Stop. Co-authored-by: Cursor <cursoragent@cursor.com>
dispose closes the helper on a terminal Stop failure and before a new owner replaces it. SIGTERM and SIGKILL still share one pidfd. The helper also exits after 60 seconds without a command, which is longer than the 15 second stop grace. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
A health lookup that does not return must not hang the probe. After SIGTERM, SIGKILL must still go through the same pidfd, and the helper must still request SIGKILL when its parent dies. Co-authored-by: Cursor <cursoragent@cursor.com>
The 60 second alarm started again after SIGTERM, so a slow lookup killed the helper and the later SIGKILL failed. The helper now stays up until close, FIFO end, or parent death. The localhost lookup uses the probe deadline. Co-authored-by: Cursor <cursoragent@cursor.com>
Collaborator
Author
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.
Why
The Mac end-to-end job reported another program at localhost:8090 after Home was ready. The launcher rejected a gateway command that did not start with the proved kernel path. macOS now uses the Mac proof. Linux still signals only the update controller.
Linux Stop could signal a reused pid. The controller identity was read from proc, and then kill used the pid number. If the controller exited in that gap, the signal reached the new process.
A failed Stop kept the pidfd helper. The next Stop replaced that controller and left the helper, its FIFO directory, and its descriptors until the launcher exited.
A 60 second idle alarm armed again after SIGTERM. Stop could still be in a localhost lookup with no deadline. The alarm then killed the helper, and SIGKILL failed.
What changed
installedGatewayKindtrusts a proved kernel path. The command must still name a gateway orhome --browser.disposecloses the pidfd helper when Stop fails and before another controller replaces it. The helper exits on that close, on FIFO end, or when the launcher process dies. It does not use an idle alarm.resolveLocalhostand the health probe give up when the lookup misses the probe deadline.Scope
Tradeoffs
Darwin Stop adopts the proved controller. Linux Stop keeps the process handle that this window spawned. A retained Linux Home is stopped through the pidfd helper in the package.
Closing the helper on every send error would also close it between SIGTERM and SIGKILL.
disposeruns when Stop gives up, or when a new controller replaces the old one.The lookup deadline unblocks Stop. This Node build does not cancel the system lookup, so a stuck resolver can still hold the process until the operating system returns.
Blast Radius
A person who starts Home on a Mac gets the Mac ownership proof. A person on Linux still cannot stop a 127.0.0.1:8090 gateway from this launcher. Stop on Linux no longer uses kill on the controller pid number. A failed Stop no longer leaves a helper running until the launcher exits. A slow health lookup no longer kills the helper before SIGKILL.
Verification
dispose, two failed Stops left 2 helpers, 2 FIFO directories, and 4 descriptors. After it, the send-error test and the timeout test return those counts to the baseline.2,0,60,60. The SIGKILL write failed with EPIPE. The signal log was15. After the removal, a 61 second wait left the helper running (EXIT_DURING_WAIT null). SIGKILL returnedsent. The signal log was15,9. The alarm log was2,0.the health probe returns when localhost lookup does not answertimed out at 2000 ms. After the deadline, that test passed in 203 ms.elastos-heavy node scripts/test.jspassed 321 tests, failed 0, and skipped 3, at 43e5cbe.scripts/build-linux-pidfd.js.