Uh oh!
There was an error while loading. Please reload this page.
gh-143120: pixi builds for free-threading and TSAN - #142872
Conversation
| script: | ||
| file: ../build.sh | ||
| env: | ||
| PYTHON_VARIANT: "free-threading" |
There was a problem hiding this comment.
copy-paste of asan/recipe.yaml, except this one line
There was a problem hiding this comment.
copy-paste of asan/pixi.toml
| script: | ||
| file: ../build.sh | ||
| env: | ||
| PYTHON_VARIANT: "tsan" |
There was a problem hiding this comment.
copy-paste of asan/recipe.yaml, except this one line
lucascolley
commented
Dec 17, 2025
no clue sorry I haven't seen this before |
crusaderky
commented
Dec 18, 2025
The tsan crash is due to the default $ sudo sysctl vm.mmap_rnd_bits
vm.mmap_rnd_bits = 32 # too high
$ sudo sysctl vm.mmap_rnd_bits=28 # reduce it
vm.mmap_rnd_bits = 28
|
hugovk
commented
Dec 23, 2025
There's a lot of copy/paste here, which can make maintenance harder. Does pixi have some concept of code reuse or parametrisation? Maybe not the best example, but something like GitHub Actions' reusable workflows? |
ngoldbaum
commented
Dec 23, 2025
@lucascolley is there anything we can do right now to reduce the duplication here? Or does that require fixes in pixi? |
lucascolley
commented
Dec 23, 2025
As mentioned in the README already, this is blocked on prefix-dev/pixi#4599. |
ngoldbaum
left a comment
There was a problem hiding this comment.
I opened an issue which is needed to make this mergeable. I'm also playing with a NumPy recipe based on this.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
crusaderky
commented
Jan 2, 2026
Ready for final review |
crusaderky
commented
Jan 23, 2026
The issue was that - if: c_compiler == "gcc" and "san" in variantthen:
- libsanitizer
- if: c_compiler == "clang" and "san" in variantthen:
- libcompiler-rtLinux happened to work because, at least on ubuntu-latest and on my desktop, libasan.so and libtsan.so are installed by default system-wide. I've opened an improvement ticket upstream: prefix-dev/pixi#5393 |
crusaderky
commented
Jan 23, 2026
I've removed the symlinks and replaced them with physical copies + a sync script. |
crusaderky
commented
Feb 2, 2026
Gentle ping. |
lucascolley
commented
Feb 3, 2026
trying this out downstream — I get a solve failure for an env that includes the ASAN Python on this branch, ASAN NumPy on main, removing the |
crusaderky
commented
Feb 3, 2026
ASAN NumPy on main points to a specific commit of CPython main. Could you try repointing numpy to numpy/numpy#30510 ? [dependencies]
python.git = "https://github.com/crusaderky/cpython"python.rev = "tsan"python.subdirectory = "Tools/pixi-packages/asan"numpy.git = "https://github.com/ngoldbaum/numpy"numpy.rev = "tsan-ft-pixi"numpy.subdirectory = "pixi-packages/asan" |
Anyway your problem is that you have an upper pin for python in pythran:
but this recipe builds Python 3.15. Alternatively you can fork pythran and just remove the pin and hope it was just out of an abundance of caution. |
lucascolley
commented
Feb 3, 2026
ah thanks, makes sense. Using pythran from git source may get around the issue in the short-term |
kumaraditya303
left a comment
There was a problem hiding this comment.
I tested the tsan+freethreading pixi config with the following and it worked:
[workspace]
channels = ["conda-forge"]
name = "cpython-pixi-test"platforms = ["linux-64"]
preview = ["pixi-build"]
[dependencies]
python = { git = "https://github.com/crusaderky/cpython", rev = "tsan", subdirectory = "Tools/pixi-packages/tsan-freethreading" }I'll merge this by tomorrow if there are no objections.
Uh oh!
There was an error while loading. Please reload this page.
| - Using a single `pixi.toml` and `recipe.yaml` for all package variants is blocked on https://github.com/prefix-dev/pixi/issues/4599 | ||
| - A workaround can be removed from the build script once https://github.com/prefix-dev/rattler-build/issues/2012 is resolved | ||
| - Using a single `pixi.toml` and `recipe.yaml` for all package variants is blocked on | ||
| [pixi-build-backends#532](https://github.com/prefix-dev/pixi-build-backends/pull/532) |
There was a problem hiding this comment.
No need to update the README.md right now, but noting this repo has been archived and the new PR is at prefix-dev/pixi#5364.
| ``` | ||
| To fix it, try reducing `mmap_rnd_bits`: | ||
| ```bash |
There was a problem hiding this comment.
Tip for next time: bash for when there's only commands, and console for when there's commands with output. Compare:
$ sudo sysctl vm.mmap_rnd_bits
vm.mmap_rnd_bits = 32 # too high for TSan
$ sudo sysctl vm.mmap_rnd_bits=28 # reduce it
vm.mmap_rnd_bits = 28$ sudo sysctl vm.mmap_rnd_bitsvm.mmap_rnd_bits = 32 # too high for TSan
$ sudo sysctl vm.mmap_rnd_bits=28 # reduce itvm.mmap_rnd_bits = 28Co-authored-by: Isuru Fernando <isuruf@gmail.com> Co-authored-by: Lucas Colley <lucas.colley8@gmail.com>
Co-authored-by: Isuru Fernando <isuruf@gmail.com> Co-authored-by: Lucas Colley <lucas.colley8@gmail.com>
Follow-up to #142469
freethreading: compiles with--disable-giltsan-freethreading: compiles with--disable-gil --with-thread-sanitizerrecipe.yamlandpixi.tomlall identical symlinksmacos-15-intelgithub runners)Tested in CI on https://github.com/crusaderky/hdf5-pixi