Repository navigation
Conversation
…t twin The spawn hook materializes the exec target but never translated the chdir option: posix_spawn's chdir is a file ACTION the preload never sees (and the fork path's chdir(2) runs where the mount points do not exist on the host), so a spawn with chdir: into the VFS died ENOENT before the materialized exec ran. sass-embedded's Open3.popen3(..., chdir: __dir__) is the standing case — metanorma's html-xml check dies there on v0.17.8 (tebako-runtime-ruby#333). The arm rides tebako_fs_exec_materialize_dir (the link unit's export since v2.8.74 — the pinned v2.8.76 unit carries it, header + archives verified): an in-image chdir_dir becomes the subtree's host twin, parent-side before the fork. Both platform variants carry it; the regeneration is mechanical (pristine upstream + the previous patch + the arm, diffed fresh — never a hand-edited hunk). Completes #152: the verb shipped when it closed, the hook never called it.
Contributor
Author
|
Superseded: #153 already landed the chdir translation on main (my local checkout was stale when I branched). The remaining gap is upstream consumption — tracking which source release carries it and what the runtime pins. |
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.
What
tfs_spawn_preparenever translated thechdir:option: posix_spawn'schdir is a file ACTION (invisible to the preload interpose) and the fork
path's
chdir(2)runs where the mount points do not exist on the host, soa spawn with
chdir:into the VFS died ENOENT before the materializedexec ran.
Reproduced minimally on v0.17.8 (macOS arm64): a payload image carrying a
native binary + a probe —
Open3.capture3("/pkg/native-true")passes;Open3.capture3("/pkg/native-true", chdir: "/pkg")diesErrno::ENOENT - /pkg. Full evidence in tebako-runtime-ruby#333.The production bite: metanorma 1.18.5's
html-xmlcheck — isodoccompiles SCSS through sass-embedded's
Open3.popen3(*CLI::COMMAND, "--embedded", chdir: __dir__),__dir__being the in-image gem dir. tebako-packages/metanorma#124's CI fails the
check on all four macOS legs and both windows legs (Linux passes).
The fix
Both
tfs_spawn_preparevariants (POSIX + windows) gain the arm, firstin the hook so shell and array forms both get it: a
chdir_dirnaming anembedded path becomes its host twin through
tebako_fs_exec_materialize_dir— the link unit's export since v2.8.74(the pinned v2.8.76 unit carries it: the header declares it and both
archives match). Parent-side, before fork — the hook's own
async-signal-safety discipline.
Completes #152: the subtree verb shipped when that issue
closed, but the hook never called it.
Verification
previous patch + the arm, diffed fresh — no hand-edited hunks) and
apply through
tools/applyon 3.1.7 / 3.2.11 / 3.3.9 / 3.4.9 / 4.0.7.(4.0.9 is not yet in versions.yml — the 4.0 series check rode 4.0.7.)
exec_materialize_dir×2).rebuild is the v0.17.9 line, then payload 1.18.5 + tools v2.8.75: the team's retarget on the current line tebako-packages/metanorma#124
re-pins.
Draft until CI is green end to end.