conan icon indicating copy to clipboard operation
conan copied to clipboard

[question] ERROR: Package 'open62541/1.4.14' not resolved: Reference 'open62541/1.4.14#4f1ffaf9cf6e3a3d2366527bf4138a38%1764140285.608425' already exists.

Open ErikTempelaarVO opened this issue 3 months ago • 5 comments

What is your question?

Hi. Can you help me figure this out?

I have a fork of conan-center-index and attached a CI-job to it to verify the packages that are relevant to us. This job used to run fine, but it now fails with this error:

ERROR: Package 'open62541/1.4.14' not resolved: Reference 'open62541/1.4.14#4f1ffaf9cf6e3a3d2366527bf4138a38%1764140285.608425' already exists.

Last Friday I created a PR to sync our local fork with upstream. The run for the merge build succeeded, but the PR has not been completed (still pending review) It started failing for runs after that.

This job runs on a on-prem computer, so there's caching between jobs. Could that be causing an issue when switching between CCI versions? open62541/1.4.14 is a recipe with fixes I haven't pushed upstream yet.

compiler.threads=mcf compiler.version=14.2 os=Windows [tool_requires] open62541/*: cmake/[>=3.21 <4], ninja/[>=1.12.1 <2] [conf] tools.build:compiler_executables={'cpp': 'C:/msys64/mingw64/bin/g++.exe', 'c': 'C:/msys64/mingw64/bin/gcc.exe'} tools.cmake.cmaketoolchain:generator=Ninja tools.microsoft.bash:path=C:/msys64/usr/bin/bash.exe tools.microsoft.bash:subsystem=msys2 [buildenv] PATH=+(path)c:/msys64/usr/bin/

======== Computing dependency graph ======== xerces-c/3.3.0@/: Checking remote: cci-local xerces-c/3.3.0@/: Checking remote: conancenter Connecting to remote 'conancenter' anonymously spdlog/1.15.3@/: Checking remote: cci-local spdlog/1.15.3@/: Checking remote: conancenter fmt/11.2.0: Checking remote: cci-local fmt/11.2.0: Checking remote: conancenter cmake/3.31.10: Checking remote: cci-local cmake/3.31.10: Checking remote: conancenter ninja/1.13.1: Checking remote: cci-local ninja/1.13.1: Checking remote: conancenter open62541pp/0.19.0: Checking remote: cci-local open62541pp/0.19.0: Checking remote: conancenter open62541/1.4.14: Checking remote: cci-local open62541/1.4.14: Checking remote: conancenter open62541/1.4.14: Retrieving from remote 'cci-local'... Graph root conanfile.py: C:\agent_work\3\s\conanfile.py Requirements fmt/11.2.0#579bb2cdf4a7607621beea4eb4651e0f - Cache (Updated date) (cci-local) open62541pp/0.19.0#1960f53cac3131873651bb41363489b2 - Cache (Updated date) (cci-local) spdlog/1.15.3@/#3ca0e9e6b83af4d0151e26541d140c86 - Cache (conancenter) xerces-c/3.3.0@/#1460e1dcbd206b18a0ecf29f0b5ee361 - Cache (conancenter) Build requirements cmake/3.31.10#313d16a1aa16bbdb2ca0792467214b76 - Cache (conancenter) ninja/1.13.1#294f8721dbcde145674f7ba44994700e - Cache (Updated date) (cci-local) Resolved version ranges cmake/[>=3.21 <4]: cmake/3.31.10 ninja/[>=1.12.1 <2]: ninja/1.13.1 Overrides open62541/1.4.6: ['open62541/1.4.14'] ERROR: Package 'open62541/1.4.14' not resolved: Reference 'open62541/1.4.14#4f1ffaf9cf6e3a3d2366527bf4138a38%1764140285.608425' already exists. The system cannot find the path specified. 'cmake' is not recognized as an internal or external command, operable program or batch file. 'cmake' is not recognized as an internal or external command, operable program or batch file. 'cmake' is not recognized as an internal or external command, operable program or batch file. ##[error]Cmd.exe exited with code '1'. Finishing: Run PrintVersions to demonstrate working app with dependency

(venv) C:\agent\_work\3\s>conan list open62541/1.4.14:* -r cci-local
cci-local
  open62541
    open62541/1.4.14
      revisions
        4f1ffaf9cf6e3a3d2366527bf4138a38 (2025-11-26 07:02:42 UTC)
          packages

(venv) C:\agent\_work\3\s>conan --version
Conan version 2.23.0

Have you read the CONTRIBUTING guide?

  • [x] I've read the CONTRIBUTING guide

ErikTempelaarVO avatar Nov 26 '25 07:11 ErikTempelaarVO

Hi @ErikTempelaarVO

Thanks for the question.

This sounds it could be some cache corruption. I'd try as a first thing to completely remove the Conan cache from that machine and try again.

This job runs on a on-prem computer, so there's caching between jobs. Could that be causing an issue when switching between CCI versions?

Is it possible that there is some concurrency of jobs in that computer, so the Conan package cache is accessed concurrently? If that is the case, the concurrency is not supported at the moment, and it could be a cause of that possible corruption.

memsharded avatar Nov 26 '25 09:11 memsharded

Hi @memsharded

Don't think job concurrency is a problem. The agent handles only 1 job at a time and the .conan-folder is relative to the job's sources.

I tried cleaning the cache, but that seemed to have no effect. As I type this, I realize that the CI job has a different CONAN_HOME set. So that's why the logging below is irrelevant (also wrong library version, shouldn't have ignored that...)

Manually deleting the entire .conan-folder used by the CI-job worked.

(venv) C:\agent\_work\3\s>conan cache check-integrity open62541/*
Found 1 pkg/version recipes matching open62541/* in local cache
open62541/1.3.15#7c8e8d01095c56d44771164d58b88729: Integrity check: ok
open62541/1.3.15#7c8e8d01095c56d44771164d58b88729:6964ff6f502ef952007446ba29e987aea1b1abb2#77e063844d7a01dc0356cb0c5fb5adcd: Integrity check: ok
Integrity check: ok

(venv) C:\agent\_work\3\s>conan cache clean
Found 23 pkg/version recipes matching * in local cache

I'll try scheduling some more (sequential) jobs, to see if I can reproduce it again.

ErikTempelaarVO avatar Nov 26 '25 13:11 ErikTempelaarVO

The job ran fine after cleaning out the entire cache.

This job was for PR1. PR1 only changes some configuration for renovate and doesn't impact conan recipes. After completion, I ran the same job for PR2 (sync CCI with upstream). No problem there either. Running PR1 again now fails.

This is what the cache now looks like:

(venv) C:\agent\_work\3\s>conan cache check-integrity open62541/*
Found 1 pkg/version recipes matching open62541/* in local cache
open62541/1.4.14#4f1ffaf9cf6e3a3d2366527bf4138a38: Integrity check: ok
open62541/1.4.14#4f1ffaf9cf6e3a3d2366527bf4138a38:941ab15bad92608c38eb5306b91448ec8fe6df25#e431d552f2948b89926bc5ef145a5ce9: Integrity check: ok
open62541/1.4.14#cafb411dadf8be1791ff247844a1b7d6: Integrity check: ok
open62541/1.4.14#cafb411dadf8be1791ff247844a1b7d6:941ab15bad92608c38eb5306b91448ec8fe6df25#b473ab3f43662d045fb02fbe9d807368: Integrity check: ok

PR1 run 1:

Graph root
    conanfile.py: C:\agent\_work\3\s\conanfile.py
Requirements
    asio/1.36.0@_/_#75a50dae6e50af10cfb2150286b7df39 - Downloaded (conancenter)
    fmt/11.2.0#579bb2cdf4a7607621beea4eb4651e0f - Downloaded (cci-vocam)
    nlohmann_json/3.12.0@_/_#2d634ab0ec8d9f56353e5ccef6d6612c - Downloaded (conancenter)
    open62541/1.4.14#4f1ffaf9cf6e3a3d2366527bf4138a38 - Downloaded (cci-vocam)
    open62541pp/0.19.0#1960f53cac3131873651bb41363489b2 - Downloaded (cci-vocam)
    openssl/3.4.1#638c4c4df8ecdef1f7aa73fc0d07fde6 - Downloaded (conancenter)
    spdlog/1.15.3@_/_#3ca0e9e6b83af4d0151e26541d140c86 - Downloaded (conancenter)
    xerces-c/3.3.0@_/_#1460e1dcbd206b18a0ecf29f0b5ee361 - Downloaded (conancenter)
Build requirements
    cmake/3.31.10#313d16a1aa16bbdb2ca0792467214b76 - Downloaded (conancenter)
    msys2/cci.latest#9011e422422acd78571d90946cc62d3f - Downloaded (cci-vocam)
    nasm/2.16.01#31e26f2ee3c4346ecd347911bd126904 - Downloaded (cci-vocam)
    ninja/1.13.2#c8c5dc2a52ed6e4e42a66d75b4717ceb - Downloaded (conancenter)
    strawberryperl/5.32.1.1#8d114504d172cfea8ea1662d09b6333e - Downloaded (cci-vocam)
Resolved version ranges
    cmake/[>=3.21 <4]: cmake/3.31.10
    ninja/[>=1.12.1 <2]: ninja/1.13.2
Overrides
    open62541/1.4.6: ['open62541/1.4.14']

PR2 run 1:

Graph root
    conanfile.py: C:\agent\_work\3\s\conanfile.py
Requirements
    asio/1.36.0@_/_#75a50dae6e50af10cfb2150286b7df39 - Cache (conancenter)
    fmt/11.2.0#579bb2cdf4a7607621beea4eb4651e0f - Cache (Updated date) (cci-vocam)
    nlohmann_json/3.12.0@_/_#2d634ab0ec8d9f56353e5ccef6d6612c - Cache (conancenter)
    open62541/1.4.14#cafb411dadf8be1791ff247844a1b7d6 - Updated (cci-vocam)
    open62541pp/0.19.0#1960f53cac3131873651bb41363489b2 - Cache (Updated date) (cci-vocam)
    openssl/3.4.1#638c4c4df8ecdef1f7aa73fc0d07fde6 - Cache (conancenter)
    spdlog/1.15.3@_/_#3ca0e9e6b83af4d0151e26541d140c86 - Cache (conancenter)
    xerces-c/3.3.0@_/_#1460e1dcbd206b18a0ecf29f0b5ee361 - Cache (conancenter)
Build requirements
    cmake/3.31.10#313d16a1aa16bbdb2ca0792467214b76 - Cache (conancenter)
    msys2/cci.latest#9011e422422acd78571d90946cc62d3f - Cache (Updated date) (cci-vocam)
    nasm/2.16.01#31e26f2ee3c4346ecd347911bd126904 - Cache (Updated date) (cci-vocam)
    ninja/1.13.2#c8c5dc2a52ed6e4e42a66d75b4717ceb - Cache (conancenter)
    strawberryperl/5.32.1.1#8d114504d172cfea8ea1662d09b6333e - Cache (Updated date) (cci-vocam)
Resolved version ranges
    cmake/[>=3.21 <4]: cmake/3.31.10
    ninja/[>=1.12.1 <2]: ninja/1.13.2
Overrides
    open62541/1.4.6: ['open62541/1.4.14']

PR1 run 2:

Graph root
    conanfile.py: C:\agent\_work\3\s\conanfile.py
Requirements
    fmt/11.2.0#579bb2cdf4a7607621beea4eb4651e0f - Cache (Updated date) (cci-vocam)
    open62541pp/0.19.0#1960f53cac3131873651bb41363489b2 - Cache (Updated date) (cci-vocam)
    spdlog/1.15.3@_/_#3ca0e9e6b83af4d0151e26541d140c86 - Cache (conancenter)
    xerces-c/3.3.0@_/_#1460e1dcbd206b18a0ecf29f0b5ee361 - Cache (conancenter)
Build requirements
    cmake/3.31.10#313d16a1aa16bbdb2ca0792467214b76 - Cache (conancenter)
    ninja/1.13.2#c8c5dc2a52ed6e4e42a66d75b4717ceb - Cache (conancenter)
Resolved version ranges
    cmake/[>=3.21 <4]: cmake/3.31.10
    ninja/[>=1.12.1 <2]: ninja/1.13.2
Overrides
    open62541/1.4.6: ['open62541/1.4.14']
ERROR: Package 'open62541/1.4.14' not resolved: Reference 'open62541/1.4.14#4f1ffaf9cf6e3a3d2366527bf4138a38%1764162983.819098' already exists.

ErikTempelaarVO avatar Nov 26 '25 13:11 ErikTempelaarVO

Sorry, it seems that I was missing some details.

Are you using the local-recipes-index feature? The one in https://docs.conan.io/2/devops/devops_local_recipes_index.html?

Because you described that you were creating packages from a fork, but that doesn't necessarily means using the local-recipes-index.

If yes, that could be a different story, indeed, and the "cache corruption" is not the main Conan cache, but the cache that is used in the local-recipes-index remote to do dynamic creation of packages when required. And it sounds that it might be caused by changing commits/branches in the repo.

Note also the recommendations from https://docs.conan.io/2/devops/conancenter/hosting_binaries.html:

Do not mix packages and recipes created from your fork of conan-center-index Github repo with the ones from ConanCenter central server. Once you create some binaries for third parties from your fork, it is strongly recommended to fully disconnect from ConanCenter (you can remove the remote, and you can add the remotes.json file with your own remotes to the configuration you can distribute and install with conan config install/install-pkg), and create all your third-party packages from your fork.

It seems from your output that some packages come from conancenter while other comes from your fork.

If the issue is with a local-recipes-index remote, then probably the issue can be fully reproduced locally. If you could please try to provide detailed exact steps such as:

  • `git clone ... conan-center-index``
  • conan remote add cci-local /path/to/local/clone
  • `conan remote
  • conan install --requires=openssl/version
  • ....
  • conan install --requires=openssl/version --update
  • ....

That would really help a lot. I guess that you are also using --update argument in some place, as I see some messages in the output

memsharded avatar Nov 26 '25 17:11 memsharded

Sorry for being unclear. Yes, I have a fork of CCI that I add as local recipe index, I indeed also mix this with packages from Conan Center. I must have missed that this is against best practices (or ignored that part willingly and forgot about it)

Will try to come up with the repro steps.

ErikTempelaarVO avatar Nov 27 '25 08:11 ErikTempelaarVO

I have been able to reproduce, seems a bug due to very unusual scenario that reverts back to older revision, but it is newer in the server. I am working on a fix.

memsharded avatar Dec 18 '25 15:12 memsharded

I have opened https://github.com/conan-io/conan/pull/19402, hopefully for next Conan 2.25, lets see how it goes.

memsharded avatar Dec 18 '25 15:12 memsharded

https://github.com/conan-io/conan/pull/19402 has been merged, closing this issue, it will be in next Conan 2.25, thanks for the feedback!

memsharded avatar Dec 19 '25 12:12 memsharded

Thank you for fixing this. Kudos for figuring it out without proper reproduction steps. Much appreciated.

ErikTempelaarVO avatar Dec 19 '25 12:12 ErikTempelaarVO