Skip to content

When TSAN build fails for env reasons, it corrupts the build dir #144392

Description

@crusaderky

Bug report

Bug description:

A failure to build TSAN caused by incorrect runtime configuration in the OS leaves me with a broken build directory, unrecoverable after I fix the OS setting.
I'm reproducing this issue with #142872, but I have no reason to believe it is pixi-specific.

Reproducer

  1. In Linux, call
sudo sysctl vm.mmap_rnd_bits=32

which should be the default for Ubuntu 24.04 (but notably not for ubuntu-24.04 github workers).

  1. With pixi >=0.63.2, have pixi.toml:
[workspace]
channels = ["https://prefix.dev/conda-forge"]
platforms = ["linux-64"]
preview = ["pixi-build"]
[dependencies]
python.git = "https://github.com/crusaderky/cpython"python.rev = "tsan"python.subdirectory = "Tools/pixi-packages/tsan-freethreading"

(which points to #142872) and run pixi s.
It should crash on a test command with bus error as soon as it test-runs the python interpreter it just built, because TSAN does not support vm.mmap_rnd_bits higher than 28.

  1. Run
sudo sysctl vm.mmap_rnd_bits=28
  1. Run again pixi s. It will resume using the previous build dir in .pixi/build with make install (./configure earlier completed successfully, so it is skipped) and crash again, until you run pixi clean or rm -r .pixi/build, citing missing files in the install directory.

Expected behaviour

make install resumes from the latest failed step, without skipping any.
To my underestanding, vm.mmap_rnd_bits should not impact on the compiled binaries, as it should be read at runtime by them for the first time when you execute them.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions