Possible to cause segfaults with AWS options #944
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#944
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?
Reported by @cobaltcause on matrix:
segfault:
no segfault:
note that the latter is slow due to trying to contact instance metadata service (lol), which is fixed by
AWS_EC2_METADATA_DISABLED=true
version:
2d0109898a
Stack trace:
I think this needs a new repro. I have stared at the affected code: https://git.lix.systems/lix-project/lix/src/57b1c289b59240d8cc34adc4c4c59bb0042c612d/lix/libstore/s3-binary-cache-store.cc#L351-L359
and I can relatively successfully convince myself that all the variables in there are alive.
I also wonder if we can pull another of these out of a hat if we were to do some S3 work with a Lix built with ASan? I dunno. It all seems very strange.
At the very least the original invocation is definitely wrong and cannot work:
https://git.lix.systems/lix-project/lix/src/57b1c289b59240d8cc34adc4c4c59bb0042c612d/lix/libstore/s3-binary-cache-store.cc#L140-L144
AWS_DEFAULT_REGION="garage"
is evaluated during the constructor ofClientConfiguration
, then is wiped out withregion
from the Lix configuration (which means that it gets forced to us-east-1). So that invocation is definitely wrong and cannot work.Should Lix do something different there? idk maybe. Why is Lix crashing in that case? Who knows!
Let's try to repro it.
At least two bugs here:
Command:
However, I tried this all on the git commit mentioned above and didn't repro it. Strategically our goal is to get rid of the S3 substituter altogether and replace it with curl, so I don't think we are going to fix these bugs. However, until that happens, these bugs will persist.
If you find it happens again please reopen the issue :)