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

Terminal hangs after upgrading to RTX Ver 2023.12.2 macos-x64 (2023-12-02) #1052

Closed
Pilgrim1379 opened this issue Dec 2, 2023 · 7 comments · Fixed by #1054
Closed

Terminal hangs after upgrading to RTX Ver 2023.12.2 macos-x64 (2023-12-02) #1052

Pilgrim1379 opened this issue Dec 2, 2023 · 7 comments · Fixed by #1054

Comments

@Pilgrim1379
Copy link

After upgrading to 2023.12.2 macos-x64 (2023-12-02), any terminal I start just hangs. I don't get a prompt or any anything.

The current workaround for getting a prompt at least is to delete the rtx folder in ~/.local/share/rtx that way it forces it to reinstall all the plugins again. After the plugins are installed, it hangs and I need to Ctrl-C to get a prompt.

Then next command I execute (regardless of what it is) finishes but then hangs until I Ctrl-C

rtx doctor says everyting is fine:

❯ rtx doctor
rtx version:
  2023.12.2 macos-x64 (2023-12-02)

build:
  Target: x86_64-apple-darwin
  Features: BREW, DEFAULT, NATIVE_TLS
  Built: Sat, 2 Dec 2023 07:35:14 +0000
  Rust Version: rustc 1.74.0 (79e9716c9 2023-11-13) (Homebrew)
  Profile: release

shell:
  /usr/local/bin/zsh
  zsh 5.9 (x86_64-apple-darwin21.3.0)

rtx data directory:
  /Users/NQA/.local/share/rtx

rtx environment variables:
  RTX_USE_TOML=1
  RTX_DATA_DIR=/Users/NQA/.local/share/rtx
  RTX_SHELL=zsh

settings:
  {"always_keep_download": "false", "always_keep_install": "false", "asdf_compat": "false", "disable_default_shorthands": "false", "disable_tools": "[]", "experimental": "true", "jobs": "4", "legacy_version_file": "true", "legacy_version_file_disable_tools": "[]", "log_level": "INFO", "missing_runtime_behavior": "warn", "plugin_autoupdate_last_check_duration": "10080", "raw": "false", "shorthands_file": "~/.config/rtx/shorthands.toml", "trusted_config_paths": "[\"~/workspace\"]", "verbose": "false", "yes": "false"}

config files:
  /Users/NQA/.config/rtx/config.toml
  /Users/NQA/.tool-versions
  /Users/NQA/.rtx.toml

plugins:
  bun      (core)
  deno     (core)
  elixir   https://github.com/asdf-vm/asdf-elixir.git#a4c42e1
  elm      https://github.com/asdf-community/asdf-elm.git#34d2627
  erlang   https://github.com/asdf-vm/asdf-erlang.git#6744df7
  go       (core)
  java     (core)
  neovim   https://github.com/richin13/asdf-neovim.git#0b7b611
  nim      https://github.com/asdf-community/asdf-nim.git#397c14a
  node     (core)
  python   (core)
  ruby     (core)
  zig      https://github.com/cheetah/asdf-zig.git#d88f6db

toolset:
  python@latest, go@latest, erlang@26, [email protected], java@temurin-17, ruby@latest, elm@latest, zig@latest, nim@latest, node@lts, bun@latest, neovim@nightly

No problems found
@razvanazamfirei
Copy link

I can confirm the exact same behavior. It can be reproduced by rtx activate fish | source It looks like rtx hook-env may be the culprit.

Occasionally, I get the following:

The application panicked (crashed).
Message:  rwlock write lock would result in deadlock
Location: /private/tmp/rust-20231125-5656-chakgz/rustc-1.74.0-src/library/std/src/sys/unix/locks/pthread_rwlock.rs:149

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
The application panicked (crashed).
Message:  called `Result::unwrap()` on an `Err` value: PoisonError { .. }
Location: src/plugins/external_plugin_cache.rs:33

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
The application panicked (crashed).
Message:  called `Result::unwrap()` on an `Err` value: PoisonError { .. }
Location: src/plugins/external_plugin_cache.rs:33

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
The application panicked (crashed).
Message:  called `Result::unwrap()` on an `Err` value: PoisonError { .. }
Location: src/plugins/external_plugin_cache.rs:33

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
The application panicked (crashed).
Message:  called `Result::unwrap()` on an `Err` value: PoisonError { .. }
Location: src/plugins/external_plugin_cache.rs:33

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
The application panicked (crashed).
Message:  called `Result::unwrap()` on an `Err` value: PoisonError { .. }
Location: src/plugins/external_plugin_cache.rs:33

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
The application panicked (crashed).
Message:  called `Result::unwrap()` on an `Err` value: PoisonError { .. }
Location: src/plugins/external_plugin_cache.rs:33

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
The application panicked (crashed).
Message:  called `Result::unwrap()` on an `Err` value: PoisonError { .. }
Location: src/plugins/external_plugin_cache.rs:33

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
The application panicked (crashed).
Message:  called `Result::unwrap()` on an `Err` value: PoisonError { .. }
Location: src/plugins/external_plugin_cache.rs:61

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

@jdx
Copy link
Owner

jdx commented Dec 2, 2023

can you run it with RTX_TRACE=1? I'm not seeing this behavior

@jdx
Copy link
Owner

jdx commented Dec 2, 2023

actually I think I know what it is, still a trace might be helpful to confirm

@jdx jdx linked a pull request Dec 2, 2023 that will close this issue
@razvanazamfirei
Copy link

razvanazamfirei commented Dec 2, 2023

@jdx, attached below. rtx activate fish | source hangs while evaluating rtx hook-env.

> RTX_TRACE=1 rtx hook-env --status
[TRACE] (1) rtx::config::config_file::rtx_toml: [src/config/config_file/rtx_toml.rs:60] parsing: /Users/johnqpublic/.config/rtx/config.toml
[TRACE] (1) rtx::file: [src/file.rs:71] cat ~/.config/rtx/config.toml
[TRACE] (1) reqwest::blocking::wait: [/Users/brew/Library/Caches/Homebrew/cargo_cache/registry/src/index.crates.io-6f17d22bba15001f/reqwest-0.11.22/src/blocking/wait.rs:49] (ThreadId(1)) park without timeout
[TRACE] (11) reqwest::blocking::client: [/Users/brew/Library/Caches/Homebrew/cargo_cache/registry/src/index.crates.io-6f17d22bba15001f/reqwest-0.11.22/src/blocking/client.rs:1066] (ThreadId(11)) start runtime::block_on
[TRACE] (1) reqwest::blocking::wait: [/Users/brew/Library/Caches/Homebrew/cargo_cache/registry/src/index.crates.io-6f17d22bba15001f/reqwest-0.11.22/src/blocking/wait.rs:49] (ThreadId(1)) park without timeout
[TRACE] (12) reqwest::blocking::client: [/Users/brew/Library/Caches/Homebrew/cargo_cache/registry/src/index.crates.io-6f17d22bba15001f/reqwest-0.11.22/src/blocking/client.rs:1066] (ThreadId(12)) start runtime::block_on
[TRACE] (1) rtx::plugins::rtx_plugin_toml: [src/plugins/rtx_plugin_toml.rs:28] parsing: /Users/johnqpublic/.local/share/rtx/plugins/java/rtx.plugin.toml
[TRACE] (1) rtx::file: [src/file.rs:71] cat ~/.local/share/rtx/plugins/java/rtx.plugin.toml
[TRACE] (1) rtx::plugins::rtx_plugin_toml: [src/plugins/rtx_plugin_toml.rs:28] parsing: /Users/johnqpublic/.local/share/rtx/plugins/ruby/rtx.plugin.toml
[TRACE] (1) rtx::file: [src/file.rs:71] cat ~/.local/share/rtx/plugins/ruby/rtx.plugin.toml
[TRACE] (1) rtx::config::config_file::rtx_toml: [src/config/config_file/rtx_toml.rs:60] parsing: /Users/johnqpublic/.config/rtx/config.toml
[TRACE] (1) rtx::file: [src/file.rs:71] cat ~/.config/rtx/config.toml
[TRACE] (1) rtx::config: [src/config/mod.rs:70] Settings: Settings {
    experimental: true,
    missing_runtime_behavior: Warn,
    always_keep_download: false,
    always_keep_install: false,
    legacy_version_file: true,
    legacy_version_file_disable_tools: {},
    plugin_autoupdate_last_check_duration: 604800s,
    trusted_config_paths: {},
    verbose: true,
    asdf_compat: false,
    jobs: 4,
    shorthands_file: None,
    disable_default_shorthands: false,
    disable_tools: {},
    log_level: Trace,
    raw: false,
    yes: false,
}
[TRACE] (9) rtx::cache: [src/cache.rs:80] reading ~/.cache/rtx/go/legacy_filenames.msgpack.z
[DEBUG] (1) rtx::config: [src/config/mod.rs:115] Files: ~/.config/rtx/config.toml
Installed Plugins: dart, dotenv-linter, duf, editorconfig-checker, fd, gitleaks, glow, go, gofumpt, golangci-lint, gum, hugo, java, jq, julia, pre-commit, ripgrep, ruby, shellcheck, sourcery, yamlfmt, yamllint, yq
[DEBUG] (1) rtx::cli: [src/cli/mod.rs:197] rtx hook-env --status
[TRACE] (4) rtx::cache: [src/cache.rs:80] reading ~/.cache/rtx/java/aliases.msgpack.z
[TRACE] (5) rtx::cache: [src/cache.rs:80] reading ~/.cache/rtx/go/remote_versions.msgpack.z
[DEBUG] (1) rtx::toolset::builder: [src/toolset/builder.rs:70] bun@latest, dart@3, dotenv-linter@3, duf@latest, editorconfig-checker@latest, fd@latest, gitleaks@latest, glow@1, go@prefix:1, golangci-lint@1, gum@latest, hugo@latest, java@latest java@lts, jq@latest, julia@latest [email protected], node@latest node@lts, pre-commit@latest, [email protected] [email protected] [email protected], ripgrep@latest, [email protected] ruby@system, shellcheck@latest, sourcery@latest, yamlfmt@latest, yamllint@latest, yq@latest
set -gx PATH '/Users/johnqpublic/.config/fish/shims:/Users/johnqpublic/.config/bin:/Users/johnqpublic/.config/git/functions:/Users/johnqpublic/.config/plugins/settings:/Users/johnqpublic/.local/share/cargo/bin:/Users/johnqpublic/.local/share/go/bin:/Users/johnqpublic/.local/bin:/Users/johnqpublic/.local/share/pypoetry/bin:/Users/johnqpublic/.local/share/npm/bin:/Users/johnqpublic/.local/share/rustup/toolchains/stable-aarch64-apple-darwin/bin:/usr/local/MacGPG2/bin:/Users/johnqpublic/.config/composer/vendor/bin:/opt/homebrew/opt/curl/bin:/opt/homebrew/opt/:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/johnqpublic/.config/jetbrains:/Users/johnqpublic/.local/share/pyenv/shims:/usr/local/bin:/System/Cryptexes/App/usr/bin:/Library/Apple/usr/bin:/Library/TeX/texbin:/usr/bin:/bin:/usr/sbin:/sbin'
[TRACE] (6) rtx::cache: [src/cache.rs:80] reading ~/.cache/rtx/julia/1.9.4/list_bin_paths.msgpack.z
[TRACE] (6) rtx::cache: [src/cache.rs:80] reading ~/.cache/rtx/julia/1.9.4/list_bin_paths.msgpack.z
[TRACE] (6) rtx::cache: [src/cache.rs:80] reading ~/.cache/rtx/pre-commit/3.5.0/list_bin_paths.msgpack.z
[TRACE] (6) rtx::cache: [src/cache.rs:80] reading ~/.cache/rtx/ripgrep/14.0.3/list_bin_paths.msgpack.z
[TRACE] (7) rtx::cache: [src/cache.rs:80] reading ~/.cache/rtx/dotenv-linter/3.3.0/list_bin_paths.msgpack.z
[TRACE] (6) rtx::cache: [src/cache.rs:80] reading ~/.cache/rtx/ruby/3.2.2/list_bin_paths.msgpack.z
[TRACE] (6) rtx::cache: [src/cache.rs:80] reading ~/.cache/rtx/shellcheck/0.9.0/list_bin_paths.msgpack.z
[TRACE] (7) rtx::cache: [src/cache.rs:80] reading ~/.cache/rtx/duf/0.8.1/list_bin_paths.msgpack.z
[TRACE] (6) rtx::cache: [src/cache.rs:80] reading ~/.cache/rtx/sourcery/2.1.2/list_bin_paths.msgpack.z
[TRACE] (7) rtx::cache: [src/cache.rs:80] reading ~/.cache/rtx/editorconfig-checker/2.7.2/list_bin_paths.msgpack.z
[TRACE] (6) rtx::cache: [src/cache.rs:80] reading ~/.cache/rtx/yamlfmt/0.10.0/list_bin_paths.msgpack.z
[TRACE] (7) rtx::cache: [src/cache.rs:80] reading ~/.cache/rtx/fd/8.7.1/list_bin_paths.msgpack.z
[TRACE] (7) rtx::cache: [src/cache.rs:80] reading ~/.cache/rtx/gitleaks/8.18.1/list_bin_paths.msgpack.z
[TRACE] (6) rtx::cache: [src/cache.rs:80] reading ~/.cache/rtx/yamllint/1.33.0/list_bin_paths.msgpack.z
[TRACE] (7) rtx::cache: [src/cache.rs:80] reading ~/.cache/rtx/glow/1.5.1/list_bin_paths.msgpack.z
[TRACE] (6) rtx::cache: [src/cache.rs:80] reading ~/.cache/rtx/yq/4.40.3/list_bin_paths.msgpack.z
[TRACE] (8) rtx::cache: [src/cache.rs:80] reading ~/.cache/rtx/hugo/0.120.4/list_bin_paths.msgpack.z
[TRACE] (8) rtx::cache: [src/cache.rs:80] reading ~/.cache/rtx/java/21.0.1/list_bin_paths.msgpack.z
[TRACE] (8) rtx::cache: [src/cache.rs:80] reading ~/.cache/rtx/java/17/list_bin_paths.msgpack.z
[TRACE] (8) rtx::cache: [src/cache.rs:80] reading ~/.cache/rtx/jq/1.7/list_bin_paths.msgpack.z
The application panicked (crashed).
Message:  rwlock write lock would result in deadlock
Location: /private/tmp/rust-20231125-5656-chakgz/rustc-1.74.0-src/library/std/src/sys/unix/locks/pthread_rwlock.rs:149

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
[TRACE] (8) rtx::cache: [src/cache.rs:80] reading ~/.cache/rtx/golangci-lint/1.55.2/list_bin_paths.msgpack.z
The application panicked (crashed).
Message:  called `Result::unwrap()` on an `Err` value: PoisonError { .. }
Location: src/plugins/external_plugin_cache.rs:33

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
The application panicked (crashed).
Message:  called `Result::unwrap()` on an `Err` value: PoisonError { .. }
Location: src/plugins/external_plugin_cache.rs:33

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
The application panicked (crashed).
Message:  called `Result::unwrap()` on an `Err` value: PoisonError { .. }
Location: src/plugins/external_plugin_cache.rs:33

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
The application panicked (crashed).
Message:  called `Result::unwrap()` on an `Err` value: PoisonError { .. }
Location: src/plugins/external_plugin_cache.rs:33

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
[TRACE] (8) rtx::cache: [src/cache.rs:80] reading ~/.cache/rtx/gum/0.11.0/list_bin_paths.msgpack.z
The application panicked (crashed).
Message:  called `Result::unwrap()` on an `Err` value: PoisonError { .. }
Location: src/plugins/external_plugin_cache.rs:33

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
The application panicked (crashed).
Message:  called `Result::unwrap()` on an `Err` value: PoisonError { .. }
Location: src/plugins/external_plugin_cache.rs:33

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
The application panicked (crashed).
Message:  called `Result::unwrap()` on an `Err` value: PoisonError { .. }
Location: src/plugins/external_plugin_cache.rs:33

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
The application panicked (crashed).
Message:  called `Result::unwrap()` on an `Err` value: PoisonError { .. }
Location: src/plugins/external_plugin_cache.rs:61

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

@razvanazamfirei
Copy link

#1054 appears to fix this.

@jdx jdx closed this as completed in #1054 Dec 2, 2023
@Pilgrim1379
Copy link
Author

@jdx I know you've closed this issue and according to the comment in the merged fix you're looking for a way to implement the feature without deadlocking.

The update that fixes the issue hasn't hit homebrew yet to I haven't updated. In the meantime what I did was install all my plugins one after the other and after each install check that my terminal is working as expected.

One plugin consistently triggered the original problem that I reported. The plugin is nim = "latest". Maybe you can use it to try and figure out a solution.

@jdx
Copy link
Owner

jdx commented Dec 2, 2023

I worked around the issue at least for poetry by not using a list_bin_paths script: mise-plugins/mise-poetry@caeb255

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

Successfully merging a pull request may close this issue.

3 participants