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

Sometimes mise just hangs when executing a task #4302

Open
jdx opened this issue Feb 4, 2025 · 8 comments
Open

Sometimes mise just hangs when executing a task #4302

jdx opened this issue Feb 4, 2025 · 8 comments

Comments

@jdx
Copy link
Owner

jdx commented Feb 4, 2025

Discussed in #4275

Originally posted by plu January 31, 2025
We've seen this happen on CI sometimes, but I also found a way to trigger it:

mise-tasks/example

#!/usr/bin/env bash
set -eou pipefail
echo "start $1"
sleep 5
echo "done $1"

Execute:

for i in $(seq 1 30); do mise example $i &; done
ps auxww | grep mise
johannes.plunien 74117   0.0  0.0 411387360  20720 s007  SN    1:35PM   0:00.03 /Users/johannes.plunien/.local/bin/mise example 22

The strange thing is, that the whole invocation of 22 in this case is missing. So it didn't print start 22, neither done 22.

Any idea what this might be?

@plu
Copy link

plu commented Feb 4, 2025

The easiest way to reproduce it is:

mise.toml

[tasks.test]
run = "echo $1"
for i in $(seq 1 20000); do mise test $i; done

It's not necessary to execute anything in parallel.

@jdx jdx marked this as a duplicate of #4303 Feb 6, 2025
@phyber
Copy link

phyber commented Feb 6, 2025

Just a random datapoint that probably doesn't help, but I couldn't reproduce this with either of these examples on a Raspberry Pi 4 running Debian Bookworm, using mise 2025.2.1 linux-arm64 (2025-02-03) from the apt repository.

Perhaps the Raspberry Pi is too slow (it took just over 20 minutes for the [tasks.test] example to complete running) or the behaviour is platform specific (amd64?).

@plu
Copy link

plu commented Feb 7, 2025

I'm also on arm64, but more powerful hardware.

version: 2025.2.1 macos-arm64 (2025-02-03)
activated: yes
shims_on_path: no

build_info:
  Target: aarch64-apple-darwin
  Features: DEFAULT, NATIVE_TLS, OPENSSL, SELF_UPDATE
  Built: Mon, 3 Feb 2025 11:34:40 +0000
  Rust Version: rustc 1.84.0 (9fc6b4312 2025-01-07)
  Profile: release

shell:
  /bin/zsh
  zsh 5.9 (x86_64-apple-darwin23.0)

dirs:
  cache: ~/Library/Caches/mise
  config: ~/.config/mise
  data: ~/.local/share/mise
  shims: ~/.local/share/mise/shims
  state: ~/.local/state/mise

config_files:
  ~/.config/mise/config.toml
  /private/tmp/tmp/mise.toml

ignored_config_files: (none)

backends:
  aqua
  asdf
  cargo
  core
  dotnet
  gem
  go
  npm
  pipx
  spm
  ubi
  vfox

plugins:
  ag           https://github.com/mise-plugins/mise-ag#3a3e2b3
  awscli       https://github.com/MetricMike/asdf-awscli.git#c26bbb4
  create-dmg   https://github.com/tuist/asdf-create-dmg.git#de7c6c1
  maven        https://github.com/mise-plugins/asdf-maven.git#c872214
  pipx         https://github.com/mise-plugins/mise-pipx.git#31db618
  sourcedocs   https://github.com/tuist/asdf-sourcedocs#1d8b6b7
  sourcery     https://github.com/younke/asdf-sourcery.git#1ddd8f1
  swiftformat  https://github.com/mise-plugins/mise-swiftformat#ab1f91f
  swiftlint    https://github.com/mise-plugins/mise-swiftlint#447f94c
  tmux         https://github.com/mise-plugins/mise-tmux.git#f405ff0
  tuist        https://github.com/mise-plugins/mise-tuist#44c87b2
  vim          https://github.com/mise-plugins/mise-vim.git#cd917b0
  xcbeautify   https://github.com/mise-plugins/asdf-xcbeautify#48563a3
  xcodes       https://github.com/younke/asdf-xcodes.git#9f037bf

toolset:
  aqua:FiloSottile/[email protected]
  aqua:jqlang/[email protected]
  aqua:kubernetes/[email protected]
  asdf:[email protected]
  asdf:[email protected]
  asdf:[email protected]
  asdf:[email protected]
  asdf:[email protected]
  asdf:[email protected]
  asdf:[email protected]
  asdf:[email protected]
  [email protected]
  core:[email protected]
  core:[email protected]
  core:[email protected]
  core:[email protected]
  ubi:cli/[email protected]
  ubi:dandavison/[email protected]
  ubi:getsops/[email protected]
  ubi:git-lfs/[email protected]
  ubi:jdx/[email protected]
  ubi:mikefarah/[email protected]
  ubi:sharkdp/[email protected]

path:
  ~/.local/share/mise/installs/age/1.2.1/age
  ~/.local/share/mise/installs/awscli/2.23.4/bin
  ~/.local/share/mise/installs/bat/0.25.0
  ~/.local/share/mise/installs/delta/0.18.2
  ~/.local/share/mise/installs/jq/1.7.1
  ~/.local/share/mise/installs/kubectl/1.32.1
  ~/.local/share/mise/installs/node/23.6.1/bin
  ~/.local/share/mise/installs/python/3.13.1/bin
  ~/.local/share/mise/installs/ruby/3.4.1/bin
  ~/.cargo/bin
  ~/.local/share/mise/installs/sops/3.9.3
  ~/.local/share/mise/installs/swiftformat/0.55.5/bin
  ~/.local/share/mise/installs/swiftlint/0.58.2/bin
  ~/.local/share/mise/installs/tmux/3.5a/bin
  ~/.local/share/mise/installs/tuist/4.40.0/bin
  ~/.local/share/mise/installs/ubi-cli-cli/2.65.0
  ~/.local/share/mise/installs/ubi-git-lfs-git-lfs/3.6.1/bin
  ~/.local/share/mise/installs/usage/2.0.3
  ~/.local/share/mise/installs/vim/9.1.1048/bin
  ~/.local/share/mise/installs/xcbeautify/2.23.0/bin
  ~/.local/share/mise/installs/xcodes/1.6.0/bin
  ~/.local/share/mise/installs/yq/4.45.1/bin
  ~/.local/share/mise/installs/cargo/0.85.0/bin
  ~/.rd/bin
  ~/.local/bin
  /opt/homebrew/bin
  /opt/homebrew/sbin
  ~/bin
  ~/Library/Android/sdk/tools
  ~/Library/Android/sdk/platform-tools
  ~/.rd/bin
  /usr/local/bin
  /System/Cryptexes/App/usr/bin
  /usr/bin
  /bin
  /usr/sbin
  /sbin
  /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin
  /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin
  /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
  /Library/Apple/usr/bin
  /Applications/iTerm.app/Contents/Resources/utilities

env_vars:
  MISE_SHELL=zsh
  MISE_GITHUB_TOKEN=REDACTED

settings:
  experimental  true    ~/.config/mise/config.toml
  task_output   "quiet" ~/.config/mise/config.toml

No problems found

@hverlin
Copy link
Contributor

hverlin commented Feb 7, 2025

I could not reproduce as well. Are you able to reproduce with the mise docker image?

docker run --pull=always -it --rm --entrypoint bash jdxcode/mise:latest

@plu
Copy link

plu commented Feb 7, 2025

I cannot reproduce it in the docker image either. But I can reproduce it on:

  • Corporate MacBook (M1)
  • Private iMac (M4)
  • Corporate CI runner, Mac Mini, both M1 and x86

@plu
Copy link

plu commented Feb 7, 2025

A quick test on GitHub runners came back negative: https://github.com/plu/mise-test/actions/runs/13198350890/job/36844555169

So it must be something else that all my environments here have in common to trigger the hang.

@phyber
Copy link

phyber commented Feb 7, 2025

Attempting this on a more powerful amd64 machine (also running Debian Bookworm), I got some mise processes to hang using the parallel example. The [tasks.test] example still completed successfully.
This was using the version from the apt repo 2025.2.1 linux-x64 (2025-02-03).

Where in the code are these tasks run from? Is it src/cli/run.rs or somewhere else?

@thedavidharris
Copy link

#4314 seems to describe the situation where we saw this pop up. As soon as we either excluded tools we did not want to be installed, excluded config files altogether or installed all tools before running a task, we no longer saw task hangs.

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

No branches or pull requests

5 participants