Repository navigation
Description
Goal
Remove reachability-based lifecycle decisions and memory sweeps. Perl strong references must use explicit owner slots with balanced acquisition and release. Historical origin: #1649.
Current checkpoint — 2026-11-21
PR #1938 remains open at 75dd7d542f1f86bff930beb1c5779be74fa27955, targets master, is DIRTY against current master, and has no human review. The tested local continuation is on wip/issue2043-handoff-20261121-154515, with HEAD at aebe3b0742 and uncommitted changes in the owner-ledger runtime and design checkpoint. This local branch remains recovery work and is not on the PR. The checkout is not ready for UAT.
The current working tree passes nice -n 19 timeout 900 make in 8m50 (/private/tmp/issue2043-owner-ledger-full-make.log), covering all five unit shards, Joni, and home integration. The shard-0 gate passed all 1,681 tests after fixing owner-slot release paths and async foreach source restoration. The candidate's direct lifecycle regressions pass on JVM and interpreter: eval/die destruction order 10/10, nested aggregate LIFO 2/2, hash list assignment 5/5, owner trace 3/3, and interpreted foreach source lifetime 7/7. make check-links passes with 0 errors.
DBIx::Class acceptance is still outstanding because DBIC_CLASS_TEST_ROOT is unset. The three diamond-prefetch tests skip cleanly in this environment; their earlier focused candidate runs passed, but must be repeated with DBIx::Class available. Moo and Template Toolkit also need focused retests against this latest lifecycle candidate. Do not publish this local branch directly: reconcile it with PR #1938 in an isolated worktree and validate that exact PR candidate before updating the PR.
Allocation minimization plan
Allocation reduction is a completion requirement for sweep removal alongside lower scan cost and correct Perl lifetime behavior. Keep per-frame LIFO cleanup and the explicit owner ledger; use maintained O(1) owner-kind counts for common yes/no checks and retain identity indexes only where identities are needed. Reuse lazy per-frame queues, recursive-release worksets, and cleanup-target probe queues/visited sets across roots instead of allocating a collection per candidate element. The focused chart test's probe workset initializations fell from one per 499 calls to 125 reusable worksets, about 75% fewer for that path. The duplicate direct weak-slot pass was folded into the probe.
The next implementation step is to release the dying aggregate's outgoing owner slots directly, avoiding nested target pre-scans and repeated incoming-owner ledger scans while preserving shared-owner, weak-reference, and destructor-rescue behavior. Track owner-slot visits, pre-scan roots/worksets, queue growth, and append/drain counts separately. Use paired JFR and elapsed-workload measurements on the same CPAN target; the short current recordings are diagnostic evidence only, not a speedup claim. Keep changes only when allocation and scan costs both improve and the hash, array, scalar-reference, and nested-frame regressions pass.
Validation
Earlier merged UAT candidate
nice -n 19 timeout 1800 makepasses on source commit5c011dfa0ein 9m36 (/private/tmp/issue2043-merged-uat-make.log).make check-linkspasses with 855 links checked and 0 errors (/private/tmp/issue2043-merged-uat-check-links-current.log).- The UAT launcher reports
5c011dfa0e; the smoke command printsUAT_OK. dev/modules/dbix_failed_connect_releases_handle.tpasses 3/3 anddev/modules/dbix_failed_connect_releases_storage.tpasses 4/4 on JVM and interpreter; system Perl validation is recorded in the design handoff.- On the merged candidate, DBIx
t/storage/error.tpasses 49/49 with no leaks.t/storage/txn.thas one exception line-reporting mismatch at assertion 89, present before the ownership fix; it reports no leaked references, while system Perl passes 128/128. The interpreter CPAN attempts previously hit their 300-second limits. - The full eight-target
make test-cpan-release-acceptanceremains incomplete. The prior run reached DBIx failures and ended before Excel finished; the isolated Excel profiling run below was deliberately stopped after capturing JFR and is not a module pass. - Current hosted checks for PR head
75dd7d542f1f86bff930beb1c5779be74fa27955pass; the PR is open and has no human review recorded.
Current local candidate
nice -n 19 timeout 900 makepasses on the current tested working tree in 8m50 (/private/tmp/issue2043-owner-ledger-full-make.log).- All five Java/Perl unit shards, Joni tests, and home integration tasks completed successfully. The previously failing async-await owner-depth cases and owner-slot tests pass in this run.
- Focused eval/die, nested aggregate destruction, list-assignment, owner-trace, and interpreted foreach source lifetime tests pass on JVM and interpreter; complete outputs are under
/private/tmp/issue2043-*-final-owner-fix.log. make check-linkspasses with 0 errors. The current source diff is not committed or on PR Remove memory sweeps through explicit Perl owner slots (#2043) #1938.- The full DBIx::Class, Moo, Template Toolkit, and complete eight-target CPAN release-acceptance gates remain required on the reconciled immutable PR candidate. The fork failure remains waived by the user's prior direction.
Remaining work
- Replace nested cleanup-target pre-scans and repeated incoming-owner checks with processing of the exact outgoing owner slots of dying arrays and hashes. Preserve weak observers, live shared aggregates, scalar-reference semantics, and destructor rescue.
- Measure scan visits, workset and queue allocations, sampled allocations, and elapsed time on the same
Excel::Writer::XLSXworkload; require paired evidence before claiming a broad speedup. - Run focused regressions for the previously observed Moo, Template Toolkit, and DBIx failures, then
nice -n 19 makeand the complete eight-target CPAN release-acceptance gate on one immutable source candidate. Stop after an actionable failure, fix it before continuing, and rerun required gates on the resulting candidate. The fork failure remains waived by the user. - Reconcile the tested local candidate with PR Remove memory sweeps through explicit Perl owner slots (#2043) #1938, publish only after required gates pass, and wait for human review. Do not mark the checkout UAT ready or merge before final evidence.
After #2043 lands, resume #2037 archive-lifetime and #2034 localized-STDERR work separately.
Activity
fglock commentedon Nov 12, 2026
Superseded by the current #2043 issue-body handoff. That handoff contains the active scope, evidence, branch status, blockers, and next actions.
fix: avoid package ownership for temporary topic aliases
fglock commentedon Nov 12, 2026
While triaging #2034/#2037, I found two cases that intersect the active ownership migration:
543f9dfef, JVM and interpreter detect the first asapplication/x-gzipand subsequent ones asapplication/octet-stream. A reduced File::MMagic loop reproduces only when each parser object is released; retaining them avoids the failure. I am deferring this lifetime case under Remove reachability-based memory sweeps from PerlOnJava #2043.local *STDERR = $io_scalartest fails on both backends, while direct object output,local *STDERR = *$io_scalar, and a normal lexical filehandle pass. This points to overloaded-object typeglob assignment inRuntimeGlob; I have not edited it because PR Remove memory sweeps through explicit Perl owner slots (#2043) #1938 currently changesRuntimeGlob,RuntimeIO, and both assignment backends.Could you reconcile #2037's released-parser/DATA-handle case with the current owner-slot work and advise when the #2034 typeglob-assignment path is safe to split or resume? I recorded both issue checkpoints with the reproducer matrix.
fglock commentedon Nov 12, 2026
Related deferral: Data::Alias porting is tracked in #1990. Its aliasing behavior depends on the owner-accounting and scope-lifetime work in this issue, so implementation is deferred until that work is ready. The independent Safe, strict module-loading, and tainted eval fixes are in PR #2044; that PR does not implement Data::Alias.
perf: prove temporary-root reachability through owner slots
test: cover cleanup deferred by temporary roots
fix: refresh aggregate owners after temporary-root lease
perf: prove temporary-root scalar reference owner chains
perf: prove temporary-root CODE owner chains
docs: refresh issue 2043 ownership checkpoint
perf: prove temporary-root state and alias owners
109 remaining items
docs: record reconciled owner-ledger candidate gate
docs: record exact owner-ledger acceptance results
perf: iterate untracked owner index on release
test: remove unused DBIx test dependency
docs: refresh owner ledger delivery checkpoint
docs: record owner ledger CI results
docs: refresh owner ledger checkpoint after 2171 merge
fix(netssleay): format CodeQL suppression comment
fix(netssleay): keep merged RSA suppression unchanged
docs: record owner ledger integration status
fix(crypto): require 2048-bit RSA keys
fix(netssleay): reject invalid key sizes before generation
docs: update owner ledger security checkpoint
fix(netssleay): parse key sizes from scalar text
docs: record RSA dataflow investigation