kj fibers are not supported on musl libc #955
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
Feature/S3
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
ux
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#955
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the bug
Musl does not implement the
setcontext
function, which is required by kj fibers that were presumably introduced indb0ed505e9
.Steps To Reproduce
pkgsStatic.lixPackageSets.git.lix
from https://github.com/NixOS/nixpkgs/pull/424775)installCheckPhase
, with the following excerpt from the log:Expected behavior
Lix is compatible with musl libc.
nix --version
outputNot applicable since the build fails. The build was attempted on commit
8bbd5e1d0d
.fyi we could fix the capnproto derivation to support this via libucontext: https://github.com/capnproto/capnproto/issues/1167
https://github.com/kaniini/libucontext?tab=readme-ov-file#caveats, the fact that
pkgsStatic.libucontext
fails to build due to trying to create a dynamic library, and that another library-based stackful coroutine implementation was already removed do not exactly make me hopeful.I'm working on this, there's a bunch of really dumb bugs in the nixpkgs packaging of that. Will send you the pr.
there's currently only one fiber user in the codebase, and its parent function (
performOp
in the daemon) is sync and fully linear. that user can be converted to not using fibers and calling fcntl on the connection. adding a dubiously-complete library as a dependency seems like a more dangerous move than adding a few fcntl calls, especially since we know from the client side that this works perfectly well.we were planning on adding another user (optimizing sqlite db file lock acquisition), but that can be fully optional and just not used if fibers aren't available.
@jade wrote in #955 (comment):
If that's just a nixpkgs bug that should fully resolve the
pkgsStatic.libucontext
build failure concern. However, to make the "library-based stackful coroutine implementation" concern more explicit, I remember boost context being thrown out to much rejoicing. Are we sure this one is going to turn out better?https://github.com/NixOS/nixpkgs/pull/432321 https://github.com/NixOS/nixpkgs/pull/432323 here's the two fix prs we have to land and backport
Ib4e1531fe920847d8e30a42e8df393ace549f52e
defaults to not using fibers on musl now just to be safe