0.5.0 --- repin the C library, whose backends fixed a bounded transfer - #11
Merged
Conversation
openkal-musl 0.9.0 answers `truncate(2)`, repins openkal-linux 0.7.1 and openkal-macos 0.6.1, and makes a build able to state which version of the C library it holds. WHAT A PROGRAM ABOVE THIS PACKAGE GETS. Two things that did not work now do, and neither is a C++ problem --- both are `std::filesystem` reaching a system call. `std::filesystem::copy_file` reported `Resource temporarily unavailable` for two ordinary files. libc++ opens a copy's source with `O_RDONLY | O_NONBLOCK | O_BINARY`, which on a kernel is meaningless for a regular file and is ignored; openkal-musl routes an `O_NONBLOCK` descriptor through the bounded-transfer path and expresses `copy_file_range` as a read/write loop, so every byte of a file copy went through it --- and the backends' `kal_timeout_read` decoded a borrowed `kal_stream` handle with the decoder for an OWNED one, waiting upon the descriptor below the one it then transferred upon. `EAGAIN` is not in libc++'s fallback list, so it fell back neither to `sendfile` nor to a stream copy and the error reached the caller verbatim. `std::filesystem::resize_file` worked for no path at all, because libc++ expresses it as the name-shaped `truncate` and only the descriptor-shaped one was answered. Both reported in mcpplibs/openkal-linux#13. AND A CONSUMER CAN NOW SAY WHAT IT BUILT. `OPENKAL_MUSL_TRACE=enosys` names the C library's version before the program runs, whether or not anything is missing, and `uname`'s release field carries it too. Two rounds of that issue were answered against the wrong version because neither existed. Also here: the two fetches of the installer retry transport failures. `--retry` covers a transient HTTP status and a timeout and does not cover `curl: (35) Recv failure: Connection reset by peer`, which is what a row of a sibling repository's matrix met today, thirteen seconds in, with nothing wrong in it.
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.
Repins the C library to openkal-musl 0.9.0, which answers
truncate(2)(0.8.0), repins openkal-linux 0.7.1 and openkal-macos 0.6.1, and makes a build able to state which version of the C library it holds (0.9.0).What a program above this package gets
Two things that did not work now do, and neither is a C++ problem — both are
std::filesystemreaching a system call.std::filesystem::copy_filereportedResource temporarily unavailablefor two ordinary files. libc++ opens a copy's source withO_RDONLY | O_NONBLOCK | O_BINARY(operations.cpp:378), which on a kernel is meaningless for a regular file and is ignored. openkal-musl routes anO_NONBLOCKdescriptor through the bounded-transfer path and expressescopy_file_rangeas a read/write loop, so every byte of a file copy went through it — and the backends'kal_timeout_readdecoded a borrowedkal_streamhandle with the decoder for an owned one, waiting upon the descriptor below the one it then transferred upon.EAGAINis not in libc++'s fallback list forcopy_file_range(operations.cpp:310-313), so it fell back neither tosendfilenor to a stream copy and the error reached the caller verbatim.std::filesystem::resize_fileworked for no path at all. libc++ expresses__resize_fileasdetail::truncate(p.c_str(), size)(operations.cpp:966) — the name-shaped call — and only the descriptor-shapedftruncatehad a case.Both reported in mcpplibs/openkal-linux#13.
Also here
The two fetches of the xlings installer retry transport failures.
--retrycovers a transient HTTP status and a timeout; it does not covercurl: (35) Recv failure: Connection reset by peer, which is what a row of openkal-musl's matrix met today, thirteen seconds in, with nothing wrong in it. A red row that names a defect nobody introduced costs a reader the time it takes to establish that, every time.And a consumer can now say what it built
Named before the program runs and whether or not anything is missing. Two rounds of mcpplibs/openkal-linux#13 were answered against the wrong version because neither that line nor an honest
unamerelease field existed. With the variable unset the library writes zero bytes to the error stream, asserted on every row.Verified through the index, not through working trees
That is the only way to examine what a consumer receives — every repository in this family substitutes working trees for its dependencies in CI, so none of those runs examines the index entry, the archive, its hash, or the resolved graph.
One program, one source file, differing only in the version its manifest names:
Sixteen pipes, a byte written into each,
poll(POLLIN)on each reading end. One of sixteen passed under the defect — the first, the only one whoseN-1was not the previous pipe's writing end.