Skip to content

lock file update panic (conda records should be available) when pypi-dependencies used with different platform feature #1036

Closed

Description

@whsu00

Checks

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

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

Reproducible example

I'm running pixi install with pixi 0.17.0 on macOS 14.3 (23D56) with the following pixi.toml:

[project]
name = "project"
channels = ["conda-forge"]
platforms = ["linux-64", "osx-arm64"]

[dependencies]
python = "3.11.8"

[pypi-dependencies]
timeago = "==1.0.16"

[feature.test]
platforms = ["linux-64"]

[environments]
test = ["test"]

which outputs:

$ PIXI_BETA_WARNING_OFF=true RUST_BACKTRACE=full pixi install
thread 'main' panicked at /private/tmp/pixi-20240320-5661-pqalna/pixi-0.17.0/src/lock_file/update.rs:709:14:
conda records should be available now or in the future
stack backtrace:
   0:        0x103ca2eb8 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hc44f794219052ac6
   1:        0x103cd92e8 - core::fmt::write::h3be8b1c9593e07b4
   2:        0x103cbf808 - std::io::Write::write_fmt::h95a1e6c5537a96b5
   3:        0x103ca2d10 - std::sys_common::backtrace::print::h7b809dd1f18ea674
   4:        0x103cc1ea0 - std::panicking::default_hook::{{closure}}::he339b0dd23f9052e
   5:        0x103cc1c20 - std::panicking::default_hook::he9ee42fa25c512f5
   6:        0x103cc22c4 - std::panicking::rust_panic_with_hook::hd4ada112570991e5
   7:        0x103ca349c - std::panicking::begin_panic_handler::{{closure}}::h3f2b6a80c2b7e617
   8:        0x103ca30ec - std::sys_common::backtrace::__rust_end_short_backtrace::hc0b94e2951df3fae
   9:        0x103cc2054 - _rust_begin_unwind
  10:        0x103d95a28 - core::panicking::panic_fmt::h0ed3af01737be6a9
  11:        0x103d95f18 - core::option::expect_failed::h19312113d506f572
  12:        0x10300e9bc - pixi::lock_file::update::ensure_up_to_date_lock_file::{{closure}}::h83bc84fc90bbf1b9
  13:        0x1030148bc - pixi::lock_file::update::<impl pixi::project::Project>::up_to_date_lock_file::{{closure}}::he187014cc71838b2
  14:        0x102fca288 - pixi::environment::get_up_to_date_prefix::{{closure}}::h33932f1bf44399b5
  15:        0x102fcf58c - pixi::cli::execute_command::{{closure}}::h4f3a1ededd26f4fb
  16:        0x103017634 - tokio::runtime::park::CachedParkThread::block_on::hc5a65fd11f502405
  17:        0x102e5e924 - tokio::runtime::context::runtime::enter_runtime::hec84e431ddebd586
  18:        0x10305c1ac - tokio::runtime::runtime::Runtime::block_on::h2df7d4df2ba5b8e1
  19:        0x102ea98dc - pixi::main::hf8c3fafc026729f2
  20:        0x1030d3144 - std::sys_common::backtrace::__rust_begin_short_backtrace::hdb35a7ba60ed23df
  21:        0x1030d315c - std::rt::lang_start::{{closure}}::h43a2d165b41ff148
  22:        0x103cc1f40 - std::panicking::try::h3128bce4d588bc41
  23:        0x103ca5a4c - std::rt::lang_start_internal::h57a49fa80dd8b904
  24:        0x102ea99a0 - _main

Issue description

When pixi.lock does not exist, pixi install on osx-arm64 cannot to generate the pixi.lock file if both the default feature's pypi-dependencies exists, and the test feature specified as platforms = ["linux-64"] exists.

Removing the [pypi-dependencies] block, removing the test feature's platforms = ["linux-64"] line, or changing the test feature's platforms to platforms = ["osx-arm64"] all seem to avoid this issue and successfully generate the pixi.lock file (after the lock file already exists, updates to pixi.lock seem to work fine).

Expected behavior

pixi.lock is created normally, or an error is reported.

Activity

  1. added
    bug
    on Mar 21, 2024
  2. baszalmstra commented on Mar 21, 2024

    @baszalmstra
    Contributor

    Thanks for reporting this issue! I will take a look as soon as I can!

  3. glemaitre commented on Mar 24, 2024

    @glemaitre
    Contributor

    I assume that I encountered a similar issue with the following configuration (full config is available here):

    [project]
    ...
    channels = ["conda-forge", "pytorch"]
    platforms = ["linux-64", "osx-64", "osx-arm64"]
    
    ...
    
    # MPS-specfic configuration
    [feature.mps]
    platforms = ["osx-arm64"]
    
    ...
    
    [feature.mps.pypi-dependencies]
    llama-cpp-python = "*"
    
    # CPU-specfic configuration
    [feature.cpu]
    platforms = ["linux-64"]
    
    ...
    
    [feature.cpu.pypi-dependencies]
    llama-cpp-python = "*"
    
    [environments]
    mps = ["mps"]
    cpu = ["cpu"]

    Having both pypi-dependencies lead to a panic. However I have a useless stack trace:

    Details
    RUST_BACKTRACE=full pixi list -e cpu
     WARN pixi::project::manifest: BETA feature `[pypi-dependencies]` enabled!
    
    Please report any and all issues here:
    
    	https://github.com/prefix-dev/pixi.
    
    Turn this warning off by setting the environment variable `PIXI_BETA_WARNING_OFF` to `true`.
    
    thread 'main' panicked at /home/runner/work/pixi/pixi/src/lock_file/update.rs:709:14:
    conda records should be available now or in the future
    stack backtrace:
       0:     0x7f770b29612c - <unknown>
       1:     0x7f770a93f2b0 - <unknown>
       2:     0x7f770b257a62 - <unknown>
       3:     0x7f770b29a16e - <unknown>
       4:     0x7f770b2999b0 - <unknown>
       5:     0x7f770b29aaab - <unknown>
       6:     0x7f770b29a4cc - <unknown>
       7:     0x7f770b29a426 - <unknown>
       8:     0x7f770b29a411 - <unknown>
       9:     0x7f770a3f1054 - <unknown>
      10:     0x7f770a3f1632 - <unknown>
      11:     0x7f770a6a73ce - <unknown>
      12:     0x7f770a6bb285 - <unknown>
      13:     0x7f770a62c958 - <unknown>
      14:     0x7f770a5faf00 - <unknown>
      15:     0x7f770a85c039 - <unknown>
      16:     0x7f770a84ba99 - <unknown>
      17:     0x7f770a5545c3 - <unknown>
      18:     0x7f770a558880 - <unknown>
    
  4. added a commit that references this issue on Mar 25, 2024
    98be83d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions