mamba-org / mamba

The Fast Cross-Platform Package Manager
https://mamba.readthedocs.io
BSD 3-Clause "New" or "Revised" License
6.68k stars 346 forks source link

Package file lock should have option to wait instead of error #3202

Open calebzulawski opened 6 months ago

calebzulawski commented 6 months ago

Troubleshooting docs

Anaconda default channels

How did you install Mamba?

Micromamba

Search tried in issue tracker

file lock

Latest version of Mamba

Tried in Conda?

I didn't try

Describe your issue

When running multiple instances of micromamba simultaneously that access the same package, the following error occurs:

error    libmamba Could not set lock (Resource temporarily unavailable)
warning  libmamba Cannot lock '/path/to/package.conda'

mamba info / micromamba info

libmamba version : 1.5.6
     micromamba version : 1.5.6
           curl version : libcurl/8.5.0 OpenSSL/3.2.0 zlib/1.2.13 zstd/1.5.5 libssh2/1.11.0 nghttp2/1.58.0
     libarchive version : libarchive 3.7.2 zlib/1.2.13 bz2lib/1.0.8 libzstd/1.5.5
       envs directories : /home/caleb/micromamba/envs
          package cache : /home/caleb/micromamba/pkgs
                          /home/caleb/.mamba/pkgs
            environment : None (not found)
           env location : -
      user config files : /home/caleb/.mambarc
 populated config files : 
       virtual packages : __unix=0=0
                          __linux=5.19.0=0
                          __glibc=2.35=0
                          __archspec=1=x86_64-v3
               channels : 
       base environment : /home/caleb/micromamba
               platform : linux-64

Logs

No response

environment.yml

No response

~/.condarc

No response

tarrade commented 4 months ago

same issue using parallel --jobs 3 ::: "${commands[@]}" to create 3 env in parallele.

If I use mamba: mamba env create -f my_env.yaml I get:

error    libmamba Could not set lock (Resource temporarily unavailable)
warning  libmamba Cannot lock '/home/jupyter/.conda-pkg/cache'
    Waiting for other mamba process to finish

If I use conda: conda env create -f my_env.yaml I have no error messages

mamba 1.5.3
conda 23.10.0