Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests failing after libmamba 1.4.2 release #186

Closed
2 of 8 tasks
costrouc opened this issue Apr 14, 2023 · 12 comments
Closed
2 of 8 tasks

Tests failing after libmamba 1.4.2 release #186

costrouc opened this issue Apr 14, 2023 · 12 comments
Assignees
Labels
severity::2 critical; broken functionality with an unacceptably complex workaround source::contributor created by a frequent contributor type::bug describes erroneous operation, use severity::* to classify the type

Comments

@costrouc
Copy link
Contributor

costrouc commented Apr 14, 2023

Checklist

  • I added a descriptive title
  • I searched open reports and couldn't find a duplicate

What happened?

The following tests are failing in CI right after we released the 23.3.0 conda-libmamba-solver. It is hard to assign a definitive issue title since I still don't understand the core issue. https://github.com/conda/conda-libmamba-solver/actions/runs/4703354936/jobs/8341750886.

  • tests/core/test_solve.py::test_force_remove_1 (different package versions Windows/Linux/OSX)
  • tests/core/test_solve.py::test_aggressive_update_packages (different package versions Windows/Linux/OSX)
  • tests/core/test_solve.py::test_update_deps_2 (Unsatisfiable error Windows/Linux/OSX)

These errors happen on all OSs. We are only seeing this on conda-forge but this is due to 1.4.2 not being in defaults yet.

The following unit-tests fail on conda-libmamba-solver

  • conda-libmamba-solver-src/tests/test_modified_upstream.py::test_freeze_deps_1
  • conda-libmamba-solver-src/tests/test_modified_upstream.py::test_conda_downgrade
  • conda-libmamba-solver-src/tests/test_modified_upstream.py::test_fast_update_with_update_modifier_not_set
@costrouc costrouc added the type::bug describes erroneous operation, use severity::* to classify the type label Apr 14, 2023
@costrouc costrouc changed the title Recent CI failures related to tests Recent CI failures related to tests after 23.4.1 release Apr 14, 2023
@costrouc costrouc self-assigned this Apr 14, 2023
@jaimergp jaimergp changed the title Recent CI failures related to tests after 23.4.1 release Tests failing after libmamba 1.4.2 release Apr 21, 2023
@jaimergp
Copy link
Contributor

Summarizing findings in #187:

We are skipping 1.4.2 in CI now to make things pass but it's very likely this will break again in an eventual 1.4.3 or 1.5.0. We need to establish what's exactly broken and communicate with the mamba team.

@jaimergp jaimergp mentioned this issue Apr 21, 2023
43 tasks
@jaimergp

This comment was marked as duplicate.

@costrouc
Copy link
Contributor Author

We're investigating this issue and once we understand the implications we will consider patching repodata. Currently we don't think this is a serious breakage in older releases.

@jaimergp jaimergp added this to the May 2023 release milestone Apr 24, 2023
@costrouc
Copy link
Contributor Author

costrouc commented Apr 24, 2023

I'm using #191 (comment) workflow to git bisect the issue. Looking between libmamba 1.4.1 <-> 1.4.2 release.

My bisection log

git bisect start 'libmambapy-1.4.2' 'libmambapy-1.4.1'
30ca2e2d bad release libmamba 1.4.2, libmambapy 1.4.2, mamba 1.4.2, micromamba 1.4.2
6ed35f84 good release libmamba 1.4.1, libmambapy 1.4.1, mamba 1.4.1, micromamba 1.4.1

git bisect good a3597e33ff4a7a184f97790a926094f1512f2a1e
a3597e33 good fix: Improve message after the env creating with micromamba (#2425)

git bisect bad d12ea0179558682bbb0b1aec96ab689aea6889b2
d12ea017 bad Fix segfault in add_pin/all_problems_structured (#2428)

git bisect bad 0345b9d7f8d65b0795c4ba73a255cc06c7b23b13
0345b9d7 bad Use custom function to properly parse matchspec (#2433)

git bisect good e5451c94f9031792341074b7d0742b2f455217dc
e5451c94 good Replaced libtool 2.4.6_9 with libtool 2.4.7-3 in vcpkg builds (#2439)

0345b9d7f8d65b0795c4ba73a255cc06c7b23b13 is the first bad commit

All tests pass on e5451c94 @ Replaced libtool 2.4.6_9 with libtool 2.4.7-3 in vcpkg builds (#2439)

All tests fail on 0345b9d7 @ Use custom function to properly parse matchspec (#2433)

So @jaimergp for your meeting tomorrow the failing commit is mamba-org/mamba@0345b9d

@jaimergp
Copy link
Contributor

Excellent job @costrouc! I updated the mamba team as well. It's a pity that the PR is a single commit so we can't bisect further, but maybe we can start reverting single blocks in the diff and see if the test starts passing.

For example, this line modifies the job_flag a bit, if you compare it to its equivalent predecessor (note the extra | SOLVER_SOLVABLE_PROVIDES).

@jezdez jezdez added severity::2 critical; broken functionality with an unacceptably complex workaround source::contributor created by a frequent contributor labels May 24, 2023
@costrouc
Copy link
Contributor Author

Appologies ahead of time for the long post and some of it may/may not be helpful. I am showing the steps I ran to reproduce and at the end I am investigating the different integers supplied to libsolv.

Research into libmamba breakage. Check the git branches:

  • conda :: upstream/main latest
  • conda-libmamba-solver :: feat-mamba-dev
  • mamba :: 0345b9d7 * Use custom function to properly parse matchspec (#2433)
$  docker run -it --rm --platform=linux/amd64 \
         -v /home/costrouc/p/conda/conda:/opt/conda-src \
         -v /home/costrouc/p/conda/conda-libmamba-solver:/opt/conda-libmamba-solver-src \
         -v /home/costrouc/p/mamba-org/mamba:/opt/mamba-src \
         ghcr.io/conda/conda-ci:main-linux-python3.10-conda-forge bash
$  source /opt/conda-libmamba-solver-src/dev/linux/bashrc.sh

Not run the test that will fail.

  cd /opt/conda-src
  pytest tests/core/test_solve.py::test_force_remove_1 # PASS
  CONDA_SOLVER=libmamba pytest tests/core/test_solve.py::test_force_remove_1 # FAIL
  pytest tests/core/test_solve.py::test_aggressive_update_packages # PASS
  CONDA_SOLVER=libmamba pytest tests/core/test_solve.py::test_aggressive_update_packages # FAIL

They both PASS when CONDA_SOLVER=classic and FAIL when CONDA_SOLVER=libmamba. Both are quite convoluted tests and it is hard to identify exactly what causes the failure. So my goal is to find an approach that in the future we could also use to help debug issues.

Testing with the latest on mamba and I get the same results:

  • dac8bfd7 * main upstream/main fix different behavior between --version and -V options (#2539)

Now testing where I know the exact breaking changes are and can still reproduce the error.

  • e5451c94 @ Replaced libtool 2.4.6_9 with libtool 2.4.7-3 in vcpkg builds (#2439)

I had an idea of being able to detect changes by looking at
mamba-org/mamba@0345b9d#diff-6a1aa709238cca66bca724329d07cd1a9da34068b774c70416245c929aed963dR279. This
line would allow us to compare the old vs. new and see if we get the same results. ... After some investigation it looks like the test I am concerned about doesn't touch this line.

On line ~480 I am directly looking at the information being passed to libsolv in the try_solve function. He we can directly inspect what is being passed to libsolv in solver.cpp.

#include <iostream>
#include <list>

  bool MSolver::try_solve()
  {
     ...
      // DEBUG
      std::cout << "\n >>> DEBUG SOLVER STATE <<<" << std::endl;
      std::cout << "M_FLAGS: ";
      for (auto v : m_flags)
        std::cout << "(" << v.first << " " << v.second << ") ";
      std::cout << std::endl;

      std::cout << "M_JOBS: ";
      const auto l = std::list<::Id>(m_jobs->begin(), m_jobs->end());
      for (auto v : l)
        std::cout << v << " ";
      std::cout << std::endl;
      ...
  }

I've checked this is reproducible in that I can run the same test multiple times with same integers being produced.

First the output when test pass using the commit e5451c94

$ CONDA_SOLVER=libmamba pytest tests/core/test_solve.py::test_force_remove_1 -s
...
 >>> DEBUG SOLVER STATE <<<
M_FLAGS: (1 1) (4 1) (26 1) (24 1) (12 1)
M_JOBS: 259 -2147482764
...
 >>> DEBUG SOLVER STATE <<<
M_FLAGS: (1 1) (4 1) (26 1) (24 1) (12 1)
M_JOBS: 2563 -2147483603 2563 -2147482889 262659 214
...
 >>> DEBUG SOLVER STATE <<<
M_FLAGS: (1 1) (4 1) (26 1) (24 1) (12 1)
M_JOBS: 259 -2147482764 768 1145 259 -2147482763 768 1147 259 -2147482762 768 1149 259 -2147482761 768 1151 259 -2147482760 768 1153 259 -2147482759 768 1155 2560 1157 131843 218

When it is passing. Also I see the following warning when the test was passing

libmamba Selected channel specific (or force-reinstall) job, but package is not available from channel. Solve job will fail.
error    libmamba Selected channel specific (or force-reinstall) job, but package is not available from channel. Solve job will fail.
error    libmamba Selected channel specific (or force-reinstall) job, but package is not available from channel. Solve job will fail.
error    libmamba Selected channel specific (or force-reinstall) job, but package is not available from channel. Solve job will fail.
error    libmamba Selected channel specific (or force-reinstall) job, but package is not available from channel. Solve job will fail.
error    libmamba Selected channel specific (or force-reinstall) job, but package is not available from channel. Solve job will fail.
error    libmamba Selected channel specific (or force-reinstall) job, but package is not available from channel. Solve job will fail.

Now for the failing test when I set the right git commit dac8bfd7

$ CONDA_SOLVER=libmamba pytest tests/core/test_solve.py::test_force_remove_1 -s
...
 >>> DEBUG SOLVER STATE <<<
M_FLAGS: (1 1) (4 1) (26 1) (24 1) (12 1)
M_JOBS: 259 -2147482764
...
 >>> DEBUG SOLVER STATE <<<
M_FLAGS: (1 1) (4 1) (26 1) (24 1) (12 1)
M_JOBS: 2563 -2147483603 2563 -2147482889 262659 214
...
 >>> DEBUG SOLVER STATE <<<
M_FLAGS: (1 1) (4 1) (26 1) (24 1) (12 1)
M_JOBS: 259 1145 771 1145 259 1147 771 1147 259 1149 771 1149 259 1151 771 1151 259 1153 771 1153 259 1155 771 1155 2563 1157 131843 218

 >>> DEBUG SOLVER STATE <<<
M_FLAGS: (1 1) (4 1) (26 1) (24 1) (12 1)
M_JOBS: 3331 216 3331 220 3331 222 3331 224 3331 226 3331 228 2819 216 2819 220 2819 222 2819 224 2819 226 2819 228 771 216 771 220 771 222 771 224 771 226 771 228 2563 1157 131843 218

@costrouc
Copy link
Contributor Author

The different is in the third stage of the test:

GOOD passing test

M_JOBS: 259 -2147482764 768 1145 259 -2147482763 768 1147 259 -2147482762 768 1149 259 -2147482761 768 1151 259 -2147482760 768 1153 259 -2147482759 768 1155 2560 1157 131843 218

vs.

BAD failing test

M_JOBS: 259 1145 771 1145 259 1147 771 1147 259 1149 771 1149 259 1151 771 1151 259 1153 771 1153 259 1155 771 1155 2563 1157 131843 218

Many of the numbers are the same.

@costrouc
Copy link
Contributor Author

costrouc commented May 26, 2023

Continuing on with the work. Here I have checked in two branches where I can compare the libsolve state for a passing and failing verison of the test with only the changes from the commit mamba-org/mamba@0345b9d.

The test I run for each is

(base) test_user@3c85ea9b1da7:/opt/conda-src$ CONDA_SOLVER=libmamba pytest tests/core/test_solve.py::test_force_remove_1 -s | python /opt/mamba-src/parse_libsolve_state.py 

For the failing test I see costrouc/mamba@99ac04e

>>>> SOLVE ATTEMPT <<<<
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] -2147482764 numpy=*[build=*py27*]



>>>> SOLVE ATTEMPT <<<<
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_LOCK', 'SOLVER_UPDATE']] -2147483494 openssl==1.0.1c=0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_LOCK', 'SOLVER_UPDATE']] -2147482809 numpy==1.7.1=py27_0
[] 214 python



>>>> SOLVE ATTEMPT <<<<
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] 1145 channel-1/linux-64::numpy==1.7.1=py27_0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_UPDATE'], ['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_ERASE']] 1145 channel-1/linux-64::numpy==1.7.1=py27_0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] 1147 channel-1/linux-64::readline==6.2=0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_UPDATE'], ['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_ERASE']] 1147 channel-1/linux-64::readline==6.2=0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] 1149 channel-1/linux-64::sqlite==3.7.13=0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_UPDATE'], ['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_ERASE']] 1149 channel-1/linux-64::sqlite==3.7.13=0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] 1151 channel-1/linux-64::system==5.8=1
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_UPDATE'], ['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_ERASE']] 1151 channel-1/linux-64::system==5.8=1
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] 1153 channel-1/linux-64::tk==8.5.13=0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_UPDATE'], ['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_ERASE']] 1153 channel-1/linux-64::tk==8.5.13=0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] 1155 channel-1/linux-64::zlib==1.2.7=0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_UPDATE'], ['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_ERASE']] 1155 channel-1/linux-64::zlib==1.2.7=0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_LOCK', 'SOLVER_UPDATE']] 1157 channel-1/linux-64::openssl==1.0.1c=0
[] 218 openssl



>>>> SOLVE ATTEMPT <<<<
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_FAVOR']] 216 numpy
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_FAVOR']] 220 readline
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_FAVOR']] 222 sqlite
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_FAVOR']] 224 system
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_FAVOR']] 226 tk
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_FAVOR']] 228 zlib
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_LOCK', 'SOLVER_UPDATE', 'SOLVER_ERASE']] 216 numpy
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_LOCK', 'SOLVER_UPDATE', 'SOLVER_ERASE']] 220 readline
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_LOCK', 'SOLVER_UPDATE', 'SOLVER_ERASE']] 222 sqlite
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_LOCK', 'SOLVER_UPDATE', 'SOLVER_ERASE']] 224 system
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_LOCK', 'SOLVER_UPDATE', 'SOLVER_ERASE']] 226 tk
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_LOCK', 'SOLVER_UPDATE', 'SOLVER_ERASE']] 228 zlib
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_UPDATE'], ['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_ERASE']] 216 numpy
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_UPDATE'], ['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_ERASE']] 220 readline
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_UPDATE'], ['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_ERASE']] 222 sqlite
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_UPDATE'], ['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_ERASE']] 224 system
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_UPDATE'], ['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_ERASE']] 226 tk
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_UPDATE'], ['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_ERASE']] 228 zlib
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_LOCK', 'SOLVER_UPDATE']] 1157 channel-1/linux-64::openssl==1.0.1c=0
[] 218 openssl

Spent quite awhile trying to find the definition of pool_conda_matchspec in libmamba. Found out it is in libsolv. So there is/was some mamba/conda login inside of libsolv. So now I get that this PRs goal where things broke is to move slowly away from the libsolv logic.

The passing build costrouc/mamba@68c19e5

>>>> SOLVE ATTEMPT <<<<
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] -2147482764 numpy * *py27*



>>>> SOLVE ATTEMPT <<<<
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_LOCK', 'SOLVER_UPDATE']] -2147483494 openssl 1.0.1c 0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_LOCK', 'SOLVER_UPDATE']] -2147482809 numpy 1.7.1 py27_0
[] 214 python



>>>> SOLVE ATTEMPT <<<<
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] -2147482764 numpy ==1.7.1 py27_0
[['SOLVER_UPDATE'], ['SOLVER_INSTALL', 'SOLVER_ERASE']] 1145 channel-1/linux-64::numpy ==1.7.1 py27_0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] -2147482763 readline ==6.2 0
[['SOLVER_UPDATE'], ['SOLVER_INSTALL', 'SOLVER_ERASE']] 1147 channel-1/linux-64::readline ==6.2 0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] -2147482762 sqlite ==3.7.13 0
[['SOLVER_UPDATE'], ['SOLVER_INSTALL', 'SOLVER_ERASE']] 1149 channel-1/linux-64::sqlite ==3.7.13 0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] -2147482761 system ==5.8 1
[['SOLVER_UPDATE'], ['SOLVER_INSTALL', 'SOLVER_ERASE']] 1151 channel-1/linux-64::system ==5.8 1
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] -2147482760 tk ==8.5.13 0
[['SOLVER_UPDATE'], ['SOLVER_INSTALL', 'SOLVER_ERASE']] 1153 channel-1/linux-64::tk ==8.5.13 0[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] -2147482759 zlib ==1.2.7 0
[['SOLVER_UPDATE'], ['SOLVER_INSTALL', 'SOLVER_ERASE']] 1155 channel-1/linux-64::zlib ==1.2.7 0
[['SOLVER_INSTALL', 'SOLVER_LOCK', 'SOLVER_UPDATE']] 1157 channel-1/linux-64::openssl ==1.0.1c 0
[] 218 openssl

costrouc added a commit to costrouc/mamba that referenced this issue May 27, 2023
costrouc added a commit to costrouc/mamba that referenced this issue May 27, 2023
@costrouc
Copy link
Contributor Author

costrouc commented May 27, 2023

Looking at this in detail

Stage 1

Identical

# bad
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] -2147482764 numpy=*[build=*py27*]
# good
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] -2147482764 numpy * *py27*

Stage 2

Identical

# bad
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_LOCK', 'SOLVER_UPDATE']] -2147483494 openssl==1.0.1c=0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_LOCK', 'SOLVER_UPDATE']] -2147482809 numpy==1.7.1=py27_0
[] 214 python
# good
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_LOCK', 'SOLVER_UPDATE']] -2147483494 openssl 1.0.1c 0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_LOCK', 'SOLVER_UPDATE']] -2147482809 numpy 1.7.1 py27_0
[] 214 python

Stage 3

# bad
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] 1145 channel-1/linux-64::numpy==1.7.1=py27_0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_UPDATE'], ['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_ERASE']] 1145 channel-1/linux-64::numpy==1.7.1=py27_0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] 1147 channel-1/linux-64::readline==6.2=0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_UPDATE'], ['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_ERASE']] 1147 channel-1/linux-64::readline==6.2=0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] 1149 channel-1/linux-64::sqlite==3.7.13=0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_UPDATE'], ['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_ERASE']] 1149 channel-1/linux-64::sqlite==3.7.13=0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] 1151 channel-1/linux-64::system==5.8=1
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_UPDATE'], ['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_ERASE']] 1151 channel-1/linux-64::system==5.8=1
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] 1153 channel-1/linux-64::tk==8.5.13=0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_UPDATE'], ['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_ERASE']] 1153 channel-1/linux-64::tk==8.5.13=0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] 1155 channel-1/linux-64::zlib==1.2.7=0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_UPDATE'], ['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_ERASE']] 1155 channel-1/linux-64::zlib==1.2.7=0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_LOCK', 'SOLVER_UPDATE']] 1157 channel-1/linux-64::openssl==1.0.1c=0
[] 218 openssl
# good
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] -2147482764 numpy ==1.7.1 py27_0
[['SOLVER_UPDATE'], ['SOLVER_INSTALL', 'SOLVER_ERASE']] 1145 channel-1/linux-64::numpy ==1.7.1 py27_0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] -2147482763 readline ==6.2 0
[['SOLVER_UPDATE'], ['SOLVER_INSTALL', 'SOLVER_ERASE']] 1147 channel-1/linux-64::readline ==6.2 0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] -2147482762 sqlite ==3.7.13 0
[['SOLVER_UPDATE'], ['SOLVER_INSTALL', 'SOLVER_ERASE']] 1149 channel-1/linux-64::sqlite ==3.7.13 0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] -2147482761 system ==5.8 1
[['SOLVER_UPDATE'], ['SOLVER_INSTALL', 'SOLVER_ERASE']] 1151 channel-1/linux-64::system ==5.8 1
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] -2147482760 tk ==8.5.13 0
[['SOLVER_UPDATE'], ['SOLVER_INSTALL', 'SOLVER_ERASE']] 1153 channel-1/linux-64::tk ==8.5.13 0[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] -2147482759 zlib ==1.2.7 0
[['SOLVER_UPDATE'], ['SOLVER_INSTALL', 'SOLVER_ERASE']] 1155 channel-1/linux-64::zlib ==1.2.7 0
[['SOLVER_INSTALL', 'SOLVER_LOCK', 'SOLVER_UPDATE']] 1157 channel-1/linux-64::openssl ==1.0.1c 0
[] 218 openssl

Looking line by line how they are different

line 1 DIFFERENT

# bad
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] 1145 channel-1/linux-64::numpy==1.7.1=py27_0
# good
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] -2147482764 numpy ==1.7.1 py27_0

line 2 DIFFERENT

# bad
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_UPDATE'], ['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_ERASE']] 1145 channel-1/linux-64::numpy==1.7.1=py27_0
# good
[['SOLVER_UPDATE'], ['SOLVER_INSTALL', 'SOLVER_ERASE']] 1145 channel-1/linux-64::numpy ==1.7.1 py27_0

line 3 DIFFERENT

# bad
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] 1147 channel-1/linux-64::readline==6.2=0
# good
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] -2147482763 readline ==6.2 0

line 4 SAME

# bad
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_UPDATE'], ['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_ERASE']] 1147 channel-1/linux-64::readline==6.2=0
# good
[['SOLVER_UPDATE'], ['SOLVER_INSTALL', 'SOLVER_ERASE']] 1147 channel-1/linux-64::readline ==6.2 0

line 5 DIFFERENT

# bad
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] 1149 channel-1/linux-64::sqlite==3.7.13=0
# good
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] -2147482762 sqlite ==3.7.13 0

line 6 SAME

# bad
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_UPDATE'], ['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_ERASE']] 1149 channel-1/linux-64::sqlite==3.7.13=0
# good
[['SOLVER_UPDATE'], ['SOLVER_INSTALL', 'SOLVER_ERASE']] 1149 channel-1/linux-64::sqlite ==3.7.13 0

line 7 DIFFERENT

# bad
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] 1151 channel-1/linux-64::system==5.8=1
# good 
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] -2147482761 system ==5.8 1

line 8 SAME

# bad
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_UPDATE'], ['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_ERASE']] 1151 channel-1/linux-64::system==5.8=1
# good
[['SOLVER_UPDATE'], ['SOLVER_INSTALL', 'SOLVER_ERASE']] 1151 channel-1/linux-64::system ==5.8 1

line 9 DIFFERENT

# bad
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] 1153 channel-1/linux-64::tk==8.5.13=0
# good
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] -2147482760 tk ==8.5.13 0

line 10 SAME

# bad
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_UPDATE'], ['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_ERASE']] 1153 channel-1/linux-64::tk==8.5.13=0
# good
[['SOLVER_UPDATE'], ['SOLVER_INSTALL', 'SOLVER_ERASE']] 1153 channel-1/linux-64::tk ==8.5.13 

line 11 DIFFERENT

# bad
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] 1155 channel-1/linux-64::zlib==1.2.7=0
# good
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] -2147482759 zlib ==1.2.7 0

line 12 SAME

# bad
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_UPDATE'], ['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_ERASE']] 1155 channel-1/linux-64::zlib==1.2.7=0
# good
[['SOLVER_UPDATE'], ['SOLVER_INSTALL', 'SOLVER_ERASE']] 1155 channel-1/linux-64::zlib ==1.2.7 0

line 13 SAME

# bad
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_LOCK', 'SOLVER_UPDATE']] 1157 channel-1/linux-64::openssl==1.0.1c=0
# good
[['SOLVER_INSTALL', 'SOLVER_LOCK', 'SOLVER_UPDATE']] 1157 channel-1/linux-64::openssl ==1.0.1c 0

line 14 SAME

# bad
[] 218 openssl
# good
[] 218 openssl

@costrouc
Copy link
Contributor Author

costrouc commented May 27, 2023

So to me it looks like the issue is with ['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] jobs and the channel is dropped from the matchspec in these cases. Going to try a branch that can cause this to pass if I throw away the channel.

With this info I made a small change costrouc/mamba@f72a63d which causes the test to pass.

>>>> SOLVE ATTEMPT <<<<
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] -2147482764 numpy=*[build=*py27*]

>>>> SOLVE ATTEMPT <<<<
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_LOCK', 'SOLVER_UPDATE']] -2147483494 openssl==1.0.1c=0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_LOCK', 'SOLVER_UPDATE']] -2147482809 numpy==1.7.1=py27_0
[] 214 python

>>>> SOLVE ATTEMPT <<<<
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] -2147482764 numpy==1.7.1=py27_0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_UPDATE'], ['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_ERASE']] 1145 channel-1/linux-64::numpy==1.7.1=py27_0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] -2147482763 readline==6.2=0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_UPDATE'], ['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_ERASE']] 1147 channel-1/linux-64::readline==6.2=0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] -2147482762 sqlite==3.7.13=0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_UPDATE'], ['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_ERASE']] 1149 channel-1/linux-64::sqlite==3.7.13=0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] -2147482761 system==5.8=1
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_UPDATE'], ['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_ERASE']] 1151 channel-1/linux-64::system==5.8=1
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] -2147482760 tk==8.5.13=0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_UPDATE'], ['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_ERASE']] 1153 channel-1/linux-64::tk==8.5.13=0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL']] -2147482759 zlib==1.2.7=0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_UPDATE'], ['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_ERASE']] 1155 channel-1/linux-64::zlib==1.2.7=0
[['SOLVER_SOLVABLE_PROVIDES', 'SOLVER_INSTALL', 'SOLVER_LOCK', 'SOLVER_UPDATE']] 1157 channel-1/linux-64::openssl==1.0.1c=0
[] 218 openssl

The libsolve state is now identical to the working "good" branch where the test passes. Both tests now pass.

CONDA_SOLVER=libmamba pytest tests/core/test_solve.py::test_force_remove_1
CONDA_SOLVER=libmamba pytest tests/core/test_solve.py::test_aggressive_update_packages 

So the "fix" is to throw away the channel when using the SOLVER_INSTALL command? Can't say I understand why costrouc/mamba@f72a63d fixes the tests or the implications of this.

@costrouc
Copy link
Contributor Author

Also wanted to note here the scope of the issue. Looking at costrouc/mamba@f72a63d which "fixes" these failing tests.

This breakage only occurs when performing an update and "complex" matchspecs are specified e.g. not just package name and version constraint (example conda-forge::numpy would be complex). So the scope is not too large.

@jaimergp
Copy link
Contributor

All tests broken by 1.4.2 now work with #270 (and libmamba >=1.5.1). Closing here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity::2 critical; broken functionality with an unacceptably complex workaround source::contributor created by a frequent contributor type::bug describes erroneous operation, use severity::* to classify the type
Projects
Status: Done
Archived in project
Development

No branches or pull requests

3 participants