Miniconda installer segfaults in WSL2 (Debian/Ubuntu), constructor --extract-tarball fails with Exit 141 / Segmentation fault

4 weeks ago 21
ARTICLE AD BOX

I'm trying to install Miniconda in WSL2, but the official installer always fails during payload extraction. The script reports Exit 141 and then Segmentation fault in constructor --extract-tarball. This reproduces on fresh WSL installs and on both Debian and Ubuntu.

Environment

Windows 11 WSL2 Distros tested: Debian (fresh), Ubuntu (fresh) Arch: x86_64 Installer: Miniconda3-latest-Linux-x86_64.sh Install prefix (Linux filesystem, not /mnt/c): /home/hzji1127/miniconda3

Steps to reproduce

sudo apt update sudo apt install -y bzip2 ca-certificates curl cd ~ curl -fsSLO https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh bash Miniconda3-latest-Linux-x86_64.sh

Installer output / error

PREFIX=/home/hzji1127/miniconda3 Unpacking bootstrapper... Unpacking payload... Miniconda3-latest-Linux-x86_64.sh: line 377: 5864 Exit 141 extract_range "${boundary2}" "${boundary3}" 5865 Segmentation fault | CONDA_QUIET="$BATCH" "$CONDA_EXEC" constructor --extract-tarball --prefix "$PREFIX"

So extract_range exits with 141 (SIGPIPE?), and then the constructor process segfaults.

Memory / disk

free -h:

Mem: 15Gi total, 13Gi available Swap: 4.0Gi

df -h (excerpt):

/dev/sdd 1007G 1.1G 955G 1% / C:\ 953G 839G 115G 89% /mnt/c drivers 953G 839G 115G 89% /usr/lib/wsl/drivers

Kernel log evidence (dmesg)

Right after the installer fails, dmesg shows _conda crashing:

_conda[7797]: segfault at 8 ip ... error 4 in libpython3.13.so.1.0[...] _conda: potentially unexpected fatal signal 11. CPU: 27 PID: 7797 Comm: _conda ... 6.6.87.2-microsoft-standard-WSL2 #1

(Full 50-line tail available if needed.)

What I've tried

Reinstalled WSL2 completely Reinstalled Debian and Ubuntu multiple times Redownloaded the installer multiple times Same crash every time

Question

What could cause Miniconda’s installer to fail like this in WSL2 during:

constructor --extract-tarball

In particular:

Why does extract_range exit 141 (SIGPIPE) here? Why is _conda segfaulting inside libpython3.13.so.1.0? Is this a known issue with WSL2 kernel 6.6.x + Miniconda constructor? What debugging steps or workarounds are recommended?
Read Entire Article