LATX, fix: Reclaim guest thread and seccomp ownership resources - #472
Open
LaurenIsACoder wants to merge 1 commit into
Open
LATX, fix: Reclaim guest thread and seccomp ownership resources#472LaurenIsACoder wants to merge 1 commit into
LaurenIsACoder wants to merge 1 commit into
Conversation
LaurenIsACoder
force-pushed
the
latx-memory-cleanup-draft
branch
from
September 8, 2026 03:20
5152d3e to
5f5f8d2
Compare
LaurenIsACoder
marked this pull request as ready for review
September 8, 2026 03:20
LaurenIsACoder
force-pushed
the
latx-memory-cleanup-draft
branch
from
September 8, 2026 03:41
5f5f8d2 to
862c68a
Compare
Guest thread exit and failed clone paths leave translator allocations, netlink staging buffers and seccomp filter references without an owner. TSYNC can also observe a child before its task and filter are initialized. Release thread-local translator resources on normal exit and KILL_THREAD, and roll back child-owned resources when thread creation fails. Restore netlink iovecs on receive failure and release pending buffers at teardown. Reference-count immutable filter chains across clone, installation, TSYNC, exit and fork. Publish initialized tasks under the CPU-list lock and use release/acquire ordering for filter roots seen by syscall readers. Add thread-cleanup and seccomp-lifetime regressions for partial teardown, failed clone, filter ownership and publication order. The isolated branch passed 26 lat-pr-fast tests, plus sanitizer ownership checks and focused thread-churn, failed-clone and concurrent TSYNC workloads. Guest integration tests requiring the unavailable toolchain were skipped. Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
LaurenIsACoder
force-pushed
the
latx-memory-cleanup-draft
branch
from
September 8, 2026 03:51
862c68a to
b427d56
Compare
LaurenIsACoder
force-pushed
the
latx-memory-cleanup-draft
branch
from
September 8, 2026 07:07
b427d56 to
bf21751
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.
Scope
Rebased replacement of the draft on
bfe17ae7c1. This PR now contains only guest-thread resource ownership fixes:The obsolete AOT-reader changes from the draft are intentionally absent: upstream
17b479de7877already fixed that reader, with regression coverage in9bdce3bbe1cb. Those upstream fixes remain intact. Separate AOT merge/mapping fixes are not part of this PR.Author self-review and combined validation
The actual published diffs were reviewed individually and checked against the local candidates. Follow-up corrections were folded into their existing commits; author/sign-off metadata updates preserved the per-PR source trees. The series remains six commits across #472, #473, #474, #475 and #476.
All five branches merge without conflicts on
bfe17ae7c1. The combined source tree80aaaaf13688387640f528d1c0bccb6a800f8d6ebuilds and passes 33/33 lat-pr-fast tests. On that combined binary, the 500-cycle KZT unload and retained-handle checks, 520-cycle SMC/fork checks, and 512 successful TSYNC operations alongside thread creation also complete successfully. A tests-disabled configuration registers no tests.The integration suite still reports 27 skips, including after selecting the available guest sysroot with
LATX_X86_64_SYSROOT: 25 require clang and two require the x86 cross compiler. These are not passes. This author self-review does not substitute for the upstream CI matrix, maintainer review or real-application acceptance.Validation
LoongArch64, GCC 15.3, x86_64-linux-user, LAT O1, KZT compiled in, release (
-DNDEBUG):No cache capacity changes, installed translator replacement or running-application restart. Full application memory/compatibility acceptance and unavailable integration configurations remain separate gates.