conan icon indicating copy to clipboard operation
conan copied to clipboard

[bug] Conan config install fails

Open bethmal opened this issue 1 year ago • 3 comments

Describe the bug

Windows10 version 22H2. conan 1.58.0

Description: "conan config install" always fails with below error message.

Conan Infor: [Begin]conan config install git@myconan_config.git [Out]DEBUG :conan_api.py [176]: INIT: Using config 'd:\myfolder\.conan\conan.conf' [2024-04-17 11:43:03,100] [Out]DEBUG :tracer.py [156]: CONAN_API: config_install(source_folder=None,target_folder=None) [2024-04-17 11:43:03,102] [Out]Trying to clone repo: git@myconan_config.git [Out]INFO :runners.py [87]: Calling command: git -c http.sslVerify=true clone "git@myconan_config.git" . > "C:\Users\xxxxxx\AppData\Local\Temp\tmpcg26thq1\output" [2024-04-17 11:43:03,123] [Out]INFO :runners.py [90]: Return code: 0 [2024-04-17 11:43:08,088] [Out]INFO :runners.py [98]: Output: in file: stdout: None stderr:b"Cloning into '.'...\n" [2024-04-17 11:43:08,088] [Out]Repo cloned! [Out]Copying file conan-config.bat to d:\myfolder\.conan. [Out]Processing conan.conf [Out]Copying file EXPORT.yml to d:\myfolder\.conan. [Out]Copying file LICENSE to d:\myfolder\.conan. [Out]Skip README.md Defining remotes from remotes.txt [Out]Installing settings.yml [Out]Copying file simulator.profile to d:\myfolder\.conan\profiles [Out]Copying file websimulator.profile to d:\myfolder\.conan\profiles [Out]ERROR: Failed conan config install: Cannot change permissions for D:\myfolder\.conan\tmp_config_install! Exception info: (<class 'PermissionError'>, PermissionError(13, 'The process cannot access the file because it is being used by another process'), <traceback object at 0x000001F052CB8280>) [Failed] conan config install git@myconan_config.git

How to reproduce it

No response

bethmal avatar Apr 17 '24 06:04 bethmal

Hi @bethmal

Please try to remove manually the folder D:\myfolder\.conan\tmp_config_install and repeat and see what happens. Does it happen every time, if you remove and repeat it, it is deterministic?

If it is still failing, please try to define another folder as CONAN_USER_HOME, in another directory (just to try), possibly in another unit as C:

Then, check with another repo, or another branch of the same repo, maybe that does contain just 1 single file.

memsharded avatar Apr 17 '24 08:04 memsharded

Hi @memsharded

D:\myfolder.conan\tmp_config_install could be removed manually. The error happens every time on some of my coworkers' computer, but it never happens on the other's computer.

By the way, this error only happens when specify CONAN_USER_HOME to a folder other than default conan home.

Thanks.

bethmal avatar Apr 22 '24 08:04 bethmal

D:\myfolder.conan\tmp_config_install could be removed manually. The error happens every time on some of my coworkers' computer, but it never happens on the other's computer.

If it is not the same in other computers, I'd check 2 things:

  • AntiVirus software, scanning that folder continuously. Check for incidents or info in the AV logs
  • If it is Windows, the Windows indexer. The recommendation is to disable Windows indexer on Conan cache folders.

memsharded avatar Apr 22 '24 09:04 memsharded

Still could not get the root cause.

bethmal avatar May 17 '24 01:05 bethmal

So, all the other team members with same Windows 10 machines, it is working fine, but this colleague keep failing?

[Out]ERROR: Failed conan config install: Cannot change permissions for D:\myfolder.conan\tmp_config_install! Exception info: (<class 'PermissionError'>, PermissionError(13, 'The process cannot access the file because it is being used by another process'), <traceback object at 0x000001F052CB8280>)

I still suspect there is something specific in the user computer that is accessing the Conan cache concurrently, did they try to exclude the folder from AV and from the Windows indexer and still the same?

Windows has facilities to trace access to files, maybe some sysadmin can have a look at it?

Another quick question: does it still happen the same if they move the Conan cache to the regular C:/Users/myuser/.conan2 folder?

memsharded avatar May 17 '24 06:05 memsharded