pixi icon indicating copy to clipboard operation
pixi copied to clipboard

failed to initialize global rayon pool: ThreadPoolBuildError { kind: GlobalPoolAlreadyInitialized }

Open elephantum opened this issue 11 months ago • 2 comments

Checks

  • [x] I have checked that this issue has not already been reported.

  • [x] I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

Commands I ran and their output:

pixi install

 WARN overriding build backend with system prefixed tools
 WARN metadata cache disabled for build backend 'pixi-build-ros' (system/path-based backends always regenerate metadata)
▪ fetching repodata    [━━━━━━━━━━━━━━━━━━━━] 
▪ solving              [━━━━━━━━━━━━━━━━━━━━]  4/4                                                                                                                                                                                                                                                                     
▪ preparing packages   [━━━━━━━━━━╾─────────] 10/18                                                                                                                                                                                                                                                                    
thread '<unnamed>' panicked at /home/runner/.cargo/git/checkouts/uv-c9e40703e19509a8/d5f3933/crates/uv-configuration/src/threading.rs:68:10:
failed to initialize global rayon pool: ThreadPoolBuildError { kind: GlobalPoolAlreadyInitialized }
stack backtrace:
   0:          0x37e78f0 - <unknown>
   1:          0x2510c34 - <unknown>
   2:          0x37e718c - <unknown>
   3:          0x37e7790 - <unknown>
   4:          0x37e6c94 - <unknown>
   5:          0x381fef4 - <unknown>
   6:          0x381fe6c - <unknown>
   7:          0x3824fdc - <unknown>
   8:          0x250faa8 - <unknown>
   9:          0x2515b84 - <unknown>
  10:          0x3a1ec40 - <unknown>
  11:          0x380aadc - <unknown>
  12:          0x3045414 - <unknown>
  13:          0x2a13bf8 - <unknown>
  14:          0x2a0e4d0 - <unknown>
  15:          0x2ceb94c - <unknown>
  16:          0x3825480 - <unknown>
Error:   ⚠ the operation was cancelled

files that reproduces my issue (basically it is a vanilla workspace with newly created ROS 2 package): ./pixi.toml

[workspace]
authors = ["Andrey Tatarinov <[email protected]>"]
channels = ["conda-forge", "robostack-jazzy"]
name = "jetson-demo"
platforms = ["linux-64", "linux-aarch64"]
version = "0.1.0"
preview = ["pixi-build"]

[tasks]

[dependencies]
ros-jazzy-ros-base = ">=0.11.0,<0.12"
ros-jazzy-demostand-launch ={ path = "demostand_launch" }

./demostand_launch/pixi.toml

[package.build.backend]
channels = [
  "https://prefix.dev/pixi-build-backends",
  "https://prefix.dev/conda-forge",
]
name = "pixi-build-ros"
version = "*"

[package.build.config]
distro = "jazzy"
extra-input-globs = [
    "launch/**",
]

./demostand_launch/package.xml

<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
  <name>demostand_launch</name>
  <version>0.0.0</version>
  <description>TODO: Package description</description>
  <maintainer email="[email protected]">elephantum</maintainer>
  <license>TODO: License declaration</license>

  <buildtool_depend>ament_cmake</buildtool_depend>

  <test_depend>ament_lint_auto</test_depend>
  <test_depend>ament_lint_common</test_depend>

  <exec_depend>usb_cam</exec_depend>
  <exec_depend>foxglove_bridge</exec_depend>
  <exec_depend>rosbridge_suite</exec_depend>

  <export>
    <build_type>ament_cmake</build_type>
  </export>
</package>

./demostand_launch/CMakeLists.txt

cmake_minimum_required(VERSION 3.8)
project(demostand_launch)

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
  add_compile_options(-Wall -Wextra -Wpedantic)
endif()

# find dependencies
find_package(ament_cmake REQUIRED)
# uncomment the following section in order to fill in
# further dependencies manually.
# find_package(<dependency> REQUIRED)

# Install launch files
install(DIRECTORY
  launch/
  DESTINATION share/${PROJECT_NAME}/
)

if(BUILD_TESTING)
  find_package(ament_lint_auto REQUIRED)
  # the following line skips the linter which checks for copyrights
  # comment the line when a copyright and license is added to all source files
  set(ament_cmake_copyright_FOUND TRUE)
  # the following line skips cpplint (only works in a git repo)
  # comment the line when this package is in a git repo and when
  # a copyright and license is added to all source files
  set(ament_cmake_cpplint_FOUND TRUE)
  ament_lint_auto_find_test_dependencies()
endif()

ament_package()

pixi info output:

System
------------
       Pixi version: 0.62.1
        TLS backend: rustls
           Platform: linux-aarch64
   Virtual packages: __unix=0=0
                   : __linux=5.15.148=0
                   : __glibc=2.35=0
                   : __cuda=12.6=0
                   : __archspec=1=cortex_a72
          Cache dir: /home/elephantum/.cache/rattler/cache
       Auth storage: /home/elephantum/.rattler/credentials.json
   Config locations: No config files found

Global
------------
            Bin dir: /home/elephantum/.pixi/bin
    Environment dir: /home/elephantum/.pixi/envs
       Manifest dir: /home/elephantum/.pixi/manifests/pixi-global.toml

Workspace
------------
               Name: jetson-demo
            Version: 0.1.0
      Manifest file: /home/elephantum/ainventory-demo/pixi.toml
       Last updated: 20-12-2025 23:05:50

Environments
------------
        Environment: default
           Features: default
           Channels: conda-forge, robostack-jazzy
   Dependency count: 2
       Dependencies: ros-jazzy-ros-base, ros-jazzy-demostand-launch
   Target platforms: linux-aarch64, linux-64
    Prefix location: /home/elephantum/ainventory-demo/.pixi/envs/default

Other files (e.g. script files, source files, etc.):

Issue description

I've observed this behavior both on RaspberryPi and on Jetson Orin (Jetpack 6.2.1)

On Jetson, I had to recompile and substitute pixi-build-ros because it did not work otherwise, and metadata cache is disabled because of this. It seems that it triggers this behavior reliably. (On rpi I did not substitute build backend and it happened once after each change)

Expected behavior

pixi works without failures

elephantum avatar Dec 20 '25 19:12 elephantum

If necessary, I can provide remote access to Jetson Orin system

elephantum avatar Dec 21 '25 19:12 elephantum

I guess it's similar with : https://github.com/prefix-dev/pixi/issues/5184

nichtmacho avatar Jan 02 '26 10:01 nichtmacho