-
Notifications
You must be signed in to change notification settings - Fork 320
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
installing two things using the npm backend seems to cause a deadlock, even with --jobs=1 #3303
Comments
I noticed some deadlocks happening but wasn't able to reproduce them, I figured I fixed them since they were happening pretty frequently in CI then stopped I tried this on my mac and didn't get a deadlock but maybe I'll try to run it on docker/linux and see if it happens there. It might also be because I have a couple of configurations set like disabling the versions host. If you manage to repro see if you can get logs. You will need to setup the file logging: https://mise.jdx.dev/configuration.html#mise-log-file-mise-log. Set it to trace. If I can get that I can probably figure out where this is happening. I already traced the code changes and didn't see anything obvious that would be causing this, however because adding lockfile support did mean I needed to modify global state that is held in a mutex so that's probably the cause but I still don't know why it's happening. |
hmm the problem is actually probably not what I think, I forgot I put a timeout on that (so at least mise would just crash instead) and the deadlocks I was seeing at least once in every CI suite (this never made it into a release version). I really have no idea what's causing this but it's interesting that |
tried on linux, no luck. not sure what to look at at this point. It's weird to me that I haven't seen any deadlocks in CI since I fixed that bug though. |
When run with MISE_LOG_FILE and
|
well that's interesting, it's happening when it tries to fetch the versions, not installing |
the fact you're using lockfiles is notable, though I am as well, can you try disabling them with |
less likely the venv could be a suspect |
I have also noticed problems with rayon parallelization running out of available threads. Do you have a low # of cpu cores maybe? Try setting RAYON_NUM_THREADS=20. I'll try setting this to 1 and see what happens. |
that said I see thread id 14 above so that might be unlikely |
Okay,I may be wrong about it working in .29 -- I've been trying slowly degrading the version in my devcontainer, and it's still failing as low as 2024.11.20 |
Also in case I'm wrong about the trimmed config, this is the full [env]
VAULT_ADDR = "https://<reddacted>:8200/"
ANSIBLE_HOST_KEY_CHECKING = "False"
ANSIBLE_FORCE_COLOR = "True"
ANSIBLE_HOME="{{env.HOME}}/.cache/ansible-camnet/ansible"
_.python.venv = { path = "{{env.HOME}}/.cache/ansible-camnet/venv", create = true }
[tools]
python = { version = "3.13.0" } # Handled by mise renovate datasource
vault = { version = "1.18.2" } # Handled by mise renovate datasource
cue = { version = "0.11.0" } # renovate: datasource=github-releases depName=cue-lang/cue
"npm:yaml-language-server" = { version = "1.15.0" } # renovate: datasource=npm depName=yaml-language-server
"npm:@ansible/ansible-language-server" = { version = "1.2.3" } # renovate: datasource=npm depName=@ansible/ansible-language-server |
Looks like release 2024.11.1 is the last working version, judging from just swapping versions, updating my config for any config changes, and trying |
Okay, I think it's something to do with installing/checking both npm and python? I can checkout my main branch just fine, which has no npm tools, |
Describe the bug
When trying to
mise install
in a directory with two npm-backend packages in the .mise.toml, there seems to be some kind of deadlock, where neither ever progresses.To Reproduce
Try running
mise install
with the following .mise.toml:Expected behavior
For both packages to be installed properly,
mise install --trace
shows that it's trying to get the versions for them in parallel, even with--jobs=1
and neither ever returnsmise doctor
outputmise doctor
is also hanging when printing the pluginsAdditional context
This seems to only be happening since sometime after version 2024.11.29, as it works fine on my host machine, but not in my dev container which is pulling the latest version.
Also individual commands to
mise use "npm:foo"
thenmise use "npm:bar"
works, until a later restore where it tries to pull them in parallel again.Node version: v22.11.0
npm version: 10.9.0
The text was updated successfully, but these errors were encountered: