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

Bugfix: mamba used with an environment file never starts installation due to deadlock #1300

Merged

Conversation

akihironitta
Copy link
Contributor

Description of the Bug

When using mamba with an environment file, creating an environment never starts.

Here's a brief explanation of what's happening in mamba.py:

import asv.util as util
util.new_multiprocessing_lock("mamba_lock")
def _mamba_lock():
    return util.get_multiprocessing_lock("mamba_lock")
def run_mamba():
    with _mamba_lock():
        print("Hello, world!")
with _mamba_lock():
    run_mamba()

Description of the PR

This PR removes one of the locks around _run_mamba to avoid grabbing the lock inside the lock.

Copy link
Member

@HaoZeke HaoZeke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @akihironitta.

@HaoZeke HaoZeke merged commit 06b06d8 into airspeed-velocity:master Jul 7, 2023
6 checks passed
@akihironitta akihironitta deleted the bugfix/mamba-deadlock branch July 8, 2023 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants