[BUG] Pending Open owner observation uses an invalid const call #20

Closed
opened 2026-09-30 04:25:48 +02:00 by erikinkinen · 0 comments
Owner

Summary

The pending-operation owner observer is declared const, but its Open arm calls a non-const method. This violates Rust constant-function call rules and prevents that source configuration from compiling. The owner query is runtime introspection and needs no const qualification.

Reproduction

Source-derived, not executed: inspect src/realm_io/external.rs at fdf4b2122e322e65578b31570a253865986446bc. PendingCall::owner is const and its Open arm invokes OpenCall::owner. Inspect src/realm_io/external/open.rs at that same revision: the target method is non-const and uses runtime option combinators. A build containing the real realm service reaches this definition. No compiler invocation or runtime reproduction was performed because testing and builds are deferred.

Expected and actual behavior

Expected: ordinary runtime custody observation can inspect the Open caller and intermediate candidate cleanup callers. Prior source: the enclosing const function calls a non-const method. Correction: remove the unnecessary const qualifier from the enclosing runtime observer. Retained symlink-frame cleanup callers also join the same observation without copying custody.

Environment and identity

  • Posixd source: fdf4b2122e322e65578b31570a253865986446bc, branch feature/posix-compat.
  • Integration graph: 07490592437dc4e52ab97b1746685e78c6594835 before coordinated adoption.
  • Toolchain, image digest, VM and firmware: not exercised for this source audit.
  • Last known working revision: not established.

Evidence and prior checks

Retained symlink following, active-context loop detection and original expansion cleanup are implemented and published as continued full Open/openat work: lib-ipc d1cc4cad, posixd 7d6a76fe, vfsd 10fb2e5c, docs 44bfa626, integration f69e2243.

Posixd assembles every raw page into its original counted request region before following any target byte. Original key, offset and unchanged total extent remain correlated. Relative targets retain their containing directory; absolute targets select only the original scope root. Raw unresolved suffixes, trailing-directory requirements and fresh component/dot/dot-dot search mediation survive substitution. Final exclusive creation refuses an existing link with EEXIST, and final NOFOLLOW refuses with ELOOP before reading target text; directory-prefix links still follow.

Noncopyable active expansion frames retain original symlink and temporary containing-directory pins in the existing counted shared-description arena. Their generational chain and suffix boundaries are internal ownership, never published fds. Complete frames retire both original pins before row reuse. Cancellation drains the complete original chain before cancelling the reserved fd; uncertain replies preserve native caller and original-key custody. The target-derived arena descriptor counts the actual enlarged owner types. Actual byte/owner exhaustion reports ENAMETOOLONG/ENFILE without a fixed follow count.

Cap-free native operation 0x6FC has exact 56-byte requests and 64-byte replies, echoing both complete link/parent contexts and canonical equality. VFS selects only original live pins and compares actual link/directory objects, provider/mount routes and complete retained mount ancestry. Fresh candidate or branch allocation numbers do not determine equality. Comparison calls no provider, obtains no clock and creates no pin. Earlier objects remain pinned throughout active comparison, preventing identity reuse. Returning to an active context reports ELOOP; completed expansions can recur sequentially. Full final permissions and original cleanup remain separate obligations.

The runtime owner observation defect is fixed and closed under the testing override. A const pending-operation observer called a non-const Open method. Removing the unnecessary const qualifier preserves runtime custody observation and includes active frame cleanup callers. The bug report records exact source-derived reproduction and explicitly states that no compiler or runtime reproduction was performed.

Eighteen new tests are authored and unrun: two wire, three raw-assembly, eight sealed-service, three native VFS and two ext-image packaging controls. Coverage includes non-UTF-8 bytes, a 700-byte assembled target, original parents and scope roots, nested and repeated links, more than forty sequential revisits, same-link aliases in distinct directories, direct/mutual/growing recursion, malformed later pages, storage exhaustion, final flags, scope isolation, mounted re-entry and cancellation with refused cleanup. The existing native binding workload now follows independently packaged literal ext links into mounted tmp, observes actual target data, and exercises recursive, NOFOLLOW and trailing-separator cases. The fixture is included only when the original native byte client is selected. No new test or VM workload has been executed.

Configured namespace-parent symlinks and conditional creation with authenticated process umask/default ACLs remain unfinished within full Open. No full Open acceptance credit is added: 16.91% weighted, 5.21% whole acceptance; 21/460 parents and 441/902 sub-items. Both full EriX guest-build generations and external Rust/LLVM guest rebuilding remain required and unperformed. Tests, builds, lint checks, documentation generation, VM/profiler execution and CI observation remain deferred; no execution pass or warning-free build is claimed.

Earlier evidence follows; retained client following and active-context comparison above are current.

Both declarations were read directly from the committed source. The runtime observation call path does not require constant evaluation. Existing caller-loss controls and the new nested-link cancellation and malformed-page controls retain original custody observations; new controls remain unrun. No test pass, build success or CI outcome is claimed.

Tracking

Native Open: #17.
Phase completion: erix/integration#65.

## Summary The pending-operation owner observer is declared const, but its Open arm calls a non-const method. This violates Rust constant-function call rules and prevents that source configuration from compiling. The owner query is runtime introspection and needs no const qualification. ## Reproduction Source-derived, not executed: inspect `src/realm_io/external.rs` at `fdf4b2122e322e65578b31570a253865986446bc`. `PendingCall::owner` is const and its Open arm invokes `OpenCall::owner`. Inspect `src/realm_io/external/open.rs` at that same revision: the target method is non-const and uses runtime option combinators. A build containing the real realm service reaches this definition. No compiler invocation or runtime reproduction was performed because testing and builds are deferred. ## Expected and actual behavior Expected: ordinary runtime custody observation can inspect the Open caller and intermediate candidate cleanup callers. Prior source: the enclosing const function calls a non-const method. Correction: remove the unnecessary const qualifier from the enclosing runtime observer. Retained symlink-frame cleanup callers also join the same observation without copying custody. ## Environment and identity - Posixd source: `fdf4b2122e322e65578b31570a253865986446bc`, branch `feature/posix-compat`. - Integration graph: `07490592437dc4e52ab97b1746685e78c6594835` before coordinated adoption. - Toolchain, image digest, VM and firmware: not exercised for this source audit. - Last known working revision: not established. ## Evidence and prior checks Retained symlink following, active-context loop detection and original expansion cleanup are implemented and published as continued [full Open/openat](https://git.erikinkinen.fi/erix/posixd/issues/17) work: [lib-ipc `d1cc4cad`](https://git.erikinkinen.fi/erix/lib-ipc/commit/d1cc4cadbb64a3fea7ce9cad081d97608fbe8c25), [posixd `7d6a76fe`](https://git.erikinkinen.fi/erix/posixd/commit/7d6a76feba3e0df346f5be8769df202276ba3d3d), [vfsd `10fb2e5c`](https://git.erikinkinen.fi/erix/vfsd/commit/10fb2e5c140e666a99b34d8c8b4258d7362ee9bf), [docs `44bfa626`](https://git.erikinkinen.fi/erix/docs/commit/44bfa62635acabd2502764cde1d3f3f45beaaee2), [integration `f69e2243`](https://git.erikinkinen.fi/erix/integration/commit/f69e22437e75ea161532f7f85ec0f47a7203d2a4). Posixd assembles every raw page into its original counted request region before following any target byte. Original key, offset and unchanged total extent remain correlated. Relative targets retain their containing directory; absolute targets select only the original scope root. Raw unresolved suffixes, trailing-directory requirements and fresh component/dot/dot-dot search mediation survive substitution. Final exclusive creation refuses an existing link with EEXIST, and final NOFOLLOW refuses with ELOOP before reading target text; directory-prefix links still follow. Noncopyable active expansion frames retain original symlink and temporary containing-directory pins in the existing counted shared-description arena. Their generational chain and suffix boundaries are internal ownership, never published fds. Complete frames retire both original pins before row reuse. Cancellation drains the complete original chain before cancelling the reserved fd; uncertain replies preserve native caller and original-key custody. The target-derived arena descriptor counts the actual enlarged owner types. Actual byte/owner exhaustion reports ENAMETOOLONG/ENFILE without a fixed follow count. Cap-free native operation 0x6FC has exact 56-byte requests and 64-byte replies, echoing both complete link/parent contexts and canonical equality. VFS selects only original live pins and compares actual link/directory objects, provider/mount routes and complete retained mount ancestry. Fresh candidate or branch allocation numbers do not determine equality. Comparison calls no provider, obtains no clock and creates no pin. Earlier objects remain pinned throughout active comparison, preventing identity reuse. Returning to an active context reports ELOOP; completed expansions can recur sequentially. Full final permissions and original cleanup remain separate obligations. The [runtime owner observation defect](https://git.erikinkinen.fi/erix/posixd/issues/20) is fixed and closed under the testing override. A const pending-operation observer called a non-const Open method. Removing the unnecessary const qualifier preserves runtime custody observation and includes active frame cleanup callers. The bug report records exact source-derived reproduction and explicitly states that no compiler or runtime reproduction was performed. Eighteen new tests are authored and unrun: two wire, three raw-assembly, eight sealed-service, three native VFS and two ext-image packaging controls. Coverage includes non-UTF-8 bytes, a 700-byte assembled target, original parents and scope roots, nested and repeated links, more than forty sequential revisits, same-link aliases in distinct directories, direct/mutual/growing recursion, malformed later pages, storage exhaustion, final flags, scope isolation, mounted re-entry and cancellation with refused cleanup. The existing native binding workload now follows independently packaged literal ext links into mounted tmp, observes actual target data, and exercises recursive, NOFOLLOW and trailing-separator cases. The fixture is included only when the original native byte client is selected. No new test or VM workload has been executed. Configured namespace-parent symlinks and conditional creation with authenticated process umask/default ACLs remain unfinished within full Open. No full Open acceptance credit is added: 16.91% weighted, 5.21% whole acceptance; 21/460 parents and 441/902 sub-items. Both full EriX guest-build generations and external Rust/LLVM guest rebuilding remain required and unperformed. Tests, builds, lint checks, documentation generation, VM/profiler execution and CI observation remain deferred; no execution pass or warning-free build is claimed. Earlier evidence follows; retained client following and active-context comparison above are current. Both declarations were read directly from the committed source. The runtime observation call path does not require constant evaluation. Existing caller-loss controls and the new nested-link cancellation and malformed-page controls retain original custody observations; new controls remain unrun. No test pass, build success or CI outcome is claimed. ## Tracking Native Open: https://git.erikinkinen.fi/erix/posixd/issues/17. Phase completion: https://git.erikinkinen.fi/erix/integration/issues/65.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:35:06 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erix/posixd#20
No description provided.