mamba: Reproducible micromamba segfault when installing from lockfile after previous install
I can reproduce in a Dockerfile built on GitHub Actions.
I put some effort into making this more minimal, but didn’t get very far. I hope this makes it possible for someone to easily do a trace. 😃
High-level overview:
- Select some particular dependencies
- Do
micromamba install, with or without lockfile. (I used a lockfile for the first install command to guarantee reproducibility.) - Do
micromamba installfrom a new-style lockfile produced byconda-lock
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 57 (39 by maintainers)
Commits related to this issue
- Merge pull request #1893 from Klaim/klaim/fix-env-lockfile-install-crash Fixed: crash when installing with env-lockfile (fixes #1882) — committed to tl-hbk/mamba by JohanMabille 2 years ago
It is the commit that introcuced the lock file feature in the first place. So I ran a bisect with 1 step 😄
Probably the language @wolfv was most familiar with, which is a very good reason 😃
Livestream!
This worked for me to enable debug symbols:
Culprit:
I like to use ASan to debug these kinds of things. Luckily Mamba already has a compile flag for that
Output:
Actually this looks harmless so I’m following the recommendation to use
ASAN_OPTIONS=detect_container_overflow=:This looks much more suspicious. Use after free, responsible for almost all security vulnerabilities in C/C++ code 😃
I wonder if this is a bug in libsolv. No, doesn’t work with older versions either.
I’m not deep enough into libsolv terrain to understand what’s wrong here. Starting another
git bisect…Bug exists in
micromamba-0.24.0.Now testing 5c41be2f8239a40b4456fdaf86db6d1b367994d2 which added the feature.