pixi icon indicating copy to clipboard operation
pixi copied to clipboard

pixi: WSL1 install env returns out of memory (os error 12) with concurrent-solves=1

Open sdebionne opened this issue 8 months ago • 7 comments

Checks

  • [x] I have checked that this issue has not already been reported.

  • [x] I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

Commands I ran and their output:

$ pixi self-update 
✔ pixi is already up-to-date (version 0.66.0
$ pixi shell -e frontend  --concurrent-solves 1

pixi.toml/pyproject.toml file that reproduces my issue:

[workspace]
channels = ["conda-forge"]
name = "multivisor"
platforms = ["linux-64"]
version = "0.1.0"

[dependencies]
nodejs = ">=25.8.2,<25.9"

[feature.backend.dependencies]
flask = "*"
flask_cors = "*"
werkzeug = "*"
blinker = "*"
zerorpc-python = "*"

[feature.frontend.dependencies]
nodejs = "*"

[feature.frontend.tasks]
build-frontend = "npm run build"

[environments]
backend = ["backend"]
frontend = ["frontend"]

pixi info output:

$ pixi run build-frontend
✨ Pixi task (build-frontend in frontend): npm run build
Error:   × failed to link c-ares-1.34.6-hb03c661_0.conda
  ├─▶ failed to link 'bin/adig'
  ├─▶ failed to copy file to destination
  ╰─▶ failed to copy file from /home/foo/.cache/rattler/cache/pkgs/c-ares-1.34.6-hb03c661_0/bin/adig to /mnt/c/
      Users/foo/source/repos/multivisor/.pixi/envs/frontend/bin/adig: Out of memory (os error 12)

Issue description

Installing nodejs with pixi gets me an out of memory error. It is the first package that I have this kind of issue with.

If I rerun the command it fails linking another dependency with an OOM error.

I am running on Windows with WSL on a laptop with 16GB.

There are many related issues, https://github.com/prefix-dev/pixi/issues/2458 suggested the --concurrent-solves 1.

Expected behavior

Install just fine.

sdebionne avatar Mar 29 '26 17:03 sdebionne

Based on the output you provided, it doesn't look like pixi install nodejs is the problem. The error occurs when your task (which you didn't share) reaches npm run build. Pixi always installs/updates the appropriate environment (which should include nodejs in this case) before running the task (pixi-install), so it seems this isn't a Pixi problem at all....

bpythonistic avatar Mar 29 '26 21:03 bpythonistic

pixi shell -e frontend --concurrent-solves 1 just activates the environment and it fails while creating/instaling the environment.

I copied the wrong output, but the issue is the same:

$ pixi shell -e frontend --concurrent-solves 1
Error:   × failed to link openssl-3.6.1-h35e630c_1.conda
  ├─▶ failed to link 'include/openssl/aes.h'
  ├─▶ failed to copy file to destination
  ╰─▶ failed to copy file from /home/foo/.cache/rattler/cache/pkgs/openssl-3.6.1-h35e630c_1/include/openssl/aes.h
      to /mnt/c/Users/foo/source/repos/multivisor/.pixi/envs/frontend/include/openssl/aes.h: Out of memory (os
      error 12

sdebionne avatar Mar 30 '26 05:03 sdebionne

I am running WSL1 (which AFAIU is not VM based and thus not limited in memory) and

$ lsb_release -a
Distributor ID: Ubuntu
Description:    Ubuntu 20.04 LTS

sdebionne avatar Mar 30 '26 06:03 sdebionne

Ive seem this happen before on WSL1. Its indeed during installation so the concurrent solves wont help. The weird thing is that it happens during copying of a file from the cache!

What you could try is to install pixi on the windows and calling that instead of the wsl installed version. See if that works.

Ofherwise, can you update to WSL2?

baszalmstra avatar Mar 30 '26 06:03 baszalmstra

Otherwise, can you update to WSL2?

I just did and it works fine. So there is something fishy with the copy/link of files in WSL1. Maybe not something to worry about, a warning in the doc would be enough?

sdebionne avatar Mar 30 '26 08:03 sdebionne

I found this Microsoft Learn article for your reference: Comparing WSL Versions. I'm glad that upgrading to WSL2 fixed your issue. This could probably be closed @baszalmstra.

bpythonistic avatar Mar 30 '26 12:03 bpythonistic

Closing this now, as the user reports its not a problem for him anymore. Thanks for taking the time to report your issue.

hunger avatar Apr 10 '26 09:04 hunger