#4407·mamba

micromamba 2.9.0 hangs during pyc compilation on a 512-CPU x86_64 system

Author: linkous123Created Sep 19, 2026Updated Sep 21, 2026
Labelstype::bug

Issue body

markdown
### Description

`micromamba 2.9.0` reproducibly hangs near the end of environment creation on a high-core-count x86_64 Debian system.

The terminal appears to stop after:

```text
Linking pip-26.2.1-pyh8b19718_0

The environment creation can remain in this state indefinitely. I initially observed the same behavior for more than 12 hours.

After inspecting the process tree, the hang appears to occur during the Python bytecode (.pyc) compilation stage rather than during package solving, downloading, extraction, or linking itself.

Setting:

bash
micromamba config set compile_pyc false

completely avoids the problem. The same minimal environment then finishes successfully.


Minimal reproduction

The problem was reproduced using only the official conda-forge channel, so it does not appear to depend on a third-party mirror:

bash
micromamba create \
  -n solve-test \
  --override-channels \
  -c https://conda.anaconda.org/conda-forge \
  python=3.12 \
  -y

The transaction progresses normally through downloading and linking, then stops after the final package linking messages, e.g.:

Linking python-3.12.14-h5f976f7_3_cpython
Linking packaging-26.3-pyhc364b38_0
Linking setuptools-84.0.0-pyh332efcf_0
Linking wheel-0.48.0-pyhd8ed1ab_0
Linking pip-26.2.1-pyh8b19718_0

No Transaction finished message appears.


Process state while hung

The micromamba parent process was sleeping in do_sys_poll:

PID     PPID     STAT  WCHAN        ELAPSED  TIME      %CPU
509417  4192952  Sl+   do_sys_poll  07:50    00:00:11  2.4

pstree showed that micromamba had launched a shell script and a very large number of Python workers:

micromamba,509417 create -n solve-test ...
  └─bash,509594 /tmp/mambafh221ncqzra
      └─python3.12,509601 -Wi -u /tmp/mambafqnmezn0zqc
          ├─python3.12,509602 -Wi -u /tmp/mambafqnmezn0zqc
          ├─python3.12,509603 -Wi -u /tmp/mambafqnmezn0zqc
          ├─python3.12,509604 -Wi -u /tmp/mambafqnmezn0zqc
          ├─python3.12,509605 -Wi -u /tmp/mambafqnmezn0zqc
          ├─...
          └─many more python3.12 workers

The worker processes remained present for many minutes without the transaction completing.

After killing the micromamba parent process, many of these /tmp/mamba... Python worker processes also remained alive and had to be terminated separately.


Workaround

I cleaned the incomplete environment and disabled pyc compilation:

bash
micromamba config set compile_pyc false

Then I ran exactly the same minimal test again:

bash
micromamba create \
  -n solve-test \
  --override-channels \
  -c https://conda.anaconda.org/conda-forge \
  python=3.12 \
  -y

This time the environment was created successfully.

Current configuration:

compile_pyc: false

This strongly suggests that the hang is associated with the parallel pyc compilation stage.

I cannot confirm whether this is a true deadlock, a worker-pool synchronization problem, or another multiprocessing/process-cleanup issue.


System information

micromamba version : 2.9.0
libmamba version   : 2.9.0

OS:
Linux debian 6.12.94+deb13-amd64
Debian 13
x86_64

CPU(s):             512
Online CPU(s):      0-511
Vendor:              AuthenticAMD
Model:               AMD EPYC 9754 128-Core Processor
Threads per core:    2
Cores per socket:    128
Sockets:             2
NUMA nodes:          2

Architecture:        x86_64
archspec:            x86_64_v4
glibc:               2.41
CUDA virtual pkg:    12.4

Full relevant micromamba info:

libmamba version : 2.9.0
micromamba version : 2.9.0
curl version : libcurl/8.21.0 OpenSSL/3.5.7 zlib/1.3.2 zstd/1.5.7
libarchive version : libarchive 3.8.9

envs directories :
    /home/limaorong/.local/share/mamba/envs

package cache :
    /home/limaorong/.local/share/mamba/pkgs
    /home/limaorong/.mamba/pkgs

environment :
    base

env location :
    /home/limaorong/.local/share/mamba

virtual packages :
    __unix=0=0
    __linux=6.12.94=0
    __glibc=2.41=0
    __archspec=1=x86_64_v4
    __cuda=12.4=0

platform :
    linux-64

Additional observations

I first encountered the same hang while creating a larger environment containing:

python=3.12
git
pip
uv

I initially suspected filesystem performance because that environment was located on a separate data disk.

I then moved the micromamba root prefix and environments to the local HOME filesystem:

/home/limaorong/.local/share/mamba

and reproduced the problem again with the minimal python=3.12 environment shown above.

I also reproduced it using the official conda-forge URL with --override-channels, which rules out the local mirror configuration as the apparent cause.

The only change that reliably resolved the hang was:

compile_pyc: false

Given the 512 logical CPUs on this machine and the very large number of Python worker processes spawned during the failing run, this may be related to excessive parallelism or worker synchronization during pyc compilation.